Code Duplication    Length = 15-15 lines in 2 locations

src/Observers/CategoryProductObserver.php 1 location

@@ 89-103 (lines=15) @@
86
     * @param \TechDivision\Import\Observers\EntityMergers\EntityMergerInterface   $entityMerger          The entity merger instance
87
     * @param \TechDivision\Import\Observers\StateDetectorInterface|null           $stateDetector         The state detector instance to use
88
     */
89
    public function __construct(
90
        ProductBunchProcessorInterface $productBunchProcessor,
91
        AttributeLoaderInterface $attributeLoader = null,
92
        EntityMergerInterface $entityMerger = null,
93
        StateDetectorInterface $stateDetector = null
94
    ) {
95
96
        // initialize the bunch processor and the attribute loader instance
97
        $this->productBunchProcessor = $productBunchProcessor;
98
        $this->attributeLoader = $attributeLoader;
99
        $this->entityMerger = $entityMerger;
100
101
        // pass the state detector to the parent method
102
        parent::__construct($stateDetector);
103
    }
104
105
    /**
106
     * Return's the product bunch processor instance.

src/Observers/ProductInventoryObserver.php 1 location

@@ 84-98 (lines=15) @@
81
     * @param \TechDivision\Import\Observers\EntityMergers\EntityMergerInterface|null $entityMerger          The entity merger instance
82
     * @param \TechDivision\Import\Observers\StateDetectorInterface|null              $stateDetector         The state detector instance to use
83
     */
84
    public function __construct(
85
        ProductBunchProcessorInterface $productBunchProcessor,
86
        AttributeLoaderInterface $attributeLoader,
87
        EntityMergerInterface $entityMerger = null,
88
        StateDetectorInterface $stateDetector = null
89
    ) {
90
91
        // initialize the bunch processor and the attribute loader instance
92
        $this->productBunchProcessor = $productBunchProcessor;
93
        $this->attributeLoader = $attributeLoader;
94
        $this->entityMerger = $entityMerger;
95
96
        // pass the state detector to the parent method
97
        parent::__construct($stateDetector);
98
    }
99
100
    /**
101
     * Will be invoked by the observer visitor when a factory has been defined to create the observer instance.