Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | public function __invoke(Request $request, int $id): JsonResponse |
||
23 | { |
||
24 | $order = $this->entityManager->getRepository(Order::class)->find($id); |
||
25 | if (!$order) { |
||
26 | return new JsonResponse(['error' => 'Order not found'], 404); |
||
27 | } |
||
28 | |||
29 | $data = json_decode($request->getContent(), true); |
||
30 | $printType = $data['print-type'] ?? 'pos'; |
||
31 | $deviceType = $data['device-type'] ?? 'cielo'; |
||
32 | |||
33 | $printData = $this->print->generatePrintData($order, $printType, $deviceType); |
||
34 | |||
35 | return new JsonResponse($printData); |
||
36 | } |
||
38 |
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