From 4f508c063241d0df0a1471a02145daf9b4c7a37e Mon Sep 17 00:00:00 2001 From: "matthieu.rolland" Date: Tue, 1 Aug 2023 15:07:09 +0200 Subject: [PATCH] update phpstan --- phpstan-tmp-legacy-layout-baseline.neon | 10 ---------- src/PrestaShopBundle/Twig/Component/SearchForm.php | 4 ++-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/phpstan-tmp-legacy-layout-baseline.neon b/phpstan-tmp-legacy-layout-baseline.neon index 7d363f25fa03e..e073c469736fb 100644 --- a/phpstan-tmp-legacy-layout-baseline.neon +++ b/phpstan-tmp-legacy-layout-baseline.neon @@ -34,13 +34,3 @@ parameters: message: "#^Namespace Link is forbidden, No legacy calls inside the prestashop bundle\\. Please create an interface and an adapter if you need to\\.$#" count: 1 path: src/PrestaShopBundle/Twig/Component/QuickAccess.php - - - - message: "#^Class Link is forbidden, No legacy calls inside the prestashop bundle\\. Please create an interface and an adapter if you need to\\.$#" - count: 1 - path: src/PrestaShopBundle/Twig/Component/SearchForm.php - - - - message: "#^Namespace Link is forbidden, No legacy calls inside the prestashop bundle\\. Please create an interface and an adapter if you need to\\.$#" - count: 1 - path: src/PrestaShopBundle/Twig/Component/SearchForm.php diff --git a/src/PrestaShopBundle/Twig/Component/SearchForm.php b/src/PrestaShopBundle/Twig/Component/SearchForm.php index cc82978d0f012..1db33ca65d93f 100644 --- a/src/PrestaShopBundle/Twig/Component/SearchForm.php +++ b/src/PrestaShopBundle/Twig/Component/SearchForm.php @@ -48,8 +48,8 @@ public function __construct(private readonly RequestStack $requestStack) public function mount(): void { $request = $this->requestStack->getCurrentRequest(); - $this->boQuery = $request->query->get(self::BO_QUERY_PARAM) ?: ''; - $this->searchType = (int) $request->query->get(self::BO_SEARCH_TYPE_PARAM) ?: 0; + $this->boQuery = $request->query->get(self::BO_QUERY_PARAM, ''); + $this->searchType = (int) $request->query->get(self::BO_SEARCH_TYPE_PARAM, 0); $this->showClearBtn = !empty($this->boQuery); } }