| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 26 | public function getAnnotation(string $name, string|object $class, string $method = null): mixed |
||
| 27 | { |
||
| 28 | $attributes = $this->getReflection($class, $method)->getAttributes($this->getClassName($name)); |
||
| 29 | if (count($attributes) === 0) { |
||
| 30 | return null; |
||
| 31 | } |
||
| 32 | /** @var BaseAttribute $attribute */ |
||
| 33 | $attribute = $attributes[0]->newInstance(); |
||
| 34 | return $attribute->value; |
||
| 35 | } |
||
| 55 |