2026-09-30 10:54:23 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2026-11-10 14:28:00 +01:00
|
|
|
namespace App\Cqs\Queries\Timeslots;
|
2026-09-30 10:54:23 +02:00
|
|
|
|
|
|
|
|
use Domain\Models\ValueObjects\PickupTimeSlot;
|
|
|
|
|
use Webmozart\Assert\Assert;
|
|
|
|
|
|
|
|
|
|
final readonly class GetAvailableTimeslotsQueryOutput
|
|
|
|
|
{
|
|
|
|
|
/** @param PickupTimeSlot[] $timeslotList */
|
|
|
|
|
public function __construct(
|
|
|
|
|
public array $timeslotList,
|
|
|
|
|
) {
|
2026-11-15 20:11:37 +01:00
|
|
|
Assert::allIsInstanceOf(
|
2026-09-30 10:54:23 +02:00
|
|
|
$this->timeslotList,
|
2026-11-15 20:11:37 +01:00
|
|
|
PickupTimeSlot::class,
|
2026-09-30 10:54:23 +02:00
|
|
|
'All elements of $timeslotList must be instances of PickupTimeSlot'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|