| Conditions | 3 |
| Paths | 3 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3.0416 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 49 | 501 | public function getAnnotations(ReflectionProperty $target, string $name): Generator |
|
| 50 | { |
||
| 51 | 501 | if (PHP_MAJOR_VERSION < 8) { |
|
| 52 | return; |
||
| 53 | } |
||
| 54 | |||
| 55 | 501 | $attributes = $target->getAttributes($name, ReflectionAttribute::IS_INSTANCEOF); |
|
| 56 | 501 | foreach ($attributes as $attribute) { |
|
| 57 | 55 | yield $attribute->newInstance(); |
|
| 58 | } |
||
| 61 |