/** {@inheritdoc} */
public function existsAlreadyGivenOfBook(UuidInterface $bookId)
{
/** @var Reservation $reservation */
foreach ($this->file->getAll() as $reservation) {
if ($reservation->bookId()->equals($bookId) && $reservation->isGivenAway()) {
return true;
}
}
return false;
}