Skip to content

Commit 6f3e945

Browse files
committed
fixup! Replace error-prone instanceof in Rules classes
1 parent ad1e6bb commit 6f3e945

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Rules/Comparison/ImpossibleCheckTypeHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function findSpecifiedType(
7070
if ($functionName === 'assert' && $argsCount >= 1) {
7171
$arg = $node->getArgs()[0]->value;
7272
$assertValues = ($this->treatPhpDocTypesAsCertain ? $scope->getType($arg) : $scope->getNativeType($arg))->getConstantScalarValues();
73-
if (count($assertValues) === 0 || !is_bool($assertValues[0])) {
73+
if (count($assertValues) !== 1 || !is_bool($assertValues[0])) {
7474
return null;
7575
}
7676

0 commit comments

Comments
 (0)