Skip to content

Commit a7ac762

Browse files
committed
Fix build
1 parent 063a7fd commit a7ac762

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: src/Rules/BooleansInConditions/BooleanRuleHelper.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use PhpParser\Node\Expr;
66
use PHPStan\Analyser\Scope;
77
use PHPStan\Rules\RuleLevelHelper;
8-
use PHPStan\Type\BooleanType;
98
use PHPStan\Type\ErrorType;
109
use PHPStan\Type\MixedType;
1110
use PHPStan\Type\Type;
@@ -32,15 +31,15 @@ public function passesAsBoolean(Scope $scope, Expr $expr): bool
3231
$expr,
3332
'',
3433
static function (Type $type): bool {
35-
return $type instanceof BooleanType;
34+
return $type->isBoolean()->yes();
3635
}
3736
);
3837
$foundType = $typeToCheck->getType();
3938
if ($foundType instanceof ErrorType) {
4039
return true;
4140
}
4241

43-
return $foundType instanceof BooleanType;
42+
return $foundType->isBoolean()->yes();
4443
}
4544

4645
}

0 commit comments

Comments
 (0)