Conditions | 2 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
19 | public function respondToJson(ServerRequestInterface $request): ResponseInterface |
||
20 | { |
||
21 | $message = $request->getAttribute(ActionHandler::ATTR_STATUS_MESSAGE, 'Internal server error.'); |
||
22 | $statusCode = $request->getAttribute(ActionHandler::ATTR_STATUS_CODE, self::STATUS_INTERNAL_SERVER_ERROR); |
||
23 | $errors = $request->getAttribute(ActionHandler::ATTR_ERRORS, []); |
||
24 | |||
25 | return new JsonResponse( |
||
26 | ['message' => $message] + (!empty($errors) ? ['errors' => $errors] : []), |
||
27 | $statusCode |
||
28 | ); |
||
31 |
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