Code Duplication    Length = 8-8 lines in 3 locations

Excluded/ODM/DocumentEntity.php 1 location

@@ 565-572 (lines=8) @@
562
    /**
563
     * {@inheritdoc}
564
     */
565
    protected function iocContainer()
566
    {
567
        if (empty($this->odm) || !$this->odm instanceof Component) {
568
            return parent::iocContainer();
569
        }
570
571
        return $this->odm->iocContainer();
572
    }
573
574
    /**
575
     * Create document entity using given ODM instance or load parent ODM via shared container.

Excluded/ODM/Entities/Compositor.php 1 location

@@ 714-721 (lines=8) @@
711
    /**
712
     * @return null|ContainerInterface
713
     */
714
    protected function iocContainer()
715
    {
716
        if (!empty($this->parent) && $this->parent instanceof Component) {
717
            return $this->parent->container();
718
        }
719
720
        return parent::iocContainer();
721
    }
722
723
    /**
724
     * Fetch or create instance of document based on specified offset.

Excluded/ORM/RecordEntity.php 1 location

@@ 607-614 (lines=8) @@
604
    /**
605
     * {@inheritdoc}
606
     */
607
    protected function iocContainer()
608
    {
609
        if (empty($this->orm) || !$this->orm instanceof Component) {
610
            return parent::iocContainer();
611
        }
612
613
        return $this->orm->container();
614
    }
615
616
    /**
617
     * Check if relation is embedded.