File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1829,6 +1829,7 @@ protected function processAdditional()
1829
1829
T_CALLABLE => T_CALLABLE ,
1830
1830
T_PARENT => T_PARENT ,
1831
1831
T_SELF => T_SELF ,
1832
+ T_STATIC => T_STATIC ,
1832
1833
];
1833
1834
1834
1835
$ closer = $ this ->tokens [$ x ]['parenthesis_closer ' ];
Original file line number Diff line number Diff line change @@ -75,6 +75,9 @@ fn(callable $a) : callable => $a;
75
75
/* testArrayReturnType */
76
76
fn (array $ a ) : array => $ a ;
77
77
78
+ /* testStaticReturnType */
79
+ fn (array $ a ) : static => $ a ;
80
+
78
81
/* testTernary */
79
82
$ fn = fn ($ a ) => $ a ? /* testTernaryThen */ fn () : string => 'a ' : /* testTernaryElse */ fn () : string => 'b ' ;
80
83
Original file line number Diff line number Diff line change @@ -466,7 +466,7 @@ public function testNullableNamespace()
466
466
467
467
468
468
/**
469
- * Test arrow functions that use self/parent/callable return types.
469
+ * Test arrow functions that use self/parent/callable/array/static return types.
470
470
*
471
471
* @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional
472
472
*
@@ -481,6 +481,7 @@ public function testKeywordReturnTypes()
481
481
'Parent ' ,
482
482
'Callable ' ,
483
483
'Array ' ,
484
+ 'Static ' ,
484
485
];
485
486
486
487
foreach ($ testMarkers as $ marker ) {
You can’t perform that action at this time.
0 commit comments