1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Prado\PHPStan; |
4
|
|
|
|
5
|
|
|
use PHPStan\Type\Generic\TemplateTypeMap; |
|
|
|
|
6
|
|
|
use PHPStan\Reflection\ClassReflection; |
|
|
|
|
7
|
|
|
use PHPStan\Reflection\ClassMemberReflection; |
|
|
|
|
8
|
|
|
use PHPStan\Reflection\FunctionVariant; |
|
|
|
|
9
|
|
|
use PHPStan\Reflection\MethodReflection; |
|
|
|
|
10
|
|
|
use PHPStan\Reflection\ParametersAcceptor; |
|
|
|
|
11
|
|
|
use PHPStan\Reflection\Php\DummyParameter; |
|
|
|
|
12
|
|
|
use PHPStan\TrinaryLogic; |
|
|
|
|
13
|
|
|
use PHPStan\Type\Type; |
|
|
|
|
14
|
|
|
use PHPStan\Type\MixedType; |
|
|
|
|
15
|
|
|
|
16
|
|
|
class DynamicMethodReflection implements MethodReflection |
17
|
|
|
{ |
18
|
|
|
private $_classReflection; |
19
|
|
|
private $_methodName; |
20
|
|
|
|
21
|
|
|
public function __construct(ClassReflection $classReflection, string $methodName) |
22
|
|
|
{ |
23
|
|
|
$this->_classReflection = $classReflection; |
24
|
|
|
$this->_methodName = $methodName; |
25
|
|
|
} |
26
|
|
|
|
27
|
|
|
public function getDeclaringClass(): ClassReflection |
28
|
|
|
{ |
29
|
|
|
return $this->_classReflection; |
30
|
|
|
} |
31
|
|
|
|
32
|
|
|
public function isStatic(): bool |
33
|
|
|
{ |
34
|
|
|
return false; |
35
|
|
|
} |
36
|
|
|
|
37
|
|
|
public function isPrivate(): bool |
38
|
|
|
{ |
39
|
|
|
return false; |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
public function isPublic(): bool |
43
|
|
|
{ |
44
|
|
|
return true; |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
public function getDocComment(): ?string |
48
|
|
|
{ |
49
|
|
|
return null; |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
public function getName(): string |
53
|
|
|
{ |
54
|
|
|
return $this->_methodName; |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
public function getPrototype(): ClassMemberReflection |
58
|
|
|
{ |
59
|
|
|
return $this; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @return \PHPStan\Reflection\ParametersAcceptor[] |
64
|
|
|
*/ |
65
|
|
|
public function getVariants(): array |
66
|
|
|
{ |
67
|
|
|
return [ |
68
|
|
|
new FunctionVariant( |
69
|
|
|
TemplateTypeMap::createEmpty(), |
70
|
|
|
TemplateTypeMap::createEmpty(), |
71
|
|
|
[], |
72
|
|
|
true, |
73
|
|
|
new MixedType() |
74
|
|
|
), |
75
|
|
|
]; |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
public function isDeprecated(): TrinaryLogic |
79
|
|
|
{ |
80
|
|
|
return TrinaryLogic::createNo(); |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
public function getDeprecatedDescription(): ?string |
84
|
|
|
{ |
85
|
|
|
return null; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
public function isFinal(): TrinaryLogic |
89
|
|
|
{ |
90
|
|
|
return TrinaryLogic::createNo(); |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
public function isInternal(): TrinaryLogic |
94
|
|
|
{ |
95
|
|
|
return TrinaryLogic::createNo(); |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
public function getThrowType(): ?Type |
99
|
|
|
{ |
100
|
|
|
return null; |
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
public function hasSideEffects(): TrinaryLogic |
104
|
|
|
{ |
105
|
|
|
return TrinaryLogic::createMaybe(); |
106
|
|
|
} |
107
|
|
|
} |
108
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths