Skip to content

Commit

Permalink
fix never return for MethodCalls
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmuffme committed Dec 29, 2022
1 parent 5bfb87c commit efc8727
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -90,6 +90,8 @@ public static function getReturnTypes(
}

if ($stmt->expr instanceof PhpParser\Node\Expr\FuncCall
|| $stmt->expr instanceof PhpParser\Node\Expr\MethodCall
|| $stmt->expr instanceof PhpParser\Node\Expr\NullsafeMethodCall
|| $stmt->expr instanceof PhpParser\Node\Expr\StaticCall) {
$stmt_type = $nodes->getType($stmt->expr);
if ($stmt_type && ($stmt_type->isNever() || $stmt_type->explicit_never)) {
Expand Down

0 comments on commit efc8727

Please sign in to comment.