Skip to content

Commit 41019ba

Browse files
committed
more tests
1 parent a769ebe commit 41019ba

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/PHPStan/Rules/Classes/data/named-arguments-phpversion.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,27 @@ public function sayHello(): array|null
3131
];
3232
}
3333
}
34+
35+
class HelloWorld3
36+
{
37+
/** @return mixed[] */
38+
public function sayHello(): array|null
39+
{
40+
return [
41+
PHP_VERSION_ID >= 70400 ? 1 : 0,
42+
new Exception(previous: new Exception()),
43+
];
44+
}
45+
}
46+
47+
class HelloWorld4
48+
{
49+
/** @return mixed[] */
50+
public function sayHello(): array|null
51+
{
52+
return [
53+
PHP_VERSION_ID < 80000 ? 1 : 0,
54+
new Exception(previous: new Exception()),
55+
];
56+
}
57+
}

0 commit comments

Comments
 (0)