| Total Complexity | 5 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | final class ConstraintsHelper |
||
| 15 | 15 | { |
|
| 16 | public static function createCollection(array $fields, bool $allowExtraFields = true, bool $allowMissingFields = true): Collection |
||
| 17 | 15 | { |
|
| 18 | return new Collection(fields: $fields, allowExtraFields: $allowExtraFields, allowMissingFields: $allowMissingFields); |
||
| 19 | } |
||
| 20 | |||
| 21 | 17 | /** @return array<Constraint> */ |
|
| 22 | public static function fromProperty(\ReflectionProperty $rProperty): array |
||
| 23 | 17 | { |
|
| 24 | 17 | return AttributeHelper::getAttributes($rProperty, Constraint::class); |
|
| 25 | 17 | } |
|
| 26 | |||
| 27 | public static function getArrayTypeAttribute(\ReflectionProperty $rProperty): ?ArrayType |
||
| 30 | } |
||
| 31 | |||
| 32 | public static function hasArrayTypeAttribute(\ReflectionProperty $rProperty): bool |
||
| 37 |