From 2ed36df9f1954a1c2e155c65298e42f605d8f416 Mon Sep 17 00:00:00 2001 From: Akolzin Dmitry Date: Thu, 21 Mar 2019 10:10:39 +0300 Subject: [PATCH] Delete duplicate injection --- src/Block/Frontend/DaemonCollector.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Block/Frontend/DaemonCollector.php b/src/Block/Frontend/DaemonCollector.php index 27f45d5..2775cf7 100644 --- a/src/Block/Frontend/DaemonCollector.php +++ b/src/Block/Frontend/DaemonCollector.php @@ -6,7 +6,6 @@ class DaemonCollector extends \Magento\Framework\View\Element\Template { private $customer; private $helper; - private $storeManager; private $storeResolver; private $js = ''; @@ -23,7 +22,6 @@ EOT; * * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Store\Api\StoreResolverInterface $storeResolver * @param \Retailcrm\Retailcrm\Helper\Data $helper * @param array $data @@ -31,14 +29,12 @@ EOT; public function __construct( \Magento\Framework\View\Element\Template\Context $context, \Magento\Customer\Model\Session $customerSession, - \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Store\Api\StoreResolverInterface $storeResolver, \Retailcrm\Retailcrm\Helper\Data $helper, array $data = [] ) { parent::__construct($context, $data); $this->customer = $customerSession->getCustomer(); - $this->storeManager = $storeManager; $this->storeResolver = $storeResolver; $this->helper = $helper; } @@ -64,7 +60,7 @@ EOT; try { $siteKey = $this->helper->getSiteKey( - $this->storeManager->getStore( + $this->_storeManager->getStore( $this->storeResolver->getCurrentStoreId() )->getWebsiteId() );