Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a7ac762

Browse files
Fix build
1 parent 063a7fd commit a7ac762

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎src/Rules/BooleansInConditions/BooleanRuleHelper.php

Lines changed: 2 additions & 3 deletions
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 $typeinstanceof BooleanType;
34+
return $type->isBoolean()->yes();
3635
}
3736
);
3837
$foundType = $typeToCheck->getType();
3938
if ($foundType instanceof ErrorType) {
4039
return true;
4140
}
4241

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

4645
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /