File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 55use PhpParser \Node \Expr \MethodCall ;
66use PHPStan \Analyser \Scope ;
77use PHPStan \Reflection \MethodReflection ;
8+ use PHPStan \Type \MixedType ;
89use PHPStan \Type \ObjectType ;
910use PHPStan \Type \Type ;
1011use PHPStan \Type \TypeCombinator ;
@@ -32,23 +33,24 @@ public function getTypeFromMethodCall(
3233 Scope $ scope
3334 ): Type
3435 {
36+ $ mixedType = new MixedType ();
3537 if (count ($ methodCall ->args ) === 0 ) {
36- return $ methodReflection -> getReturnType () ;
38+ return $ mixedType ;
3739 }
3840 $ arg = $ methodCall ->args [0 ]->value ;
3941 if (!($ arg instanceof \PhpParser \Node \Expr \ClassConstFetch)) {
40- return $ methodReflection -> getReturnType () ;
42+ return $ mixedType ;
4143 }
4244
4345 $ class = $ arg ->class ;
4446 if (!($ class instanceof \PhpParser \Node \Name)) {
45- return $ methodReflection -> getReturnType () ;
47+ return $ mixedType ;
4648 }
4749
4850 $ class = (string ) $ class ;
4951
5052 if ($ class === 'static ' ) {
51- return $ methodReflection -> getReturnType () ;
53+ return $ mixedType ;
5254 }
5355
5456 if ($ class === 'self ' ) {
You can’t perform that action at this time.
0 commit comments