Code Duplication    Length = 15-15 lines in 2 locations

core/Plugin/Manager.php 2 locations

@@ 353-367 (lines=15) @@
350
     *
351
     * @return \stdClass[]
352
     */
353
    public function findComponents($componentName, $expectedSubclass)
354
    {
355
        $plugins    = $this->getPluginsLoadedAndActivated();
356
        $components = array();
357
358
        foreach ($plugins as $plugin) {
359
            $component = $plugin->findComponent($componentName, $expectedSubclass);
360
361
            if (!empty($component)) {
362
                $components[] = $component;
363
            }
364
        }
365
366
        return $components;
367
    }
368
369
    public function findMultipleComponents($directoryWithinPlugin, $expectedSubclass)
370
    {
@@ 369-383 (lines=15) @@
366
        return $components;
367
    }
368
369
    public function findMultipleComponents($directoryWithinPlugin, $expectedSubclass)
370
    {
371
        $plugins = $this->getPluginsLoadedAndActivated();
372
        $found   = array();
373
374
        foreach ($plugins as $plugin) {
375
            $components = $plugin->findMultipleComponents($directoryWithinPlugin, $expectedSubclass);
376
377
            if (!empty($components)) {
378
                $found = array_merge($found, $components);
379
            }
380
        }
381
382
        return $found;
383
    }
384
385
    /**
386
     * Uninstalls a Plugin (deletes plugin files from the disk)