| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3.1406 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | 3 | protected function validateValue($value, ValidationContext $context = null): Result |
|
| 31 | { |
||
| 32 | 3 | $result = new Result(); |
|
| 33 | |||
| 34 | 3 | if (!is_iterable($value)) { |
|
| 35 | $result->addError($this->formatMessage($this->iterableMessage)); |
||
| 36 | return $result; |
||
| 37 | } |
||
| 38 | |||
| 39 | 3 | if (!ArrayHelper::isSubset($value, $this->range, $this->strict)) { |
|
| 40 | 1 | $result->addError($this->formatMessage($this->subsetMessage)); |
|
| 41 | } |
||
| 42 | |||
| 43 | 3 | return $result; |
|
| 44 | } |
||
| 66 |