| 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 |
||
| 32 | 3 | protected function validateValue($value, ValidationContext $context = null): Result |
|
| 33 | { |
||
| 34 | 3 | $result = new Result(); |
|
| 35 | |||
| 36 | 3 | if (!is_iterable($value)) { |
|
| 37 | $result->addError($this->formatMessage($this->iterableMessage)); |
||
| 38 | return $result; |
||
| 39 | } |
||
| 40 | |||
| 41 | 3 | if (!ArrayHelper::isSubset($value, $this->range, $this->strict)) { |
|
| 42 | 1 | $result->addError($this->formatMessage($this->subsetMessage)); |
|
| 43 | } |
||
| 44 | |||
| 45 | 3 | return $result; |
|
| 46 | } |
||
| 68 |