22
33declare (strict_types=1 );
44
5+ /*
6+ * This file is part of Flarum.
7+ *
8+ * For detailed copyright and license information, please view the
9+ * LICENSE file that was distributed with this source code.
10+ */
11+
512namespace Flarum \PHPStan \Methods ;
613
14+ use Flarum \PHPStan \Reflection \EloquentBuilderMethodReflection ;
715use Illuminate \Database \Eloquent \Builder as EloquentBuilder ;
816use Illuminate \Database \Eloquent \Model ;
917use Illuminate \Database \Eloquent \SoftDeletes ;
10- use Flarum \PHPStan \Reflection \EloquentBuilderMethodReflection ;
1118use PHPStan \Analyser \OutOfClassScope ;
1219use PHPStan \Reflection \ClassReflection ;
1320use PHPStan \Reflection \MethodReflection ;
@@ -131,7 +138,8 @@ private function findMethod(ClassReflection $classReflection, string $methodName
131138 $ returnType = $ parametersAcceptor ->getReturnType ();
132139
133140 return new EloquentBuilderMethodReflection (
134- $ methodName , $ classReflection ,
141+ $ methodName ,
142+ $ classReflection ,
135143 $ ref ,
136144 $ parametersAcceptor ->getParameters (),
137145 $ returnType ,
@@ -142,7 +150,8 @@ private function findMethod(ClassReflection $classReflection, string $methodName
142150 // Returning custom reflection
143151 // to ensure return type is always `EloquentBuilder<Model>`
144152 return new EloquentBuilderMethodReflection (
145- $ methodName , $ classReflection ,
153+ $ methodName ,
154+ $ classReflection ,
146155 $ ref ,
147156 $ parametersAcceptor ->getParameters (),
148157 new GenericObjectType ($ classReflection ->getName (), [$ modelType ]),
0 commit comments