Skip to content

Commit 32642e3

Browse files
committed
MAGE-838 Switch ConfigHelper to PHP 8 constructor property promotion
1 parent d7bb010 commit 32642e3

File tree

1 file changed

+15
-86
lines changed

1 file changed

+15
-86
lines changed

Helper/ConfigHelper.php

Lines changed: 15 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -147,66 +147,6 @@ class ConfigHelper
147147
public const NUMBER_OF_ELEMENT_BY_PAGE = 'algoliasearch_advanced/queue/number_of_element_by_page';
148148
public const ARCHIVE_LOG_CLEAR_LIMIT = 'algoliasearch_advanced/queue/archive_clear_limit';
149149

150-
/**
151-
* @var Magento\Framework\App\Config\ScopeConfigInterface
152-
*/
153-
protected $configInterface;
154-
155-
/**
156-
* @var Currency
157-
*/
158-
protected $currency;
159-
160-
/**
161-
* @var StoreManagerInterface
162-
*/
163-
protected $storeManager;
164-
165-
/**
166-
* @var DirCurrency
167-
*/
168-
protected $dirCurrency;
169-
170-
/**
171-
* @var DirectoryList
172-
*/
173-
protected $directoryList;
174-
175-
/**
176-
* @var Magento\Framework\Module\ResourceInterface
177-
*/
178-
protected $moduleResource;
179-
180-
/**
181-
* @var Magento\Framework\App\ProductMetadataInterface
182-
*/
183-
protected $productMetadata;
184-
185-
/**
186-
* @var Magento\Framework\Event\ManagerInterface
187-
*/
188-
protected $eventManager;
189-
190-
/**
191-
* @var SerializerInterface
192-
*/
193-
protected $serializer;
194-
195-
/**
196-
* @var GroupCollection
197-
*/
198-
protected $groupCollection;
199-
200-
/**
201-
* @var GroupExcludedWebsiteRepositoryInterface
202-
*/
203-
protected $groupExcludedWebsiteRepository;
204-
205-
/**
206-
* @var CookieHelper
207-
*/
208-
protected $cookieHelper;
209-
210150
/**
211151
* @var array<int,<array<string, mixed>>>
212152
*/
@@ -228,32 +168,21 @@ class ConfigHelper
228168
229169
*/
230170
public function __construct(
231-
Magento\Framework\App\Config\ScopeConfigInterface $configInterface,
232-
StoreManagerInterface $storeManager,
233-
Currency $currency,
234-
DirCurrency $dirCurrency,
235-
DirectoryList $directoryList,
236-
Magento\Framework\Module\ResourceInterface $moduleResource,
237-
Magento\Framework\App\ProductMetadataInterface $productMetadata,
238-
Magento\Framework\Event\ManagerInterface $eventManager,
239-
SerializerInterface $serializer,
240-
GroupCollection $groupCollection,
241-
GroupExcludedWebsiteRepositoryInterface $groupExcludedWebsiteRepository,
242-
CookieHelper $cookieHelper
243-
) {
244-
$this->configInterface = $configInterface;
245-
$this->currency = $currency;
246-
$this->storeManager = $storeManager;
247-
$this->dirCurrency = $dirCurrency;
248-
$this->directoryList = $directoryList;
249-
$this->moduleResource = $moduleResource;
250-
$this->productMetadata = $productMetadata;
251-
$this->eventManager = $eventManager;
252-
$this->serializer = $serializer;
253-
$this->groupCollection = $groupCollection;
254-
$this->groupExcludedWebsiteRepository = $groupExcludedWebsiteRepository;
255-
$this->cookieHelper = $cookieHelper;
256-
}
171+
protected Magento\Framework\App\Config\ScopeConfigInterface $configInterface,
172+
protected Magento\Framework\App\Config\Storage\WriterInterface $configWriter,
173+
protected StoreManagerInterface $storeManager,
174+
protected Currency $currency,
175+
protected DirCurrency $dirCurrency,
176+
protected DirectoryList $directoryList,
177+
protected Magento\Framework\Module\ResourceInterface $moduleResource,
178+
protected Magento\Framework\App\ProductMetadataInterface $productMetadata,
179+
protected Magento\Framework\Event\ManagerInterface $eventManager,
180+
protected SerializerInterface $serializer,
181+
protected GroupCollection $groupCollection,
182+
protected GroupExcludedWebsiteRepositoryInterface $groupExcludedWebsiteRepository,
183+
protected CookieHelper $cookieHelper
184+
)
185+
{}
257186

258187

259188
/**

0 commit comments

Comments
 (0)