Skip to content

Commit a447737

Browse files
committed
fix
1 parent b67108e commit a447737

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/PHPStan/Analyser/NodeScopeResolverTest.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,17 +270,21 @@ public function testFile(string $file): void
270270
$failures = [];
271271

272272
foreach ($asserts as $args) {
273-
$assertType = array_shift($args);
274-
$file = array_shift($args);
275273

276-
if ($assertType === 'type') {
274+
if ($args[0] === 'type') {
275+
$assertType = array_shift($args);
276+
$file = array_shift($args);
277+
277278
$expected = $args[0];
278279
$actual = $args[1];
279280

280281
if ($expected !== $actual) {
281282
$failures[] = sprintf("Line %d:\nExpected: %s\nActual: %s\n", $args[2], $expected, $actual);
282283
}
283-
} elseif ($assertType === 'variableCertainty') {
284+
} elseif ($args[0] === 'variableCertainty') {
285+
$assertType = array_shift($args);
286+
$file = array_shift($args);
287+
284288
$expectedCertainty = $args[0];
285289
$actualCertainty = $args[1];
286290
$variableName = $args[2];

0 commit comments

Comments
 (0)