mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
add test
This commit is contained in:
parent
c4ebc34695
commit
88dd4eace3
@ -1481,6 +1481,16 @@ class UnusedCodeTest extends TestCase
|
||||
f(new Worker());',
|
||||
'error_message' => 'PossiblyUnusedMethod',
|
||||
],
|
||||
'UnusedFunctionInDoubleConditional' => [
|
||||
'<?php
|
||||
$list = [];
|
||||
|
||||
if (rand(0,1) && rand(0,1)) {
|
||||
array_merge($list, []);
|
||||
};
|
||||
',
|
||||
'error_message' => 'UnusedFunctionCall',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user