Skip to content

Commit 8eb0d1f

Browse files
Merge pull request #12 from mageplaza/2.4-develop
Clean code
2 parents a132a25 + d3bc3d6 commit 8eb0d1f

File tree

5 files changed

+188
-188
lines changed

5 files changed

+188
-188
lines changed

Controller/Search/Result/Index.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ public function __construct(
102102
JsonData $jsonHelper,
103103
HelperData $moduleHelper
104104
) {
105-
$this->_storeManager = $storeManager;
105+
$this->_storeManager = $storeManager;
106106
$this->_catalogSession = $catalogSession;
107-
$this->_queryFactory = $queryFactory;
108-
$this->layerResolver = $layerResolver;
109-
$this->_jsonHelper = $jsonHelper;
110-
$this->_moduleHelper = $moduleHelper;
111-
$this->_helper = $helper;
107+
$this->_queryFactory = $queryFactory;
108+
$this->layerResolver = $layerResolver;
109+
$this->_jsonHelper = $jsonHelper;
110+
$this->_moduleHelper = $moduleHelper;
111+
$this->_helper = $helper;
112112

113113
parent::__construct($context);
114114
}
@@ -142,9 +142,9 @@ public function execute()
142142

143143
if ($this->_moduleHelper->ajaxEnabled() && $this->getRequest()->isAjax()) {
144144
$navigation = $this->_view->getLayout()->getBlock('catalogsearch.leftnav');
145-
$products = $this->_view->getLayout()->getBlock('search.result');
146-
$result = [
147-
'products' => $products->toHtml(),
145+
$products = $this->_view->getLayout()->getBlock('search.result');
146+
$result = [
147+
'products' => $products->toHtml(),
148148
'navigation' => $navigation->toHtml()
149149
];
150150
$this->getResponse()->representJson($this->_jsonHelper->jsonEncode($result));

Helper/Data.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
class Data extends AbstractData
3333
{
3434
const CONFIG_MODULE_PATH = 'layered_navigation';
35-
const FILTER_TYPE_LIST = 'list';
35+
const FILTER_TYPE_LIST = 'list';
3636

3737
/**
3838
* @param null $storeId
@@ -54,8 +54,8 @@ public function getLayerConfiguration($filters)
5454
$filterParams = $this->_getRequest()->getParams();
5555

5656
$config = new DataObject([
57-
'active' => array_keys($filterParams),
58-
'params' => $filterParams,
57+
'active' => array_keys($filterParams),
58+
'params' => $filterParams,
5959
'isCustomerLoggedIn' => $this->objectManager->create(Session::class)->isLoggedIn()
6060
]);
6161

Plugin/Controller/Category/View.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ public function afterExecute(\Magento\Catalog\Controller\Category\View $action,
5555
{
5656
if ($this->_moduleHelper->ajaxEnabled() && $action->getRequest()->isAjax()) {
5757
$navigation = $page->getLayout()->getBlock('catalog.leftnav');
58-
$products = $page->getLayout()->getBlock('category.products');
59-
$result = ['products' => $products->toHtml(), 'navigation' => $navigation->toHtml()];
58+
$products = $page->getLayout()->getBlock('category.products');
59+
$result = ['products' => $products->toHtml(), 'navigation' => $navigation->toHtml()];
6060
if ($this->_moduleHelper->getConfigValue('mpquickview/general/enabled')) {
61-
$quickView = $page->getLayout()->getBlock('mpquickview.quickview');
61+
$quickView = $page->getLayout()->getBlock('mpquickview.quickview');
6262
$result['quickview'] = $quickView->toHtml();
6363
}
6464
$action->getResponse()->representJson(LayerData::jsonEncode($result));

composer.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
{
2-
"name": "mageplaza/module-ajax-layered-navigation",
3-
"description": "Magento 2 Ajax Layered Navigation Extension",
4-
"require": {
5-
"mageplaza/module-core": "^1.4.5"
6-
},
7-
"type": "magento2-module",
8-
"version": "1.0.5",
9-
"license": "proprietary",
10-
"authors": [
11-
{
12-
"name": "Mageplaza",
13-
"email": "[email protected]",
14-
"homepage": "https://www.mageplaza.com",
15-
"role": "Technical Support"
16-
}
17-
],
18-
"autoload": {
19-
"files": [
20-
"registration.php"
21-
],
22-
"psr-4": {
23-
"Mageplaza\\AjaxLayer\\": ""
24-
}
25-
}
26-
}
1+
{
2+
"name": "mageplaza/module-ajax-layered-navigation",
3+
"description": "Magento 2 Ajax Layered Navigation Extension",
4+
"require": {
5+
"mageplaza/module-core": "^1.4.5"
6+
},
7+
"type": "magento2-module",
8+
"version": "4.0.0",
9+
"license": "proprietary",
10+
"authors": [
11+
{
12+
"name": "Mageplaza",
13+
"email": "[email protected]",
14+
"homepage": "https://www.mageplaza.com",
15+
"role": "Technical Support"
16+
}
17+
],
18+
"autoload": {
19+
"files": [
20+
"registration.php"
21+
],
22+
"psr-4": {
23+
"Mageplaza\\AjaxLayer\\": ""
24+
}
25+
}
26+
}

0 commit comments

Comments
 (0)