Skip to content

Commit 67fcd8f

Browse files
committed
MAGETWO-66727: Update performance profiles with swatches
1 parent dfcc21f commit 67fcd8f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

setup/src/Magento/Setup/Fixtures/ConfigurableProductsFixture.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ function (&$item, $key) {
481481
*
482482
* @return array
483483
* @throws ValidatorException
484+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
484485
*/
485486
private function getConfigurableProductConfig()
486487
{
@@ -653,6 +654,12 @@ function ($index, $attribute) use ($attributeCode, $options, $swatches) {
653654
);
654655
}
655656

657+
/**
658+
* Provide attribute set based on attributes configuration
659+
*
660+
* @param array $attributes
661+
* @return array
662+
*/
656663
private function getCustomAttributeSet(array $attributes)
657664
{
658665
$attributeSetName = $this->getAttributeSetName(
@@ -697,6 +704,13 @@ function ($index, $attribute) use ($attributeSetName, $attributes) {
697704
return $this->attributeSetsFixture->createAttributeSet($pattern);
698705
}
699706

707+
/**
708+
* Provide attribute set name based on amount of attributes and options per attribute set
709+
*
710+
* @param int $attributesCount
711+
* @param int $optionsCount
712+
* @return string
713+
*/
700714
private function getAttributeSetName($attributesCount, $optionsCount)
701715
{
702716
return sprintf('Dynamic Attribute Set %s-%s', $attributesCount, $optionsCount);

0 commit comments

Comments
 (0)