/** * @param $reservationId * @return Response */ public function deleteReservationsAction($reservationId) { try { $this->library->giveBackBookFromReservation(Uuid::fromString($reservationId)); } catch (CannotGiveBackReservationWhichWasNotGivenAway $e) { return new JsonResponse(null, Response::HTTP_BAD_REQUEST); } return new Response(null, Response::HTTP_NO_CONTENT); }
/** * @When /^I list reservations for book "([^"]*)"$/ */ public function iListReservationsForBook($bookId) { $this->project(function () use($bookId) { return $this->library->listReservationsForBook(Uuid::fromString($bookId)); }); }