@@ -1560,7 +1560,7 @@ public function getMethodParameters($stackPtr)
15601560 $ paramCount ++;
15611561 break ;
15621562 case T_EQUAL :
1563- $ defaultStart = $ this ->findNext (Tokens::$ emptyTokens , ($ i + 1 ), null , true );
1563+ $ defaultStart = $ this ->findNext (Tokens::EMPTY_TOKENS , ($ i + 1 ), null , true );
15641564 $ equalToken = $ i ;
15651565 break ;
15661566 }//end switch
@@ -1676,7 +1676,7 @@ public function getMethodProperties($stackPtr)
16761676 $ scopeOpener = $ this ->tokens [$ stackPtr ]['scope_opener ' ];
16771677 }
16781678
1679- $ valid = Tokens::$ nameTokens ;
1679+ $ valid = Tokens::NAME_TOKENS ;
16801680 $ valid += [
16811681 T_CALLABLE => T_CALLABLE ,
16821682 T_SELF => T_SELF ,
@@ -1794,7 +1794,7 @@ public function getMemberProperties($stackPtr)
17941794 $ conditions = array_keys ($ conditions );
17951795 $ ptr = array_pop ($ conditions );
17961796 if (isset ($ this ->tokens [$ ptr ]) === false
1797- || isset (Tokens::$ ooScopeTokens [$ this ->tokens [$ ptr ]['code ' ]]) === false
1797+ || isset (Tokens::OO_SCOPE_TOKENS [$ this ->tokens [$ ptr ]['code ' ]]) === false
17981798 || $ this ->tokens [$ ptr ]['code ' ] === T_ENUM
17991799 ) {
18001800 throw new RuntimeException ('$stackPtr is not a class member var ' );
@@ -1822,7 +1822,7 @@ public function getMemberProperties($stackPtr)
18221822 T_FINAL => T_FINAL ,
18231823 ];
18241824
1825- $ valid += Tokens::$ emptyTokens ;
1825+ $ valid += Tokens::EMPTY_TOKENS ;
18261826
18271827 $ scope = 'public ' ;
18281828 $ scopeSpecified = false ;
@@ -1877,7 +1877,7 @@ public function getMemberProperties($stackPtr)
18771877
18781878 if ($ i < $ stackPtr ) {
18791879 // We've found a type.
1880- $ valid = Tokens::$ nameTokens ;
1880+ $ valid = Tokens::NAME_TOKENS ;
18811881 $ valid += [
18821882 T_CALLABLE => T_CALLABLE ,
18831883 T_SELF => T_SELF ,
@@ -2014,7 +2014,7 @@ public function isReference($stackPtr)
20142014 }
20152015
20162016 $ tokenBefore = $ this ->findPrevious (
2017- Tokens::$ emptyTokens ,
2017+ Tokens::EMPTY_TOKENS ,
20182018 ($ stackPtr - 1 ),
20192019 null ,
20202020 true
@@ -2038,14 +2038,14 @@ public function isReference($stackPtr)
20382038 return true ;
20392039 }
20402040
2041- if (isset (Tokens::$ assignmentTokens [$ this ->tokens [$ tokenBefore ]['code ' ]]) === true ) {
2041+ if (isset (Tokens::ASSIGNMENT_TOKENS [$ this ->tokens [$ tokenBefore ]['code ' ]]) === true ) {
20422042 // This is directly after an assignment. It's a reference. Even if
20432043 // it is part of an operation, the other tests will handle it.
20442044 return true ;
20452045 }
20462046
20472047 $ tokenAfter = $ this ->findNext (
2048- Tokens::$ emptyTokens ,
2048+ Tokens::EMPTY_TOKENS ,
20492049 ($ stackPtr + 1 ),
20502050 null ,
20512051 true
@@ -2084,8 +2084,8 @@ public function isReference($stackPtr)
20842084 if ($ this ->tokens [$ tokenAfter ]['code ' ] === T_VARIABLE ) {
20852085 return true ;
20862086 } else {
2087- $ skip = Tokens::$ emptyTokens ;
2088- $ skip += Tokens::$ nameTokens ;
2087+ $ skip = Tokens::EMPTY_TOKENS ;
2088+ $ skip += Tokens::NAME_TOKENS ;
20892089 $ skip [] = T_SELF ;
20902090 $ skip [] = T_PARENT ;
20912091 $ skip [] = T_STATIC ;
@@ -2309,7 +2309,7 @@ public function findNext(
23092309 */
23102310 public function findStartOfStatement ($ start , $ ignore =null )
23112311 {
2312- $ startTokens = Tokens::$ blockOpeners ;
2312+ $ startTokens = Tokens::BLOCK_OPENERS ;
23132313 $ startTokens [T_OPEN_SHORT_ARRAY ] = true ;
23142314 $ startTokens [T_OPEN_TAG ] = true ;
23152315 $ startTokens [T_OPEN_TAG_WITH_ECHO ] = true ;
@@ -2395,7 +2395,7 @@ public function findStartOfStatement($start, $ignore=null)
23952395 // If it is the scope opener, go the first non-empty token after. $start will have been part of the first condition.
23962396 if ($ prevMatch <= $ this ->tokens [$ matchExpression ]['scope_opener ' ]) {
23972397 // We're before the arrow in the first case.
2398- $ next = $ this ->findNext (Tokens::$ emptyTokens , ($ this ->tokens [$ matchExpression ]['scope_opener ' ] + 1 ), null , true );
2398+ $ next = $ this ->findNext (Tokens::EMPTY_TOKENS , ($ this ->tokens [$ matchExpression ]['scope_opener ' ] + 1 ), null , true );
23992399 if ($ next === false ) {
24002400 // Shouldn't be possible.
24012401 return $ start ;
@@ -2412,7 +2412,7 @@ public function findStartOfStatement($start, $ignore=null)
24122412 }
24132413
24142414 // In both cases, go to the first non-empty token after.
2415- $ next = $ this ->findNext (Tokens::$ emptyTokens , ($ prevMatch + 1 ), null , true );
2415+ $ next = $ this ->findNext (Tokens::EMPTY_TOKENS , ($ prevMatch + 1 ), null , true );
24162416 if ($ next === false ) {
24172417 // Shouldn't be possible.
24182418 return $ start ;
@@ -2480,7 +2480,7 @@ public function findStartOfStatement($start, $ignore=null)
24802480 }
24812481 }//end if
24822482
2483- if (isset (Tokens::$ emptyTokens [$ this ->tokens [$ i ]['code ' ]]) === false ) {
2483+ if (isset (Tokens::EMPTY_TOKENS [$ this ->tokens [$ i ]['code ' ]]) === false ) {
24842484 $ lastNotEmpty = $ i ;
24852485 }
24862486 }//end for
@@ -2575,7 +2575,7 @@ public function findEndOfStatement($start, $ignore=null)
25752575 continue ;
25762576 }
25772577
2578- if ($ i === $ start && isset (Tokens::$ scopeOpeners [$ this ->tokens [$ i ]['code ' ]]) === true ) {
2578+ if ($ i === $ start && isset (Tokens::SCOPE_OPENERS [$ this ->tokens [$ i ]['code ' ]]) === true ) {
25792579 return $ this ->tokens [$ i ]['scope_closer ' ];
25802580 }
25812581
@@ -2595,7 +2595,7 @@ public function findEndOfStatement($start, $ignore=null)
25952595 }
25962596 }//end if
25972597
2598- if (isset (Tokens::$ emptyTokens [$ this ->tokens [$ i ]['code ' ]]) === false ) {
2598+ if (isset (Tokens::EMPTY_TOKENS [$ this ->tokens [$ i ]['code ' ]]) === false ) {
25992599 $ lastNotEmpty = $ i ;
26002600 }
26012601 }//end for
@@ -2778,7 +2778,7 @@ public function findExtendedClassName($stackPtr)
27782778 return false ;
27792779 }
27802780
2781- $ find = Tokens::$ nameTokens ;
2781+ $ find = Tokens::NAME_TOKENS ;
27822782 $ find [] = T_WHITESPACE ;
27832783
27842784 $ end = $ this ->findNext ($ find , ($ extendsIndex + 1 ), ($ classOpenerIndex + 1 ), true );
@@ -2827,7 +2827,7 @@ public function findImplementedInterfaceNames($stackPtr)
28272827 return false ;
28282828 }
28292829
2830- $ find = Tokens::$ nameTokens ;
2830+ $ find = Tokens::NAME_TOKENS ;
28312831 $ find [] = T_WHITESPACE ;
28322832 $ find [] = T_COMMA ;
28332833
0 commit comments