From d55178407fc63c32c29f57d399f0bf2ae45ad5c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Fri, 18 Sep 2026 10:35:18 +0200 Subject: [PATCH] refactor(employees): use array helper for siteIds in EmployeesIndexRequest --- .../Http/Requests/Employees/EmployeesIndexRequest.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Presentation/Api/V1/Http/Requests/Employees/EmployeesIndexRequest.php b/src/Presentation/Api/V1/Http/Requests/Employees/EmployeesIndexRequest.php index 0521bb2..37a6a6b 100644 --- a/src/Presentation/Api/V1/Http/Requests/Employees/EmployeesIndexRequest.php +++ b/src/Presentation/Api/V1/Http/Requests/Employees/EmployeesIndexRequest.php @@ -54,12 +54,10 @@ final class EmployeesIndexRequest extends FormRequest $service = $this->filled('serviceId') ? new ServiceId($this->string('serviceId')->value()) : null; $sites = []; - $rawSiteIds = $this->input('siteIds'); - if (is_array($rawSiteIds)) { - foreach ($rawSiteIds as $s) { - if (is_string($s) && $s !== '') { - $sites[] = new SiteId($s); - } + $rawSiteIds = $this->array('siteIds'); + foreach ($rawSiteIds as $s) { + if (is_string($s) && $s !== '') { + $sites[] = new SiteId($s); } }