Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
41 | public function __invoke(ServerRequestInterface $request, ResponseInterface $response) |
||
|
|||
42 | { |
||
43 | $data = $request->getParsedBody(); |
||
44 | |||
45 | Assertion::keyExists($data, 'origin'); |
||
46 | Assertion::keyExists($data, 'destination'); |
||
47 | |||
48 | $trackingId = $this->bookingService->bookNewCargo($data['origin'], $data['destination']); |
||
49 | |||
50 | return new JsonResponse(['trackingId' => $trackingId]); |
||
51 | } |
||
52 | } |
||
53 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.