| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | 7 | private function collectAttributes(ReflectionClass $classMeta): array |
|
| 42 | { |
||
| 43 | 7 | $rules = []; |
|
| 44 | 7 | foreach ($classMeta->getProperties() as $property) { |
|
| 45 | 6 | $attributes = $property->getAttributes(RuleInterface::class, ReflectionAttribute::IS_INSTANCEOF); |
|
| 46 | 6 | foreach ($attributes as $attribute) { |
|
| 47 | 4 | $rules[$property->getName()][] = $attribute->newInstance(); |
|
| 48 | } |
||
| 49 | } |
||
| 50 | |||
| 51 | 7 | return $rules; |
|
| 52 | } |
||
| 54 |