Code Duplication    Length = 15-15 lines in 2 locations

src/Api/Container.php 2 locations

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