Total Complexity | 4 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
16 | final class NetteReflectionEngine implements \MyTester\IAnnotationsReaderEngine |
||
17 | { |
||
18 | 1 | public function hasAnnotation(string $name, $class, string $method = null): bool |
|
19 | { |
||
20 | 1 | if ($method !== null) { |
|
21 | 1 | $reflection = new Method($class, $method); |
|
22 | } else { |
||
23 | 1 | $reflection = ClassType::from($class); |
|
24 | } |
||
25 | 1 | return $reflection->hasAnnotation($name); |
|
26 | } |
||
27 | |||
28 | 1 | public function getAnnotation(string $name, $class, string $method = null) |
|
36 | } |
||
37 | } |
||
38 |