Skip to content

Commit eeb0b33

Browse files
committed
Update ImpossibleCheckTypeHelper.php
1 parent cf47882 commit eeb0b33

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

src/Rules/Comparison/ImpossibleCheckTypeHelper.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -269,16 +269,6 @@ public function findSpecifiedType(
269269
return null;
270270
}
271271

272-
// the conditional return type describes behavioral control flow (e.g. void vs never
273-
// based on a boolean flag), not a type check. Skip the impossible check.
274-
if ($context->null() && $node instanceof Expr\CallLike) {
275-
foreach ($node->getArgs() as $arg) {
276-
if ($arg->value === $rootExpr) {
277-
return null;
278-
}
279-
}
280-
}
281-
282272
$rootExprType = ($this->treatPhpDocTypesAsCertain ? $scope->getType($rootExpr) : $scope->getNativeType($rootExpr));
283273
if ($rootExprType instanceof ConstantBooleanType) {
284274
return $rootExprType->getValue();

0 commit comments

Comments
 (0)