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
     * Prepare the attributes of the entity that has to be persisted.

src/Observers/EeProductUpdateObserver.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
     * Set's the row ID of the product that has been created recently.