Skip to content

Commit f07de01

Browse files
committed
Merge remote-tracking branch 'tango/MC-20533' into Chaika-PR-2019-11-19
2 parents 547ab18 + cb96e87 commit f07de01

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

app/code/Magento/Swatches/Block/Product/Renderer/Listing/Configurable.php

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use Magento\Catalog\Helper\Product as CatalogProduct;
1010
use Magento\Catalog\Model\Product;
1111
use Magento\Catalog\Model\Layer\Resolver;
12-
use Magento\Catalog\Model\Layer\Category as CategoryLayer;
1312
use Magento\ConfigurableProduct\Helper\Data;
1413
use Magento\ConfigurableProduct\Model\ConfigurableAttributeData;
1514
use Magento\Customer\Helper\Session\CurrentCustomer;
@@ -154,7 +153,7 @@ public function getJsonConfig()
154153
$this->unsetData('allow_products');
155154
return parent::getJsonConfig();
156155
}
157-
156+
158157
/**
159158
* Composes configuration for js price format
160159
*
@@ -242,9 +241,12 @@ private function getLayeredAttributesIfExists(Product $configurableProduct, arra
242241

243242
$layeredAttributes = [];
244243

245-
$configurableAttributes = array_map(function ($attribute) {
246-
return $attribute->getAttributeCode();
247-
}, $configurableAttributes);
244+
$configurableAttributes = array_map(
245+
function ($attribute) {
246+
return $attribute->getAttributeCode();
247+
},
248+
$configurableAttributes
249+
);
248250

249251
$commonAttributeCodes = array_intersect(
250252
$configurableAttributes,
@@ -257,16 +259,4 @@ private function getLayeredAttributesIfExists(Product $configurableProduct, arra
257259

258260
return $layeredAttributes;
259261
}
260-
261-
/**
262-
* @inheritdoc
263-
*/
264-
public function getCacheKeyInfo()
265-
{
266-
$cacheKeyInfo = parent::getCacheKeyInfo();
267-
/** @var CategoryLayer $catalogLayer */
268-
$catalogLayer = $this->layerResolver->get();
269-
$cacheKeyInfo[] = $catalogLayer->getStateKey();
270-
return $cacheKeyInfo;
271-
}
272262
}

0 commit comments

Comments
 (0)