File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed
e2e/composer-version-named-args Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -391,6 +391,9 @@ jobs:
391391 cd e2e/composer-version-config
392392 composer install
393393 ../../bin/phpstan analyze test.php --level=0
394+ - script : |
395+ cd e2e/composer-version-named-args
396+ ../../bin/phpstan analyze test.php --level=0
394397
395398 steps :
396399 - name : " Checkout"
Original file line number Diff line number Diff line change 1+ <?php declare (strict_types=1 );
2+
3+ namespace NamedAttributesPhpversion ;
4+
5+ use Exception ;
6+ use function PHPStan \debugScope ;
7+ use function PHPStan \dumpType ;
8+ use function PHPStan \Testing \assertType ;
9+
10+ class HelloWorld
11+ {
12+ /** @return mixed[] */
13+ public function sayHello (): array |null
14+ {
15+ if (PHP_VERSION_ID >= 80400 ) {
16+ } else {
17+ }
18+ return [
19+ new Exception (previous: new Exception ()),
20+ ];
21+ }
22+ }
23+
24+ class HelloWorld2
25+ {
26+ /** @return mixed[] */
27+ public function sayHello (): array |null
28+ {
29+ return [
30+ PHP_VERSION_ID >= 80400 ? 1 : 0 ,
31+ new Exception (previous: new Exception ()),
32+ ];
33+ }
34+ }
You can’t perform that action at this time.
0 commit comments