Code Duplication    Length = 15-15 lines in 2 locations

src/Api/Container.php 2 locations

@@ 664-678 (lines=15) @@
661
     *
662
     * @return RootModuleFileManager The module file manager
663
     */
664
    public function getRootModuleFileManager()
665
    {
666
        if (!$this->started) {
667
            throw new LogicException('Puli was not started');
668
        }
669
670
        if (!$this->rootModuleFileManager && $this->context instanceof ProjectContext) {
671
            $this->rootModuleFileManager = new RootModuleFileManagerImpl(
672
                $this->context,
673
                $this->getJsonStorage()
674
            );
675
        }
676
677
        return $this->rootModuleFileManager;
678
    }
679
680
    /**
681
     * Returns the module manager.
@@ 685-699 (lines=15) @@
682
     *
683
     * @return ModuleManager The module manager
684
     */
685
    public function getModuleManager()
686
    {
687
        if (!$this->started) {
688
            throw new LogicException('Puli was not started');
689
        }
690
691
        if (!$this->moduleManager && $this->context instanceof ProjectContext) {
692
            $this->moduleManager = new ModuleManagerImpl(
693
                $this->context,
694
                $this->getJsonStorage()
695
            );
696
        }
697
698
        return $this->moduleManager;
699
    }
700
701
    /**
702
     * Returns the resource repository manager.