@@ -57,7 +57,7 @@ public function isStaticMethodSupported(
57
57
'allNotSame ' => 2 ,
58
58
];
59
59
return array_key_exists ($ staticMethodReflection ->getName (), $ methods )
60
- && count ($ node ->args ) >= $ methods [$ staticMethodReflection ->getName ()];
60
+ && count ($ node ->getArgs () ) >= $ methods [$ staticMethodReflection ->getName ()];
61
61
}
62
62
63
63
$ trimmedName = self ::trimName ($ staticMethodReflection ->getName ());
@@ -70,7 +70,7 @@ public function isStaticMethodSupported(
70
70
$ resolver = $ resolvers [$ trimmedName ];
71
71
$ resolverReflection = new \ReflectionObject ($ resolver );
72
72
73
- return count ($ node ->args ) >= (count ($ resolverReflection ->getMethod ('__invoke ' )->getParameters ()) - 1 );
73
+ return count ($ node ->getArgs () ) >= (count ($ resolverReflection ->getMethod ('__invoke ' )->getParameters ()) - 1 );
74
74
}
75
75
76
76
private static function trimName (string $ name ): string
@@ -99,7 +99,7 @@ public function specifyTypes(
99
99
$ scope
100
100
);
101
101
}
102
- $ expression = self ::createExpression ($ scope , $ staticMethodReflection ->getName (), $ node ->args );
102
+ $ expression = self ::createExpression ($ scope , $ staticMethodReflection ->getName (), $ node ->getArgs () );
103
103
if ($ expression === null ) {
104
104
return new SpecifiedTypes ([], []);
105
105
}
@@ -466,34 +466,34 @@ private function handleAllNot(
466
466
if ($ methodName === 'allNotNull ' ) {
467
467
return $ this ->arrayOrIterable (
468
468
$ scope ,
469
- $ node ->args [0 ]->value ,
469
+ $ node ->getArgs () [0 ]->value ,
470
470
function (Type $ type ): Type {
471
471
return TypeCombinator::removeNull ($ type );
472
472
}
473
473
);
474
474
}
475
475
476
476
if ($ methodName === 'allNotInstanceOf ' ) {
477
- $ classType = $ scope ->getType ($ node ->args [1 ]->value );
477
+ $ classType = $ scope ->getType ($ node ->getArgs () [1 ]->value );
478
478
if (!$ classType instanceof ConstantStringType) {
479
479
return new SpecifiedTypes ([], []);
480
480
}
481
481
482
482
$ objectType = new ObjectType ($ classType ->getValue ());
483
483
return $ this ->arrayOrIterable (
484
484
$ scope ,
485
- $ node ->args [0 ]->value ,
485
+ $ node ->getArgs () [0 ]->value ,
486
486
function (Type $ type ) use ($ objectType ): Type {
487
487
return TypeCombinator::remove ($ type , $ objectType );
488
488
}
489
489
);
490
490
}
491
491
492
492
if ($ methodName === 'allNotSame ' ) {
493
- $ valueType = $ scope ->getType ($ node ->args [1 ]->value );
493
+ $ valueType = $ scope ->getType ($ node ->getArgs () [1 ]->value );
494
494
return $ this ->arrayOrIterable (
495
495
$ scope ,
496
- $ node ->args [0 ]->value ,
496
+ $ node ->getArgs () [0 ]->value ,
497
497
function (Type $ type ) use ($ valueType ): Type {
498
498
return TypeCombinator::remove ($ type , $ valueType );
499
499
}
0 commit comments