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 5
5
use PhpParser \Node \Expr \MethodCall ;
6
6
use PHPStan \Analyser \Scope ;
7
7
use PHPStan \Reflection \MethodReflection ;
8
+ use PHPStan \Type \MixedType ;
8
9
use PHPStan \Type \ObjectType ;
9
10
use PHPStan \Type \Type ;
10
11
use PHPStan \Type \TypeCombinator ;
@@ -32,23 +33,24 @@ public function getTypeFromMethodCall(
32
33
Scope $ scope
33
34
): Type
34
35
{
36
+ $ mixedType = new MixedType ();
35
37
if (count ($ methodCall ->args ) === 0 ) {
36
- return $ methodReflection -> getReturnType () ;
38
+ return $ mixedType ;
37
39
}
38
40
$ arg = $ methodCall ->args [0 ]->value ;
39
41
if (!($ arg instanceof \PhpParser \Node \Expr \ClassConstFetch)) {
40
- return $ methodReflection -> getReturnType () ;
42
+ return $ mixedType ;
41
43
}
42
44
43
45
$ class = $ arg ->class ;
44
46
if (!($ class instanceof \PhpParser \Node \Name)) {
45
- return $ methodReflection -> getReturnType () ;
47
+ return $ mixedType ;
46
48
}
47
49
48
50
$ class = (string ) $ class ;
49
51
50
52
if ($ class === 'static ' ) {
51
- return $ methodReflection -> getReturnType () ;
53
+ return $ mixedType ;
52
54
}
53
55
54
56
if ($ class === 'self ' ) {
You can’t perform that action at this time.
0 commit comments