55use PHP_CodeSniffer \Files \File ;
66
77class Helpers {
8- public static function findContainingOpeningBracket (File $ phpcsFile , int $ stackPtr ) {
8+ public static function findContainingOpeningBracket (File $ phpcsFile , $ stackPtr ) {
99 $ tokens = $ phpcsFile ->getTokens ();
1010 if (isset ($ tokens [$ stackPtr ]['nested_parenthesis ' ])) {
1111 $ openPtrs = array_keys ($ tokens [$ stackPtr ]['nested_parenthesis ' ]);
@@ -14,7 +14,7 @@ public static function findContainingOpeningBracket(File $phpcsFile, int $stackP
1414 return false ;
1515 }
1616
17- public static function findParenthesisOwner (File $ phpcsFile , int $ stackPtr ) {
17+ public static function findParenthesisOwner (File $ phpcsFile , $ stackPtr ) {
1818 $ tokens = $ phpcsFile ->getTokens ();
1919 return $ phpcsFile ->findPrevious (T_WHITESPACE , $ stackPtr - 1 , null , true );
2020 }
@@ -40,7 +40,7 @@ public static function areAnyConditionsAClass(array $conditions) {
4040 return false ;
4141 }
4242
43- public static function findPreviousFunctionPtr (File $ phpcsFile , int $ openPtr ) {
43+ public static function findPreviousFunctionPtr (File $ phpcsFile , $ openPtr ) {
4444 // Function names are T_STRING, and return-by-reference is T_BITWISE_AND,
4545 // so we look backwards from the opening bracket for the first thing that
4646 // isn't a function name, reference sigil or whitespace and check if it's a
@@ -49,7 +49,7 @@ public static function findPreviousFunctionPtr(File $phpcsFile, int $openPtr) {
4949 return $ phpcsFile ->findPrevious ($ functionPtrTypes , $ openPtr - 1 , null , true , null , true );
5050 }
5151
52- public static function findFunctionCall (File $ phpcsFile , int $ stackPtr ) {
52+ public static function findFunctionCall (File $ phpcsFile , $ stackPtr ) {
5353 $ tokens = $ phpcsFile ->getTokens ();
5454
5555 $ openPtr = Helpers::findContainingOpeningBracket ($ phpcsFile , $ stackPtr );
@@ -103,7 +103,7 @@ public static function findFunctionCallArguments(File $phpcsFile, $stackPtr) {
103103 return $ argPtrs ;
104104 }
105105
106- public static function findWhereAssignExecuted (File $ phpcsFile , int $ stackPtr ) {
106+ public static function findWhereAssignExecuted (File $ phpcsFile , $ stackPtr ) {
107107 $ tokens = $ phpcsFile ->getTokens ();
108108
109109 // Write should be recorded at the next statement to ensure we treat the
@@ -132,7 +132,7 @@ public static function findWhereAssignExecuted(File $phpcsFile, int $stackPtr) {
132132 return $ assignEndTokens [0 ];
133133 }
134134
135- public static function isNextThingAnAssign (File $ phpcsFile , int $ stackPtr ) {
135+ public static function isNextThingAnAssign (File $ phpcsFile , $ stackPtr ) {
136136 $ tokens = $ phpcsFile ->getTokens ();
137137
138138 // Is the next non-whitespace an assignment?
@@ -149,7 +149,7 @@ public static function normalizeVarName($varName) {
149149 return preg_replace ('/[{}$]/ ' , '' , $ varName );
150150 }
151151
152- public static function findFunctionPrototype (File $ phpcsFile , int $ stackPtr ) {
152+ public static function findFunctionPrototype (File $ phpcsFile , $ stackPtr ) {
153153 $ tokens = $ phpcsFile ->getTokens ();
154154 $ token = $ tokens [$ stackPtr ];
155155
@@ -164,7 +164,7 @@ public static function findFunctionPrototype(File $phpcsFile, int $stackPtr) {
164164 return false ;
165165 }
166166
167- public static function findVariableScope (File $ phpcsFile , int $ stackPtr ) {
167+ public static function findVariableScope (File $ phpcsFile , $ stackPtr ) {
168168 $ tokens = $ phpcsFile ->getTokens ();
169169 $ token = $ tokens [$ stackPtr ];
170170
0 commit comments