diff --git a/src/Rules/StrictCalls/StrictFunctionCallsRule.php b/src/Rules/StrictCalls/StrictFunctionCallsRule.php index f959fc9..9af4389 100644 --- a/src/Rules/StrictCalls/StrictFunctionCallsRule.php +++ b/src/Rules/StrictCalls/StrictFunctionCallsRule.php @@ -11,7 +11,6 @@ use PHPStan\Reflection\ReflectionProvider; use PHPStan\Rules\Rule; use PHPStan\Rules\RuleErrorBuilder; -use PHPStan\Type\Constant\ConstantBooleanType; use function array_key_exists; use function sprintf; use function strtolower; @@ -79,8 +78,7 @@ public function processNode(Node $node, Scope $scope): array } $argumentType = $scope->getType($node->getArgs()[$argumentPosition]->value); - $trueType = new ConstantBooleanType(true); - if (!$trueType->isSuperTypeOf($argumentType)->yes()) { + if (!$argumentType->isTrue()->yes()) { return [ RuleErrorBuilder::message(sprintf( 'Call to function %s() requires parameter #%d to be true.',