| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 14 | 19 | public function onControllerArguments(ControllerArgumentsEvent $event): void |
|
| 15 | { |
||
| 16 | 19 | $request = $event->getRequest(); |
|
| 17 | |||
| 18 | 19 | $key = ConstraintViolationListValueResolver::REQUEST_ATTR_KEY; |
|
| 19 | |||
| 20 | 19 | if ($request->attributes->has($key)) { |
|
| 21 | /** @var ConstraintViolationList $violationList */ |
||
| 22 | 6 | $violationList = $request->attributes->get($key); |
|
| 23 | |||
| 24 | 6 | if ($violationList->count() > 0) { |
|
| 25 | 3 | throw new RequestDtoValidationException($violationList, 'Bad Request'); |
|
| 26 | } |
||
| 30 |