From c46e17a121302556f04f7f53c39c9ca103cfce41 Mon Sep 17 00:00:00 2001 From: Vincent Pietri Date: Mon, 2 Dec 2024 14:02:52 +0100 Subject: [PATCH] Finalize remove mixed types --- Block/Tab/Panel.php | 4 +--- Helper/Register.php | 19 +++++++++++-------- .../LayoutGenerateBlocksAfterObserver.php | 2 +- Plugin/Framework/App/Cache.php | 3 +-- .../FrontController/BuiltinPlugin.php | 7 ++++--- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Block/Tab/Panel.php b/Block/Tab/Panel.php index 0f821c5..67076d8 100644 --- a/Block/Tab/Panel.php +++ b/Block/Tab/Panel.php @@ -30,11 +30,9 @@ public function __construct( } /** - * Used only in phtml - * * @param $key * @param $index - * @return array|\Magento\Framework\DataObject|mixed|string|null + * @return array|\Magento\Framework\DataObject|string|null * @throws \Exception */ public function getData($key = '', $index = null) diff --git a/Helper/Register.php b/Helper/Register.php index 5c61dd5..e46c1f0 100644 --- a/Helper/Register.php +++ b/Helper/Register.php @@ -103,7 +103,7 @@ public function getContextData() } /** - * @return mixed + * @return \Magento\Framework\DataObject|null */ public function getObservers() { @@ -111,7 +111,7 @@ public function getObservers() } /** - * @return mixed + * @return \Magento\Framework\DataObject|null */ public function getEvents() { @@ -119,18 +119,15 @@ public function getEvents() } /** - * @return mixed + * @return \Magento\Framework\DataObject|null */ public function getCollections() { return $this->getRegisteredData('collections'); } - /** - * @return array - */ /** - * @return mixed + * @return \Magento\Framework\DataObject|null */ public function getModels() { @@ -138,18 +135,24 @@ public function getModels() } /** - * @return mixed + * @return \Magento\Framework\DataObject|null */ public function getBlocks() { return $this->getRegisteredData('blocks'); } + /** + * @return \Magento\Framework\DataObject|null + */ public function getLayoutHandles() { return $this->getRegisteredData('layout_handles'); } + /** + * @return \Magento\Framework\DataObject|null + */ public function getLayoutHierarchy() { return $this->getRegisteredData('layout_tree_blocks_hierarchy'); diff --git a/Observer/LayoutGenerateBlocksAfterObserver.php b/Observer/LayoutGenerateBlocksAfterObserver.php index ef8c411..45be9e0 100644 --- a/Observer/LayoutGenerateBlocksAfterObserver.php +++ b/Observer/LayoutGenerateBlocksAfterObserver.php @@ -47,7 +47,7 @@ public function execute(Observer $observer) /** * @param \Magento\Framework\View\LayoutInterface $layout - * @return mixed + * @return array */ protected function getHandles($layout) { diff --git a/Plugin/Framework/App/Cache.php b/Plugin/Framework/App/Cache.php index 63272cc..18b5230 100644 --- a/Plugin/Framework/App/Cache.php +++ b/Plugin/Framework/App/Cache.php @@ -25,14 +25,13 @@ public function beforeLoad(CacheInterface $subject, string $identifier) $this->cacheService->addCache('load', $identifier); } - /** * @param CacheInterface $subject * @param string $data * @param string $identifier * @param array $tags * @param $lifeTime - * @return mixed + * @return void */ public function beforeSave( CacheInterface $subject, diff --git a/Plugin/PageCache/FrontController/BuiltinPlugin.php b/Plugin/PageCache/FrontController/BuiltinPlugin.php index 63175c9..e1d094c 100644 --- a/Plugin/PageCache/FrontController/BuiltinPlugin.php +++ b/Plugin/PageCache/FrontController/BuiltinPlugin.php @@ -16,12 +16,14 @@ class BuiltinPlugin */ private $cacheService; + /** + * @param \ADM\QuickDevBar\Service\App\Cache $cacheService + */ public function __construct(\ADM\QuickDevBar\Service\App\Cache $cacheService) { $this->cacheService = $cacheService; } - /** * @param PageCache $subject * @param string $identifier @@ -31,14 +33,13 @@ public function beforeLoad(PageCache $subject, string $identifier) $this->cacheService->addCache('load', $identifier); } - /** * @param PageCache $subject * @param string $data * @param string $identifier * @param array $tags * @param $lifeTime - * @return mixed + * @return void */ public function beforeSave( PageCache $subject,