Code Duplication    Length = 11-11 lines in 2 locations

src/InMemoryRepository.php 1 location

@@ 311-321 (lines=11) @@
308
    /**
309
     * @param EntityChangedEvent $e
310
     */
311
    protected function triggerAttributesChange(EntityChangedEvent $e)
312
    {
313
        $changedEntity = $e->getChangedEntity();
314
315
        $originalAttrs = $e->getOriginalEntity()->extract();
316
        $changedAttrs = $changedEntity->extract();
317
318
        foreach (array_keys(array_diff_assoc($originalAttrs, $changedAttrs)) as $attribute) {
319
            $this->eventManager->trigger($this->getAttributeChangeEventName($changedEntity, $attribute), $this, $e);
320
        }
321
    }
322
323
    /**
324
     * @param EntityInterface $changedEntity

src/Repository.php 1 location

@@ 351-361 (lines=11) @@
348
    /**
349
     * @param EntityChangedEvent $e
350
     */
351
    protected function triggerAttributesChange(EntityChangedEvent $e)
352
    {
353
        $changedEntity = $e->getChangedEntity();
354
355
        $originalAttrs = $e->getOriginalEntity()->extract();
356
        $changedAttrs = $changedEntity->extract();
357
358
        foreach (array_keys(array_diff_assoc($originalAttrs, $changedAttrs)) as $attribute) {
359
            $this->eventManager->trigger($this->getAttributeChangeEventName($changedEntity, $attribute), $this, $e);
360
        }
361
    }
362
363
    /**
364
     * @param EntityInterface $changedEntity