We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94150ef commit 91494f0Copy full SHA for 91494f0
tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php
@@ -2174,6 +2174,11 @@ public function testBug10020(): void
2174
$this->analyse([__DIR__ . '/data/bug-10020.php'], []);
2175
}
2176
2177
+ public function testBug8506(): void
2178
+ {
2179
+ $this->analyse([__DIR__ . '/data/bug-8506.php'], []);
2180
+ }
2181
+
2182
public function testBug13065(): void
2183
{
2184
$errors = [];
tests/PHPStan/Rules/Functions/data/bug-8506.php
@@ -0,0 +1,18 @@
1
+<?php
2
3
+namespace Bug8506;
4
5
+function a(): ?int { return rand(0, 1) ? 1 : null; }
6
+function b(int $i, int ...$a): void {}
7
8
+$arguments = array_filter([
9
+ a(),
10
11
12
+]);
13
14
+if (!$arguments) {
15
+ return;
16
+}
17
18
+b(...$arguments);
0 commit comments