Skip to content

Commit b3f9c10

Browse files
committed
Expect the PHP 7 name of array_reduce()'s array parameter in the bug-15882 rule test
Amp-Thread-ID: https://ampcode.com/threads/T-01a228e7-1edf-7397-a829-060d11e12d6a
1 parent 178ac2f commit b3f9c10

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3725,13 +3725,14 @@ public function testBug15861(): void
37253725

37263726
public function testBug15882(): void
37273727
{
3728+
$arrayParameterName = PHP_VERSION_ID < 80000 ? '$input' : '$array';
37283729
$this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-15882.php'], [
37293730
[
3730-
'Parameter #1 $array of function array_reduce expects array<stdClass>, array<stdClass>|stdClass given.',
3731+
'Parameter #1 ' . $arrayParameterName . ' of function array_reduce expects array<stdClass>, array<stdClass>|stdClass given.',
37313732
26,
37323733
],
37333734
[
3734-
'Parameter #1 $array of function array_reduce expects array<stdClass>, array<stdClass>|stdClass given.',
3735+
'Parameter #1 ' . $arrayParameterName . ' of function array_reduce expects array<stdClass>, array<stdClass>|stdClass given.',
37353736
38,
37363737
],
37373738
]);

0 commit comments

Comments
 (0)