wip: refactor
This commit is contained in:
@@ -8,7 +8,7 @@ use App\BusProNet\Model\PersonalData;
|
||||
use App\BusProNet\Model\Travel;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
class BookingEditDto
|
||||
class BookingEditDto implements BookingDtoInterface
|
||||
{
|
||||
public ?Booking $booking = null;
|
||||
public ?Travel $travel = null;
|
||||
@@ -63,4 +63,24 @@ class BookingEditDto
|
||||
{
|
||||
return 'O' === $this->booking->status;
|
||||
}
|
||||
|
||||
public function getParticipants(): array
|
||||
{
|
||||
return $this->participants;
|
||||
}
|
||||
|
||||
public function getTravel(): Travel
|
||||
{
|
||||
return $this->travel;
|
||||
}
|
||||
|
||||
public function hasParticipant(int $index): bool
|
||||
{
|
||||
return isset($this->participants[$index]);
|
||||
}
|
||||
|
||||
public function getParticipant(int $index): ?ParticipantDto
|
||||
{
|
||||
return $this->participants[$index] ?? null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user