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()
18291829 T_CALLABLE => T_CALLABLE ,
18301830 T_PARENT => T_PARENT ,
18311831 T_SELF => T_SELF ,
1832+ T_STATIC => T_STATIC ,
18321833 ];
18331834
18341835 $ 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;
7575/* testArrayReturnType */
7676fn (array $ a ) : array => $ a ;
7777
78+ /* testStaticReturnType */
79+ fn (array $ a ) : static => $ a ;
80+
7881/* testTernary */
7982$ fn = fn ($ a ) => $ a ? /* testTernaryThen */ fn () : string => 'a ' : /* testTernaryElse */ fn () : string => 'b ' ;
8083
Original file line number Diff line number Diff line change @@ -466,7 +466,7 @@ public function testNullableNamespace()
466466
467467
468468 /**
469- * Test arrow functions that use self/parent/callable return types.
469+ * Test arrow functions that use self/parent/callable/array/static return types.
470470 *
471471 * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional
472472 *
@@ -481,6 +481,7 @@ public function testKeywordReturnTypes()
481481 'Parent ' ,
482482 'Callable ' ,
483483 'Array ' ,
484+ 'Static ' ,
484485 ];
485486
486487 foreach ($ testMarkers as $ marker ) {
You can’t perform that action at this time.
0 commit comments