From 07559b87e57a4cb8479be0199368cebee65ad4b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Fri, 14 Aug 2026 12:18:55 +0200 Subject: [PATCH] refactor(request): simplify brands filtering logic Streamlined the filtering of brands in the IncoSheetsIndexRequest. --- .../Requests/IncoSheets/IncoSheetsIndexRequest.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Presentation/Api/V1/Http/Requests/IncoSheets/IncoSheetsIndexRequest.php b/src/Presentation/Api/V1/Http/Requests/IncoSheets/IncoSheetsIndexRequest.php index 43d798f..9d61cb1 100644 --- a/src/Presentation/Api/V1/Http/Requests/IncoSheets/IncoSheetsIndexRequest.php +++ b/src/Presentation/Api/V1/Http/Requests/IncoSheets/IncoSheetsIndexRequest.php @@ -65,14 +65,12 @@ final class IncoSheetsIndexRequest extends FormRequest $since = $this->filled('since') ? DatesHelper::parseDateTime($this->string('since')->value()) : null; $brands = []; - $rawBrands = $this->input('brands'); - if (is_array($rawBrands)) { - foreach ($rawBrands as $b) { - if (is_string($b) || is_numeric($b)) { - $val = trim((string) $b); - if ($val !== '') { - $brands[] = $val; - } + $rawBrands = $this->array('brands'); + foreach ($rawBrands as $b) { + if (is_string($b) || is_numeric($b)) { + $val = trim((string) $b); + if ($val !== '') { + $brands[] = $val; } } }