diff --git a/tests/PHPStan/Analyser/NodeScopeResolverTest.php b/tests/PHPStan/Analyser/NodeScopeResolverTest.php index 634e6ebb0e..8928b5ee79 100644 --- a/tests/PHPStan/Analyser/NodeScopeResolverTest.php +++ b/tests/PHPStan/Analyser/NodeScopeResolverTest.php @@ -7845,17 +7845,17 @@ public function dataWhileLoopVariables(): array { return [ [ - 'int', + 'int', '$i', "'begin'", ], [ - 'int', + 'int', '$i', "'end'", ], [ - 'int', + 'int', '$i', "'afterLoop'", ], diff --git a/tests/PHPStan/Analyser/data/while-loop-variables.php b/tests/PHPStan/Analyser/data/while-loop-variables.php index 792d7a6e33..a23194ab82 100644 --- a/tests/PHPStan/Analyser/data/while-loop-variables.php +++ b/tests/PHPStan/Analyser/data/while-loop-variables.php @@ -7,7 +7,7 @@ function () { $i = 0; $nullableVal = null; $falseOrObject = false; - while ($val = fetch() && $i++ < 10) { + while (($val = fetch()) && $i++ < 10) { 'begin'; $foo = new Foo(); 'afterAssign';