| Conditions | 1 |
| Paths | 1 |
| Total Lines | 5 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 42 | 29 | public static function getAttributes(\ReflectionProperty|\ReflectionClass|\ReflectionMethod|\ReflectionFunction|\ReflectionParameter $target, string $attributeClass): array |
|
| 43 | { |
||
| 44 | 29 | return ArrayList::collect($target->getAttributes($attributeClass, \ReflectionAttribute::IS_INSTANCEOF)) |
|
| 45 | 29 | ->map(static fn (\ReflectionAttribute $a) => $a->newInstance()) |
|
| 46 | 29 | ->toArray() |
|
| 47 | ; |
||
| 50 |