Completed
Push — master ( 0bf862...70b28d )
by Ryan
08:01
created

IncludeRoutes   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 19
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 10 3
1
<?php namespace Anomaly\Streams\Platform\Routing\Command;
2
3
use Anomaly\Streams\Platform\Application\Application;
4
use Illuminate\Contracts\Bus\SelfHandling;
5
6
/**
7
 * Class IncludeRoutes
8
 *
9
 * @link          http://pyrocms.com/
10
 * @author        PyroCMS, Inc. <[email protected]>
11
 * @author        Ryan Thompson <[email protected]>
12
 * @package       Anomaly\Streams\Platform\Routing\Command
13
 */
14
class IncludeRoutes implements SelfHandling
15
{
16
17
    /**
18
     * Handle the command.
19
     *
20
     * @param Application $application
21
     */
22
    public function handle(Application $application)
23
    {
24
        if (file_exists($routes = base_path('resources/core/routes.php'))) {
25
            include $routes;
26
        }
27
28
        if (file_exists($routes = $application->getResourcesPath('routes.php'))) {
29
            include $routes;
30
        }
31
    }
32
}
33