Code Duplication    Length = 15-15 lines in 2 locations

src/Discovery/DiscoveryManagerImpl.php 1 location

@@ 311-325 (lines=15) @@
308
    /**
309
     * {@inheritdoc}
310
     */
311
    public function getRootTypeDescriptors()
312
    {
313
        $this->assertModulesLoaded();
314
315
        $types = array();
316
        $rootModuleName = $this->rootModule->getName();
317
318
        foreach ($this->typeDescriptors->toArray() as $typeName => $typesByModule) {
319
            if (isset($typesByModule[$rootModuleName])) {
320
                $types[] = $typesByModule[$rootModuleName];
321
            }
322
        }
323
324
        return $types;
325
    }
326
327
    /**
328
     * {@inheritdoc}

src/Repository/RepositoryManagerImpl.php 1 location

@@ 303-317 (lines=15) @@
300
    /**
301
     * {@inheritdoc}
302
     */
303
    public function getRootPathMappings()
304
    {
305
        $this->assertMappingsLoaded();
306
307
        $mappings = array();
308
        $rootModuleName = $this->rootModule->getName();
309
310
        foreach ($this->mappings->toArray() as $mappingsByModule) {
311
            if (isset($mappingsByModule[$rootModuleName])) {
312
                $mappings[] = $mappingsByModule[$rootModuleName];
313
            }
314
        }
315
316
        return $mappings;
317
    }
318
319
    /**
320
     * {@inheritdoc}