| Total Complexity | 2 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 3 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 13 | final class AnnotatedWithMatcher extends AbstractMatcher |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * {@inheritDoc} |
||
| 17 | */ |
||
| 18 | public function matchesClass(ReflectionClass $class, array $arguments): bool |
||
| 19 | { |
||
| 20 | assert($class instanceof \Ray\Aop\ReflectionClass); |
||
| 21 | 5 | /** @var array<class-string> $arguments */ |
|
| 22 | [$annotation] = $arguments; |
||
| 23 | 5 | /** @psalm-suppress MixedAssignment $annotation */ |
|
| 24 | 5 | $annotation = $class->getAnnotation($annotation); |
|
| 25 | 5 | ||
| 26 | return (bool) $annotation; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | 2 | * {@inheritDoc} |
|
| 31 | */ |
||
| 32 | 2 | public function matchesMethod(ReflectionMethod $method, array $arguments): bool |
|
| 41 | 3 | } |
|
| 42 | } |
||
| 43 |