| Total Complexity | 8 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class AnyOf extends AbstractRule |
||
| 17 | { |
||
| 18 | protected bool $strict = false; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * {@inheritDoc} |
||
| 22 | */ |
||
| 23 | public function fillParameters(array $params): Rule |
||
| 24 | { |
||
| 25 | 2 | return $this->fillAllowedValuesParameters($params); |
|
| 26 | } |
||
| 27 | |||
| 28 | public function values(array $values): static |
||
| 29 | { |
||
| 30 | 2 | $this->params['allowed_values'] = $values; |
|
| 31 | |||
| 32 | 2 | return $this; |
|
| 33 | } |
||
| 34 | |||
| 35 | public function separator(string $char): static |
||
| 36 | { |
||
| 37 | 2 | $this->params['separator'] = $char; |
|
| 38 | |||
| 39 | 2 | return $this; |
|
| 40 | } |
||
| 41 | |||
| 42 | public function strict(bool $strict = true): static |
||
| 43 | { |
||
| 44 | 2 | $this->strict = $strict; |
|
| 45 | |||
| 46 | 2 | return $this; |
|
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * {@inheritDoc} |
||
| 51 | */ |
||
| 52 | public function check($value): bool |
||
| 64 | } |
||
| 65 | } |
||
| 66 |