Code Duplication    Length = 8-8 lines in 2 locations

src/Observers/CategoryProductObserver.php 1 location

@@ 213-220 (lines=8) @@
210
     * @return array The merged entity
211
     * @todo https://github.com/techdivision/import/issues/179
212
     */
213
    protected function mergeEntity(array $entity, array $attr, $changeSetName = null)
214
    {
215
        return array_merge(
216
            $entity,
217
            $this->entityMerger ? $this->entityMerger->merge($this, $entity, $attr) : $attr,
218
            array(EntityStatus::MEMBER_NAME => $this->detectState($entity, $attr, $changeSetName))
219
        );
220
    }
221
222
    /**
223
     * Appends the dynamic attributes to the static ones and returns them.

src/Observers/ProductInventoryObserver.php 1 location

@@ 201-208 (lines=8) @@
198
     * @return array The merged entity
199
     * @todo https://github.com/techdivision/import/issues/179
200
     */
201
    protected function mergeEntity(array $entity, array $attr, $changeSetName = null)
202
    {
203
        return array_merge(
204
            $entity,
205
            $this->entityMerger ? $this->entityMerger->merge($this, $entity, $attr) : $attr,
206
            array(EntityStatus::MEMBER_NAME => $this->detectState($entity, $attr, $changeSetName))
207
        );
208
    }
209
210
    /**
211
     * Prepare the stock item attributes of the entity that has to be persisted.