We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf47882 commit eeb0b33Copy full SHA for eeb0b33
1 file changed
src/Rules/Comparison/ImpossibleCheckTypeHelper.php
@@ -269,16 +269,6 @@ public function findSpecifiedType(
269
return null;
270
}
271
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
-
282
$rootExprType = ($this->treatPhpDocTypesAsCertain ? $scope->getType($rootExpr) : $scope->getNativeType($rootExpr));
283
if ($rootExprType instanceof ConstantBooleanType) {
284
return $rootExprType->getValue();
0 commit comments