mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Do not warn about comments after return
This commit is contained in:
parent
bc463a4f00
commit
03f7dc0651
@ -61,7 +61,7 @@ class StatementsChecker
|
||||
$has_returned = false;
|
||||
|
||||
foreach ($stmts as $stmt) {
|
||||
if ($has_returned) {
|
||||
if ($has_returned && !($stmt instanceof PhpParser\Node\Stmt\Nop)) {
|
||||
echo('Warning: Expressions after return in ' . $this->_file_name . ' on line ' . $stmt->getLine() . PHP_EOL);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user