| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 37 | public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next) |
||
| 38 | { |
||
| 39 | if (null === $trackingId = $request->getAttribute('trackingId')) { |
||
| 40 | return new EmptyResponse(404); |
||
| 41 | } |
||
| 42 | |||
| 43 | try { |
||
| 44 | $cargoRoutingDto = $this->bookingService->loadCargoForRouting($trackingId); |
||
| 45 | |||
| 46 | return new JsonResponse($cargoRoutingDto->getArrayCopy()); |
||
| 47 | } catch (CargoNotFoundException $e) { |
||
| 48 | return new EmptyResponse(404); |
||
| 49 | } |
||
| 50 | } |
||
| 51 | } |
||
| 52 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.