Skip to content

Commit

Permalink
fix isAlwaysTruthy: TNonEmptyString can be falsy (with '0')
Browse files Browse the repository at this point in the history
  • Loading branch information
orklah committed Oct 4, 2021
1 parent 213644d commit 20bb5f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Psalm/Type/Union.php
Original file line number Diff line number Diff line change
Expand Up @@ -1045,11 +1045,11 @@ public function isAlwaysTruthy(): bool
continue;
}

if ($atomic_type instanceof Type\Atomic\TNonEmptyString) {
if ($atomic_type instanceof Type\Atomic\TNonFalsyString) {
continue;
}

if ($atomic_type instanceof Type\Atomic\TNonEmptyNonspecificLiteralString) {
if ($atomic_type instanceof Type\Atomic\TCallableString) {
continue;
}

Expand Down

0 comments on commit 20bb5f1

Please sign in to comment.