| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2.0185 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | 2 | protected function validateValue($value, ValidationContext $context = null): Result |
|
| 23 | { |
||
| 24 | 2 | if (!$context) { |
|
| 25 | throw new InvalidArgumentException('Context must be set.'); |
||
| 26 | } |
||
| 27 | |||
| 28 | 2 | $results = $this->getValidator()->validate($value, $this->getRules()); |
|
| 29 | 2 | $this->addResultSet($results, $context->getAttribute() ?? ''); |
|
| 30 | |||
| 31 | 2 | return new Result(); |
|
| 32 | } |
||
| 34 |