1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Merge pull request #6878 from pilif/fix-uneavluated-inline-html

This commit is contained in:
Bruce Weirdan 2021-11-10 14:49:23 +02:00 committed by GitHub
commit d72b384a22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -343,7 +343,6 @@ class StatementsAnalyzer extends SourceAnalyzer
&& !$context->collect_initializations
&& !$context->collect_mutations
&& !($stmt instanceof PhpParser\Node\Stmt\Nop)
&& !($stmt instanceof PhpParser\Node\Stmt\InlineHTML)
&& !($stmt instanceof PhpParser\Node\Stmt\Function_)
&& !($stmt instanceof PhpParser\Node\Stmt\Class_)
&& !($stmt instanceof PhpParser\Node\Stmt\Interface_)

View File

@ -1574,6 +1574,13 @@ class UnusedCodeTest extends TestCase
',
'error_message' => 'UnevaluatedCode',
],
'exitInlineHtml' => [
'<?php
exit(0);
?'.'>foo
',
'error_message' => 'UnevaluatedCode',
],
];
}
}