fix(Timeslots): correct assertion for timeslotList type
Updated the assertion in the constructor to ensure all elements of $timeslotList are instances of PickupTimeSlot.
This commit is contained in:
parent
6a599b9855
commit
afb385fe5d
1 changed files with 2 additions and 2 deletions
|
|
@ -13,9 +13,9 @@ final readonly class GetAvailableTimeslotsQueryOutput
|
|||
public function __construct(
|
||||
public array $timeslotList,
|
||||
) {
|
||||
Assert::allInArray(
|
||||
Assert::allIsInstanceOf(
|
||||
$this->timeslotList,
|
||||
fn ($value) => $value instanceof PickupTimeSlot,
|
||||
PickupTimeSlot::class,
|
||||
'All elements of $timeslotList must be instances of PickupTimeSlot'
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue