Skip to content

Commit 5d2333e

Browse files
committed
Code cleanup
1 parent 7b43062 commit 5d2333e

File tree

6 files changed

+35
-23
lines changed

6 files changed

+35
-23
lines changed

Helper/TigFieldsHelper.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ class TigFieldsHelper
5252
/**
5353
* @param LoggerInterface $logger
5454
*/
55-
public function __construct(LoggerInterface $logger){
55+
public function __construct(
56+
LoggerInterface $logger
57+
){
5658
$this->logger = $logger;
5759
}
5860

Plugin/Model/Checkout/LayoutProcessorPlugin.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@ class LayoutProcessorPlugin
6565
* @param NotifierInterface $notifier
6666
* @param ScopeConfigInterface $scopeConfig
6767
*/
68-
public function __construct(ArrayManager $arrayManager,
69-
NotifierInterface $notifier,
70-
ScopeConfigInterface $scopeConfig
68+
public function __construct(
69+
ArrayManager $arrayManager,
70+
NotifierInterface $notifier,
71+
ScopeConfigInterface $scopeConfig
7172
) {
7273
$this->arrayManager = $arrayManager;
7374
$this->notifier = $notifier;
@@ -168,7 +169,7 @@ private function getParentPath($path, $delimiter = '/', $count = 1)
168169
*/
169170
public function addAdminErrorMessage($message)
170171
{
171-
$this->notifier->addMajor("TIG Postcode", "Postcodeservice detected one or more compability issues with your shop setup");
172+
$this->notifier->addMajor("TIG Postcode", "Postcodeservice detected one or more compatibility issues with your shop setup");
172173
}
173174

174175
/**

Plugin/Model/Osc/LayoutProcessorPlugin.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@ class LayoutProcessorPlugin
6565
* @param NotifierInterface $notifier
6666
* @param ScopeConfigInterface $scopeConfig
6767
*/
68-
public function __construct(ArrayManager $arrayManager,
69-
NotifierInterface $notifier,
70-
ScopeConfigInterface $scopeConfig
68+
public function __construct(
69+
ArrayManager $arrayManager,
70+
NotifierInterface $notifier,
71+
ScopeConfigInterface $scopeConfig
7172
) {
7273
$this->arrayManager = $arrayManager;
7374
$this->notifier = $notifier;
@@ -168,7 +169,7 @@ private function getParentPath($path, $delimiter = '/', $count = 1)
168169
*/
169170
public function addAdminErrorMessage($message)
170171
{
171-
$this->notifier->addMajor("TIG Postcode", "Postcodeservice detected one or more compability issues with your shop setup");
172+
$this->notifier->addMajor("TIG Postcode", "Postcodeservice detected one or more compatibility issues with your shop setup");
172173
}
173174

174175
/**

Plugin/Model/ResourceModel/Country/CollectionPlugin.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
use Magento\Framework\Module\FullModuleList;
3636
use TIG\Postcode\Config\Provider\ModuleConfiguration;
37+
use Magento\Directory\Model\ResourceModel\Country\Collection;
3738

3839
class CollectionPlugin
3940
{
@@ -208,26 +209,26 @@ private function addPostcodeConfig(&$countryOption, $country, $sortOrderBase, $s
208209
* @return int[]
209210
*/
210211
private function getSortOrderAndIncrement(){
211-
$sortOrderBase = 81;
212+
$sortOrderBase = 81;
212213
$sortOrderIncrement = 1;
213214

214215
foreach(self::SORT_ORDER_CONFIG as $module => $config){
215216
if(!$this->fullModuleList->has($module)) {
216217
continue;
217218
}
218-
$sortOrderBase = $config[self::SORT_ORDER_BASE];
219+
$sortOrderBase = $config[self::SORT_ORDER_BASE];
219220
$sortOrderIncrement = $config[self::SORT_ORDER_INCREMENT];
220221
}
221222

222223
return [$sortOrderBase, $sortOrderIncrement];
223224
}
224225

225226
/**
226-
* @param \Magento\Directory\Model\ResourceModel\Country\Collection$subject
227-
* @param $result
227+
* @param Collection $subject
228+
* @param $result
228229
*
229230
* @return mixed
230-
* @see \Magento\Directory\Model\ResourceModel\Country\Collection::toOptionArray
231+
* @see Collection::toOptionArray
231232
*/
232233
public function afterToOptionArray(
233234
$subject,

Plugin/View/Page/Config/Renderer.php

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
use Magento\Framework\Module\ModuleList;
55
use Magento\Framework\App\Config\ScopeConfigInterface;
6+
use Magento\Store\Model\ScopeInterface;
7+
use Magento\Framework\View\Page\Config\Renderer as pageRender;
68
use Magento\Framework\View\Page\Config;
79

810
class Renderer
@@ -13,35 +15,40 @@ class Renderer
1315
/** @var ScopeConfigInterface */
1416
private $scopeConfig;
1517

18+
/** @var ScopeInterface */
19+
private $scopeStore;
20+
1621
/** @var ModuleList */
1722
public $moduleList;
1823

1924
/**
20-
* @param \Magento\Framework\View\Page\Config $config
21-
* @param ScopeConfigInterface $scopeConfig
22-
* @param ModuleList $moduleList
25+
* @param Config $config
26+
* @param ScopeConfigInterface $scopeConfig
27+
* @param ModuleList $moduleList
2328
*/
2429
public function __construct(
2530
Config $config,
2631
ScopeConfigInterface $scopeConfig,
32+
ScopeInterface $scopeStore,
2733
ModuleList $moduleList
2834
){
2935
$this->config = $config;
3036
$this->scopeConfig = $scopeConfig;
37+
$this->scopeStore = $scopeStore;
3138
$this->moduleList = $moduleList;
3239
}
3340

3441
/**
35-
* @param \Magento\Framework\View\Page\Config\Renderer $subject
42+
* @param pageRender $subject
3643
* @param $assetestlist
3744
*
3845
* @see Renderer::renderAssets()
3946
*
4047
* @return array|array[]
4148
*/
4249
public function beforeRenderAssets(
43-
\Magento\Framework\View\Page\Config\Renderer $subject,
44-
$assetestlist = [])
50+
pageRender $subject,
51+
$assetestlist = [])
4552
{
4653
$modules = $this->moduleList->getNames();
4754

@@ -58,12 +65,12 @@ public function beforeRenderAssets(
5865
$this->config->addPageAsset('TIG_Postcode::css/postcode_main.css');
5966
// check if NL is enabled
6067
if ($this->scopeConfig->getValue('tig_postcode/countries/enable_nl_check',
61-
\Magento\Store\Model\ScopeInterface::SCOPE_STORE)){
68+
$this->scopeStore::SCOPE_STORE)){
6269
$this->config->addPageAsset('TIG_Postcode::css/postcode_nl.css');
6370
}
6471
// check if BE is enabled
6572
if ($this->scopeConfig->getValue('tig_postcode/countries/enable_be_check',
66-
\Magento\Store\Model\ScopeInterface::SCOPE_STORE)){
73+
$this->scopeStore::SCOPE_STORE)){
6774
$this->config->addPageAsset('TIG_Postcode::css/postcode_be.css');
6875
}
6976
}

view/adminhtml/templates/config/parsing/streets.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<br/>
4343
<?php echo $block->escapeHtml(__('Tampering with the settings may affect the workflow of third party extensions. Use at your own risk.'));?>
4444
<br />
45-
<strong><?php echo $block->escapeHtml(__('Note: These settings are disabled in this new release. If you still need this functionality contact support'));?></strong>
45+
<strong><?php echo $block->escapeHtml(__('Note: These settings are disabled in this new release. If you still need this functionality please contact support'));?></strong>
4646
</div>
4747
</div>
4848
</div>

0 commit comments

Comments
 (0)