Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | public function kernelView(GetResponseForControllerResultEvent $event) |
||
37 | { |
||
38 | $request = $event->getRequest(); |
||
39 | |||
40 | if ($request->attributes->get('_api_resource_class') !== Submission::class) { |
||
41 | return; |
||
42 | } |
||
43 | |||
44 | if ('post' !== $request->attributes->get('_api_collection_operation_name')) { |
||
45 | return; |
||
46 | } |
||
47 | |||
48 | $submission = $event->getControllerResult(); |
||
49 | $violations = []; |
||
50 | |||
51 | if (!$this->submissionService->isValid($submission, $violations)) { |
||
52 | $list = new ConstraintViolationList($violations); |
||
53 | throw new ValidationException($list, 'An error occurred'); |
||
54 | } |
||
57 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths