File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,12 @@ final class VersionResolver
1919 * @api
2020 * @var string
2121 */
22- public const PACKAGE_VERSION = 'd98976ca59bbe6b5e5252bb90994dfaa05ec3b08 ' ;
22+ public const PACKAGE_VERSION = '3e0d7e1134c80a01d038e0cbf089c6a366d7fb91 ' ;
2323 /**
2424 * @api
2525 * @var string
2626 */
27- public const RELEASE_DATE = '2025-12-08 22:19:13 ' ;
27+ public const RELEASE_DATE = '2025-12-08 22:57:18 ' ;
2828 /**
2929 * @var int
3030 */
Original file line number Diff line number Diff line change 1616use PhpParser \Node \Name ;
1717use PhpParser \Node \Stmt \Class_ ;
1818use PhpParser \Node \Stmt \ClassLike ;
19+ use PhpParser \Node \Stmt \ClassMethod ;
1920use PHPStan \Analyser \Scope ;
2021use PHPStan \Reflection \ClassReflection ;
2122use PHPStan \Reflection \FunctionReflection ;
@@ -197,6 +198,19 @@ public function resolveFunctionLikeReflectionFromCall(CallLike $callLike)
197198 // todo: support NullsafeMethodCall
198199 return null ;
199200 }
201+ /**
202+ * @api used in rector-laravel
203+ */
204+ public function resolveMethodReflectionFromClassMethod (ClassMethod $ classMethod , Scope $ scope ): ?MethodReflection
205+ {
206+ $ classReflection = $ scope ->getClassReflection ();
207+ if (!$ classReflection instanceof ClassReflection) {
208+ return null ;
209+ }
210+ $ className = $ classReflection ->getName ();
211+ $ methodName = $ this ->nodeNameResolver ->getName ($ classMethod );
212+ return $ this ->resolveMethodReflection ($ className , $ methodName , $ scope );
213+ }
200214 public function resolveMethodReflectionFromNew (New_ $ new ): ?MethodReflection
201215 {
202216 $ newClassType = $ this ->nodeTypeResolver ->getType ($ new ->class );
You can’t perform that action at this time.
0 commit comments