@@ -88,11 +88,11 @@ public function getThrowTypeFromConstructor(MethodReflection $methodReflection,
8888 private function resolveReflectionClass (New_ $ newNode , Scope $ scope ): Type
8989 {
9090 $ reflectionExceptionType = new ObjectType (ReflectionException::class);
91- if (!isset ($ newNode ->args [0 ])) {
91+ if (!isset ($ newNode ->getArgs () [0 ])) {
9292 return $ reflectionExceptionType ;
9393 }
9494
95- $ valueType = $ this ->resolveType ($ newNode ->args [0 ]->value , $ scope );
95+ $ valueType = $ this ->resolveType ($ newNode ->getArgs () [0 ]->value , $ scope );
9696 foreach (TypeUtils::getConstantStrings ($ valueType ) as $ constantString ) {
9797 if (!$ this ->broker ->hasClass ($ constantString ->getValue ())) {
9898 return $ reflectionExceptionType ;
@@ -111,11 +111,11 @@ private function resolveReflectionClass(New_ $newNode, Scope $scope): Type
111111 private function resolveReflectionFunction (New_ $ newNode , Scope $ scope ): Type
112112 {
113113 $ reflectionExceptionType = new ObjectType (ReflectionException::class);
114- if (!isset ($ newNode ->args [0 ])) {
114+ if (!isset ($ newNode ->getArgs () [0 ])) {
115115 return $ reflectionExceptionType ;
116116 }
117117
118- $ valueType = $ this ->resolveType ($ newNode ->args [0 ]->value , $ scope );
118+ $ valueType = $ this ->resolveType ($ newNode ->getArgs () [0 ]->value , $ scope );
119119 foreach (TypeUtils::getConstantStrings ($ valueType ) as $ constantString ) {
120120 if (!$ this ->broker ->hasFunction (new Name ($ constantString ->getValue ()), $ scope )) {
121121 return $ reflectionExceptionType ;
@@ -148,12 +148,12 @@ private function resolveReflectionMethod(New_ $newNode, Scope $scope): Type
148148 private function resolveReflectionMethodOrProperty (New_ $ newNode , Scope $ scope , callable $ existenceChecker ): Type
149149 {
150150 $ reflectionExceptionType = new ObjectType (ReflectionException::class);
151- if (!isset ($ newNode ->args [1 ])) {
151+ if (!isset ($ newNode ->getArgs () [1 ])) {
152152 return $ reflectionExceptionType ;
153153 }
154154
155- $ valueType = $ this ->resolveType ($ newNode ->args [0 ]->value , $ scope );
156- $ propertyType = $ this ->resolveType ($ newNode ->args [1 ]->value , $ scope );
155+ $ valueType = $ this ->resolveType ($ newNode ->getArgs () [0 ]->value , $ scope );
156+ $ propertyType = $ this ->resolveType ($ newNode ->getArgs () [1 ]->value , $ scope );
157157 foreach (TypeUtils::getConstantStrings ($ valueType ) as $ constantString ) {
158158 try {
159159 $ classReflection = $ this ->broker ->getClass ($ constantString ->getValue ());
@@ -188,11 +188,11 @@ private function resolveReflectionMethodOrProperty(New_ $newNode, Scope $scope,
188188 private function resolveReflectionExtension (New_ $ newNode , Scope $ scope ): Type
189189 {
190190 $ reflectionExceptionType = new ObjectType (ReflectionException::class);
191- if (!isset ($ newNode ->args [0 ])) {
191+ if (!isset ($ newNode ->getArgs () [0 ])) {
192192 return $ reflectionExceptionType ;
193193 }
194194
195- $ valueType = $ this ->resolveType ($ newNode ->args [0 ]->value , $ scope );
195+ $ valueType = $ this ->resolveType ($ newNode ->getArgs () [0 ]->value , $ scope );
196196 foreach (TypeUtils::getConstantStrings ($ valueType ) as $ constantString ) {
197197 if (!extension_loaded ($ constantString ->getValue ())) {
198198 return $ reflectionExceptionType ;
0 commit comments