Total Complexity | 2 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
12 | final class AnnotatedWithMatcher extends AbstractMatcher |
||
13 | { |
||
14 | /** |
||
15 | * {@inheritdoc} |
||
16 | */ |
||
17 | public function matchesClass(ReflectionClass $class, array $arguments): bool |
||
18 | { |
||
19 | /** @var array<class-string> $arguments */ |
||
20 | [$annotation] = $arguments; |
||
21 | 5 | $annotation = ServiceLocator::getReader()->getClassAnnotation($class, $annotation); |
|
22 | |||
23 | 5 | return (bool) $annotation; |
|
24 | 5 | } |
|
25 | 5 | ||
26 | /** |
||
27 | * {@inheritdoc} |
||
28 | */ |
||
29 | public function matchesMethod(ReflectionMethod $method, array $arguments): bool |
||
36 | } |
||
37 | } |
||
38 |