| Total Complexity | 3 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 14.29% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | class RangeStrategy extends LengthStrategy |
||
| 19 | { |
||
| 20 | protected function generateArguments(array $config): array |
||
| 21 | { |
||
| 22 | $parent = parent::generateArguments($config); |
||
| 23 | $current = [ |
||
| 24 | 'invalidDateTimeMessage' => $config['invalid_datetime_message'] ?? null, |
||
| 25 | 'invalidMessage' => $config['invalid_message'] ?? null, |
||
| 26 | 'maxPropertyPath' => $config['property_path_max'] ?? null, |
||
| 27 | 'minPropertyPath' => $config['property_path_min'] ?? null, |
||
| 28 | 'notInRangeMessage' => $config['message_not_in_range'] ?? null, |
||
| 29 | ]; |
||
| 30 | |||
| 31 | return array_filter(array_merge($parent, $current)); |
||
| 32 | } |
||
| 33 | |||
| 34 | 1 | protected function getValidatorProperty(): string |
|
| 35 | { |
||
| 36 | 1 | return 'range'; |
|
| 37 | } |
||
| 38 | |||
| 39 | protected function getAttributeClassName(): string |
||
| 42 | } |
||
| 43 | } |
||
| 44 |