| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | public function __invoke(ManagerRegistry $registry, SerializerInterface $serializer): Response |
||
| 25 | { |
||
| 26 | $data = (new DoctrineCompanyRepository($registry))->findAll(); |
||
| 27 | |||
| 28 | if ([] !== $data) { |
||
| 29 | $companies = $serializer->serialize($data, 'json'); |
||
| 30 | |||
| 31 | $response = new Response($companies); |
||
| 32 | $response->setStatusCode(Response::HTTP_OK); |
||
| 33 | $response->headers->set('Content-Type', 'application/json'); |
||
| 34 | |||
| 35 | return $response; |
||
| 36 | } |
||
| 37 | |||
| 38 | return new Response('No data found', Response::HTTP_ACCEPTED); |
||
| 39 | } |
||
| 41 |
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