Completed
Push — dev ( 8e4a13...e9dbc4 )
by Marc
02:06
created

PluginManager   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 4
Bugs 0 Features 1
Metric Value
wmc 2
c 4
b 0
f 1
lcom 0
cbo 4
dl 0
loc 21
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A outputRoutes() 0 12 2
1
<?php namespace Mascame\Artificer\Extension;
2
3
class PluginManager extends \Mascame\Extender\Manager
4
{
5
    use Slugged;
6
7
    /**
8
     * @return array
9
     */
10
    public function outputRoutes()
11
    {
12
        $installedPlugins = $this->installer()->getInstalled();
13
14
        foreach ($installedPlugins as $plugin) {
15
            $pluginInstance = $this->get($plugin);
16
17
            \Route::group(['prefix' => $pluginInstance->getSlug()], function() use ($pluginInstance) {
18
                $pluginInstance->getRoutes();
19
            });
20
        }
21
    }
22
23
}