1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 05:17:47 +01:00

add new issues to baseline and fix a test

This commit is contained in:
orklah 2021-09-20 12:43:19 +02:00
parent d3d11471b7
commit a54e76cbc7
2 changed files with 5 additions and 1 deletions

View File

@ -179,7 +179,10 @@
</PossiblyUndefinedIntArrayOffset>
</file>
<file src="src/Psalm/Internal/Analyzer/Statements/UnusedAssignmentRemover.php">
<PossiblyUndefinedIntArrayOffset occurrences="3">
<PossiblyUndefinedIntArrayOffset occurrences="6">
<code>$token_list[$iter]</code>
<code>$token_list[$iter]</code>
<code>$token_list[$iter]</code>
<code>$token_list[$iter]</code>
<code>$token_list[0]</code>
<code>$token_list[1]</code>

View File

@ -41,6 +41,7 @@ class AssignmentTest extends TestCase
$x = 0;
$x |= (int) (rand(0, 1) !== 2);
$x |= 1;
/** @psalm-suppress RedundantCondition Psalm now knows this is always truthy */
if ($x) {
echo $x;
}',