From afb385fe5d574517b2a89ef39764b99f33d07a75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Sun, 15 Nov 2026 20:11:37 +0100 Subject: [PATCH] fix(Timeslots): correct assertion for timeslotList type Updated the assertion in the constructor to ensure all elements of $timeslotList are instances of PickupTimeSlot. --- .../Queries/Timeslots/GetAvailableTimeslotsQueryOutput.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Cqs/Queries/Timeslots/GetAvailableTimeslotsQueryOutput.php b/app/Cqs/Queries/Timeslots/GetAvailableTimeslotsQueryOutput.php index 39883a6e..82793250 100644 --- a/app/Cqs/Queries/Timeslots/GetAvailableTimeslotsQueryOutput.php +++ b/app/Cqs/Queries/Timeslots/GetAvailableTimeslotsQueryOutput.php @@ -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' ); }