@@ -52,14 +52,14 @@ public static function looksLikeFunctionCall(File $file, int $position): bool
5252 $ types [] = T_VARIABLE ;
5353
5454 if (
55- ! in_array ($ code , $ types , true )
55+ !in_array ($ code , $ types , true )
5656 || (($ code === T_VARIABLE ) && Scopes::isOOProperty ($ file , $ position ))
5757 ) {
5858 return false ;
5959 }
6060
6161 $ callOpen = $ file ->findNext (Tokens::$ emptyTokens , $ position + 1 , null , true , null , true );
62- if (! $ callOpen || $ tokens [$ callOpen ]['code ' ] !== T_OPEN_PARENTHESIS ) {
62+ if (!$ callOpen || $ tokens [$ callOpen ]['code ' ] !== T_OPEN_PARENTHESIS ) {
6363 return false ;
6464 }
6565
@@ -158,7 +158,7 @@ public static function countYieldInBody(File $file, int $position): int
158158 */
159159 public static function isPsrMethod (File $ file , int $ position ): bool
160160 {
161- if (! Scopes::isOOMethod ($ file , $ position )) {
161+ if (!Scopes::isOOMethod ($ file , $ position )) {
162162 return false ;
163163 }
164164
@@ -167,7 +167,7 @@ public static function isPsrMethod(File $file, int $position): bool
167167
168168 $ classPos = Conditions::getLastCondition ($ file , $ position , $ scopes );
169169 $ type = is_int ($ classPos ) ? ($ tokens [$ classPos ]['code ' ] ?? null ) : null ;
170- if (! in_array ($ type , $ scopes , true )) {
170+ if (!in_array ($ type , $ scopes , true )) {
171171 return false ;
172172 }
173173
@@ -209,7 +209,7 @@ public static function isNonDeclarableDocBlockType(array $docTypes, bool $return
209209 // If "never" is there, this is valid for return types and PHP < 8.1,
210210 // not valid for argument types.
211211 if (in_array ('never ' , $ docTypes , true )) {
212- return $ return && ! $ is81 ;
212+ return $ return && !$ is81 ;
213213 }
214214
215215 if ($ count > 1 ) {
@@ -219,8 +219,8 @@ public static function isNonDeclarableDocBlockType(array $docTypes, bool $return
219219 }
220220 // Union type without null, valid if we're not on PHP < 8.0, or on PHP < 8.2 and
221221 // there's an intersection (DNF)
222- if (! in_array ('null ' , $ docTypes , true )) {
223- return ! $ is80 || (! $ is82 && $ isIntersection );
222+ if (!in_array ('null ' , $ docTypes , true )) {
223+ return !$ is80 || (!$ is82 && $ isIntersection );
224224 }
225225 $ docTypes = array_diff ($ docTypes , ['null ' ]);
226226 $ count = count ($ docTypes );
@@ -229,16 +229,16 @@ public static function isNonDeclarableDocBlockType(array $docTypes, bool $return
229229 // Union type with "null" plus something else, valid if we're not on PHP < 8.0 or
230230 // on PHP < 8.2 and there's an intersection (DNF)
231231 if ($ count > 1 ) {
232- return ! $ is80 || (! $ is82 && $ isIntersection );
232+ return !$ is80 || (!$ is82 && $ isIntersection );
233233 }
234234
235235 $ singleDocType = reset ($ docTypes );
236236
237237 // If the single type is "mixed" is valid if we are on PHP < 8.0.
238238 // If the single type is "null" is valid if we are on PHP < 8.2.
239239 // If the single is an intersection, is valid if we are on PHP < 8.1
240- return (($ singleDocType === 'mixed ' ) && ! $ is80 )
241- || (($ singleDocType === 'null ' ) && ! $ is82 )
242- || ($ isIntersection && ! $ is81 );
240+ return (($ singleDocType === 'mixed ' ) && !$ is80 )
241+ || (($ singleDocType === 'null ' ) && !$ is82 )
242+ || ($ isIntersection && !$ is81 );
243243 }
244244}
0 commit comments