@@ -69,13 +69,13 @@ public function process(File $phpcsFile, mixed $stackPtr): void
6969 }
7070
7171 // Check blank lines before statement
72- $ prevTokenPtr = $ phpcsFile ->findPrevious (Tokens::$ emptyTokens , $ stackPtr - 1 , null , true );
72+ $ prevTokenPtr = $ phpcsFile ->findPrevious (Tokens::EMPTY_TOKENS , $ stackPtr - 1 , null , true );
7373 $ prevToken = $ phpcsFile ->getTokens ()[$ prevTokenPtr ];
7474
7575 if (($ prevToken ['code ' ] === T_EQUAL || $ prevToken ['code ' ] === T_RETURN || $ prevToken ['code ' ] === T_DOUBLE_ARROW ) && $ stackToken ['code ' ] === T_MATCH ) {
7676 // Use "match" construction.
7777 $ firstTokenPtr = PhpCsUtils::findFirstTokenOnLine ($ phpcsFile , $ stackToken ['line ' ]);
78- $ prevTokenPtr = $ phpcsFile ->findPrevious (Tokens::$ emptyTokens , $ firstTokenPtr - 1 , null , true );
78+ $ prevTokenPtr = $ phpcsFile ->findPrevious (Tokens::EMPTY_TOKENS , $ firstTokenPtr - 1 , null , true );
7979 $ prevToken = $ phpcsFile ->getTokens ()[$ prevTokenPtr ];
8080 }
8181
@@ -92,14 +92,14 @@ public function process(File $phpcsFile, mixed $stackPtr): void
9292
9393 // Check blank lines after
9494 $ scopeCloserPtr = $ stackToken ['scope_closer ' ];
95- $ nextTokenPtr = $ phpcsFile ->findNext (Tokens::$ emptyTokens , $ scopeCloserPtr + 1 , null , true );
95+ $ nextTokenPtr = $ phpcsFile ->findNext (Tokens::EMPTY_TOKENS , $ scopeCloserPtr + 1 , null , true );
9696
9797 if ($ nextTokenPtr ) {
9898 $ nextToken = $ phpcsFile ->getTokens ()[$ nextTokenPtr ];
9999
100100 if ($ nextToken ['code ' ] === T_SEMICOLON && $ stackToken ['code ' ] === T_MATCH ) {
101101 // Use "match" construction.
102- $ nextTokenPtr = $ phpcsFile ->findNext (Tokens::$ emptyTokens , $ nextTokenPtr + 1 , null , true );
102+ $ nextTokenPtr = $ phpcsFile ->findNext (Tokens::EMPTY_TOKENS , $ nextTokenPtr + 1 , null , true );
103103 $ nextToken = $ nextTokenPtr ? $ phpcsFile ->getTokens ()[$ nextTokenPtr ] : null ;
104104 }
105105
0 commit comments