Code Duplication    Length = 10-10 lines in 2 locations

src/Observers/EeProductObserver.php 1 location

@@ 43-52 (lines=10) @@
40
     *
41
     * @return array The processed row
42
     */
43
    protected function process()
44
    {
45
46
        // prepare the static entity values
47
        $product = $this->initializeProduct($this->prepareAttributes());
48
49
        // insert the entity and set the entity ID, SKU and attribute set
50
        $this->setLastRowId($this->persistProduct($product));
51
        $this->setLastEntityId($product[MemberNames::ENTITY_ID]);
52
    }
53
54
    /**
55
     * Initialize the product with the passed attributes and returns an instance.

src/Observers/EeProductUpdateObserver.php 1 location

@@ 44-53 (lines=10) @@
41
     *
42
     * @return array The processed row
43
     */
44
    protected function process()
45
    {
46
47
        // prepare the static entity values
48
        $product = $this->initializeProduct($this->prepareAttributes());
49
50
        // insert the entity and set the entity ID, SKU and attribute set
51
        $this->setLastRowId($this->persistProduct($product));
52
        $this->setLastEntityId($product[MemberNames::ENTITY_ID]);
53
    }
54
55
    /**
56
     * Initialize the product with the passed attributes and returns an instance.