Conditions | 1 |
Paths | 1 |
Total Lines | 30 |
Code Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
37 | 4 | #[Route( |
|
38 | path: '/version', |
||
39 | methods: [Request::METHOD_GET], |
||
40 | )] |
||
41 | #[OA\Get( |
||
42 | operationId: 'version', |
||
43 | responses: [ |
||
44 | new OA\Response( |
||
45 | response: 200, |
||
46 | description: 'success', |
||
47 | content: new JsonContent( |
||
48 | properties: [ |
||
49 | new Property( |
||
50 | property: 'version', |
||
51 | description: 'Version number of the API in semver format', |
||
52 | type: 'string', |
||
53 | ), |
||
54 | ], |
||
55 | type: 'object', |
||
56 | example: [ |
||
57 | 'version' => '1.2.3', |
||
58 | ], |
||
59 | ), |
||
60 | ), |
||
61 | ], |
||
62 | )] |
||
63 | public function __invoke(): JsonResponse |
||
64 | { |
||
65 | 4 | return new JsonResponse([ |
|
66 | 4 | 'version' => $this->version->get(), |
|
67 | 4 | ]); |
|
70 |
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