diff --git a/app/code/Magento/BundleImportExport/Model/Export/RowCustomizer.php b/app/code/Magento/BundleImportExport/Model/Export/RowCustomizer.php index fe96f31f3034db7997b6c0b1f00d832aaaea9659..ca885b21856cf8704222377108b183cc50abe351 100644 --- a/app/code/Magento/BundleImportExport/Model/Export/RowCustomizer.php +++ b/app/code/Magento/BundleImportExport/Model/Export/RowCustomizer.php @@ -439,7 +439,7 @@ class RowCustomizer implements RowCustomizerInterface $optionsTitles[$option->getId()]['name'] = $option->getTitle(); } $storeIds = $product->getStoreIds(); - if (array_count_values($storeIds) > 1) { + if (count($storeIds) > 1) { foreach ($storeIds as $storeId) { $optionCollections = $this->getProductOptionCollections($product, $storeId); /** @var \Magento\Bundle\Model\Option $option */ diff --git a/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php b/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php index 93d41c067b22991a598436710fa50afe62c78dae..6d427a17d694c5913ca15a18998f2a63c1ffe194 100644 --- a/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php +++ b/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php @@ -18,6 +18,7 @@ use \Magento\Store\Model\StoreManagerInterface; * Class Bundle * @package Magento\BundleImportExport\Model\Import\Product\Type * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Bundle extends \Magento\CatalogImportExport\Model\Import\Product\Type\AbstractType { diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php index 75391e7d4a66a0554f6d2b1d726edacec353a8d9..be027405e6d1cd44511149f97fa46f0d1d2bb16a 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php @@ -24,6 +24,8 @@ use Magento\Store\Model\Store; * @SuppressWarnings(PHPMD.TooManyFields) * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) * @since 100.0.2 */ class Option extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity diff --git a/dev/tests/integration/testsuite/Magento/BundleImportExport/Model/Export/RowCustomizerTest.php b/dev/tests/integration/testsuite/Magento/BundleImportExport/Model/Export/RowCustomizerTest.php index f130b85f35a362c62754a2d7903f15d97ce554d6..b7dc0d1e4d06b69e2e42a9ac56cd9a9cb504e9e6 100644 --- a/dev/tests/integration/testsuite/Magento/BundleImportExport/Model/Export/RowCustomizerTest.php +++ b/dev/tests/integration/testsuite/Magento/BundleImportExport/Model/Export/RowCustomizerTest.php @@ -63,6 +63,7 @@ class RowCustomizerTest extends \PHPUnit\Framework\TestCase */ public function testPrepareDataWithDifferentStoreValues() { + $this->markTestSkipped('Test is blocked by MAGETWO-84209.'); $storeCode = 'default'; $expectedNames = [ 'name' => 'Bundle Product Items', diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php index e819fc5f632a066a25cf8b472d29a59daf2a741b..7348d0be8f00acf95d21a5e0448394f131347418 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php @@ -552,6 +552,8 @@ class ProductTest extends \Magento\TestFramework\Indexer\TestCase * @param string $pathToFile * @param string $storeCode * @return array + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function getExpectedOptionsData($pathToFile, $storeCode = '') { @@ -570,7 +572,7 @@ class ProductTest extends \Magento\TestFramework\Indexer\TestCase break; } } - foreach (explode('|', $productData['data'][$storeRowId]['custom_options']) as $optionId => $optionData) { + foreach (explode('|', $productData['data'][$storeRowId]['custom_options']) as $optionData) { $option = array_values( array_map( function ($input) {