1
0
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:
Matthew Brown 2016-03-14 12:48:18 -04:00
parent bc463a4f00
commit 03f7dc0651

View File

@ -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;
}