| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 10 | 
| Code Lines | 5 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 3 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 27 | public function giveBack(UuidInterface $reservationId) | ||
| 28 |     { | ||
| 29 | $reservation = $this->reservations->get($reservationId); | ||
| 30 | |||
| 31 |         if (!$reservation->isGivenAway()) { | ||
| 32 |             throw new CannotGiveBackReservationWhichWasNotGivenAway(sprintf('Cannot give back reservation %s which was not given away.', $reservation->id())); | ||
| 33 | } | ||
| 34 | |||
| 35 | $this->reservations->remove($reservationId); | ||
| 36 | } | ||
| 37 | } | ||
| 38 |