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