@@ -178,7 +178,7 @@ public function getStaticMethodReturnType(StaticMethodCallEvent $event): ?Type
178178 public function getPropertyType (PropertyFetchEvent $ event ): ?Type
179179 {
180180 return match ($ event ->name ) {
181- 'resource ' => JsonResourceHelper::modelType ($ event ->getDefinition (), $ event -> scope ),
181+ 'resource ' => JsonResourceHelper::modelType ($ event ->getDefinition ()),
182182 default => ! $ event ->getDefinition () || $ event ->getDefinition ()->hasPropertyDefinition ($ event ->name )
183183 ? null
184184 : $ this ->getModelPropertyType ($ event ->getDefinition (), $ event ->name , $ event ->scope ),
@@ -190,7 +190,7 @@ private function getModelPropertyType(ClassDefinition $jsonResourceDefinition, s
190190 return ReferenceTypeResolver::getInstance ()->resolve (
191191 $ scope ,
192192 new PropertyFetchReferenceType (
193- JsonResourceHelper::modelType ($ jsonResourceDefinition, $ scope ),
193+ JsonResourceHelper::modelType ($ jsonResourceDefinition ),
194194 $ name ,
195195 ),
196196 );
@@ -203,7 +203,7 @@ private function proxyMethodCallToModel(MethodCallEvent $event): Type
203203
204204 private function getModelMethodReturn (string $ resourceClassName , string $ methodName , ArgumentTypeBag $ arguments , Scope $ scope ): Type
205205 {
206- $ modelType = JsonResourceHelper::modelType ($ scope ->index ->getClass ($ resourceClassName ), $ scope );
206+ $ modelType = JsonResourceHelper::modelType ($ scope ->index ->getClass ($ resourceClassName ));
207207
208208 $ argumentsList = $ arguments instanceof AutoResolvingArgumentTypeBag
209209 ? $ arguments ->allUnresolved ()
0 commit comments