1 | <?php |
||
30 | class AnnotationScanMatcher extends AbstractMatcher |
||
31 | { |
||
32 | /** @var AnnotationReader */ |
||
33 | private $reader; |
||
34 | |||
35 | /** |
||
36 | * ScanMatcher constructor. |
||
37 | */ |
||
38 | public function __construct() |
||
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | public function matchesClass(\ReflectionClass $class, array $arguments) |
||
52 | |||
53 | /** |
||
54 | * @param \ReflectionClass $class |
||
55 | * @param $annotation |
||
56 | * |
||
57 | * @return bool |
||
58 | */ |
||
59 | private function has(\ReflectionClass $class, $annotation): bool |
||
74 | |||
75 | /** |
||
76 | * @param \ReflectionMethod $method |
||
77 | * @param array $arguments |
||
78 | * |
||
79 | * @return bool |
||
80 | * @throws \ReflectionException |
||
81 | */ |
||
82 | public function matchesMethod(\ReflectionMethod $method, array $arguments): bool |
||
88 | } |
||
89 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.