Code Duplication    Length = 7-7 lines in 2 locations

application/modules/exchange/classes/Products.php 2 locations

@@ 338-344 (lines=7) @@
335
                if (!$variantExId == NULL) { // this is variant of product
336
                    $this->insertCollector->addData('shop_product_variants', $variant, $variantExId);
337
                    $this->insertCollector->addData('shop_product_variants_i18n', $variantI18n, $variantExId);
338
                    if (!isset($productsUniqueExIds[$exId])) {
339
                        $productsUniqueExIds[$exId] = 0;
340
                    } else {
341
                        $this->insertCollector->newPass();
342
                        $this->updateCollector->newPass();
343
                        continue;
344
                    }
345
                } else {
346
                    $this->insertCollector->addData('shop_product_variants', $variant, $exId);
347
                    $this->insertCollector->addData('shop_product_variants_i18n', $variantI18n, $exId);
@@ 396-402 (lines=7) @@
393
                        $this->updateCollector->addData('shop_product_variants_i18n', $variantI18n, $variantExId);
394
                    }
395
396
                    if (!isset($productsUniqueExIds[$exId])) {
397
                        $productsUniqueExIds[$exId] = 0;
398
                    } else {
399
                        $this->insertCollector->newPass();
400
                        $this->updateCollector->newPass();
401
                        continue;
402
                    }
403
                } else {
404
                    $this->updateCollector->addData('shop_product_variants', array_merge($variant, ['product_id' => $productId]));
405
                    $this->updateCollector->addData('shop_product_variants_i18n', $variantI18n, $exId);