Conditions | 7 |
Paths | 5 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 7 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | 6 | public function listen(\ReflectionClass $class): void |
|
30 | { |
||
31 | 6 | if ($class->isAbstract() || $class->isEnum() || $class->isTrait()) { |
|
32 | 3 | return; |
|
33 | } |
||
34 | |||
35 | 3 | foreach ($class->getMethods() as $method) { |
|
36 | 3 | if ($method->getDeclaringClass()->getName() !== $class->getName()) { |
|
37 | 1 | continue; |
|
38 | } |
||
39 | |||
40 | 2 | if ($attribute = $this->reader->firstFunctionMetadata($method, $this->attribute)) { |
|
41 | 1 | $this->methods[] = new ReflectionMethodWithAttribute($method, $attribute); |
|
42 | } |
||
46 |