| Conditions | 4 |
| Paths | 10 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function __invoke(File $data): Response |
||
| 23 | { |
||
| 24 | |||
| 25 | try { |
||
| 26 | |||
| 27 | if ($data->getFileType() == 'text' && $data->getExtension() == 'html') { |
||
| 28 | |||
| 29 | $data->setFileType('application'); |
||
| 30 | $data->setExtension('pdf'); |
||
| 31 | $data->setContent($this->pdf->convertHtmlToPdf($data->getContent())); |
||
| 32 | $this->em->persist($data); |
||
| 33 | $this->em->flush(); |
||
| 34 | } |
||
| 35 | return new JsonResponse($this->hydratorService->data($data, 'file:read'), Response::HTTP_OK); |
||
| 36 | } catch (Exception $e) { |
||
| 37 | return new JsonResponse($this->hydratorService->error($e)); |
||
| 38 | } |
||
| 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