| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 52 | 541 | public function getAnnotations(string $name, $holder): Generator |
|
| 53 | { |
||
| 54 | // @codeCoverageIgnoreStart |
||
| 55 | if (PHP_MAJOR_VERSION < 8) { |
||
| 56 | return; |
||
| 57 | } // @codeCoverageIgnoreEnd |
||
| 58 | |||
| 59 | 541 | $attributes = $holder->getAttributes($name, ReflectionAttribute::IS_INSTANCEOF); |
|
| 60 | 541 | foreach ($attributes as $attribute) { |
|
| 61 | 50 | yield $attribute->newInstance(); |
|
| 62 | } |
||
| 65 |