From d6d5bd4001c861aa11e8966d71b510c1327ba577 Mon Sep 17 00:00:00 2001 From: Matthijs Iriks Date: Mon, 27 Jan 2025 13:31:33 +0100 Subject: [PATCH] [REFACTOR][SCOSA-329] Added PHPMD suppress warnings for unused formal parms --- .../Store/App/Request/StorePathInfoValidator.php | 1 + .../UrlRewrite/Model/StoreSwitcher/RewriteUrl.php | 1 + Plugin/Store/App/Request/PathInfoProcessor.php | 14 +++++++++++--- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Plugin/Magento/Store/App/Request/StorePathInfoValidator.php b/Plugin/Magento/Store/App/Request/StorePathInfoValidator.php index 9f9d904..31b24ec 100644 --- a/Plugin/Magento/Store/App/Request/StorePathInfoValidator.php +++ b/Plugin/Magento/Store/App/Request/StorePathInfoValidator.php @@ -77,6 +77,7 @@ public function __construct( * @param $request * @param string $pathInfo * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterGetValidStoreCode( \Magento\Store\App\Request\StorePathInfoValidator $subject, diff --git a/Plugin/Magento/UrlRewrite/Model/StoreSwitcher/RewriteUrl.php b/Plugin/Magento/UrlRewrite/Model/StoreSwitcher/RewriteUrl.php index 9b3a2bb..bb48a09 100644 --- a/Plugin/Magento/UrlRewrite/Model/StoreSwitcher/RewriteUrl.php +++ b/Plugin/Magento/UrlRewrite/Model/StoreSwitcher/RewriteUrl.php @@ -50,6 +50,7 @@ public function __construct( * @param $redirectUrl * @return array * @throws \Magento\Framework\Exception\LocalizedException + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforeSwitch( \Magento\UrlRewrite\Model\StoreSwitcher\RewriteUrl $subject, diff --git a/Plugin/Store/App/Request/PathInfoProcessor.php b/Plugin/Store/App/Request/PathInfoProcessor.php index f28f34a..679312b 100644 --- a/Plugin/Store/App/Request/PathInfoProcessor.php +++ b/Plugin/Store/App/Request/PathInfoProcessor.php @@ -38,9 +38,9 @@ class PathInfoProcessor * @var \Experius\MultipleWebsiteStoreCodeUrl\Helper\Settings */ private $settings; - + /** - * @var Data + * @var Data */ protected $data; @@ -60,8 +60,16 @@ public function __construct( $this->data = $data; } + /** + * @param \Magento\Store\App\Request\PathInfoProcessor $subject + * @param callable $proceed + * @param RequestInterface $request + * @param $pathInfo + * @return mixed + * @throws \Magento\Framework\Exception\LocalizedException + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function aroundProcess( - /** @noinspection PhpUnusedParameterInspection */ \Magento\Store\App\Request\PathInfoProcessor $subject, callable $proceed, RequestInterface $request,