Skip to content

Commit

Permalink
[TypeDeclaration] Ensure always return with Expr on maybe continued i…
Browse files Browse the repository at this point in the history
…n next stmt on SilentVoidResolver (#5771)
  • Loading branch information
samsonasik committed Mar 25, 2024
1 parent fc250dd commit 82d7172
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rules/TypeDeclaration/TypeInferer/SilentVoidResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private function isStopped(Stmt|Expr $stmt): bool
{
return $stmt instanceof Throw_
|| $stmt instanceof Exit_
|| $stmt instanceof Return_
|| ($stmt instanceof Return_ && $stmt->expr instanceof Expr)
|| $stmt instanceof Yield_
|| $stmt instanceof YieldFrom;
}
Expand Down

0 comments on commit 82d7172

Please sign in to comment.