FindInvalidRouteCallsCommand   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 4

2 Methods

Rating   Name   Duplication   Size   Complexity  
A handle() 0 9 3
A __construct() 0 5 1
1
<?php
2
3
namespace Juddling\RouteChecker\Commands;
4
5
use Juddling\RouteChecker\FindInvalidRouteCalls;
6
7
class FindInvalidRouteCallsCommand extends BaseCommand
8
{
9
    protected $signature = 'runtime-errors:route-calls';
10
    protected $description = 'Checks your route calls to see if they map to a registered named route';
11
    protected $routeCalls;
12
13
    public function __construct(FindInvalidRouteCalls $routeCalls)
14
    {
15
        $this->routeCalls = $routeCalls;
16
17
        parent::__construct();
18
    }
19
20
    public function handle()
21
    {
22
        foreach ($this->getAllFilesInDir(getcwd(), 'php') as $file) {
23
            if (!$this->blacklisted($file)) {
24
                $this->routeCalls->findFunctionCalls($file);
25
            }
26
        }
27
28
        $this->routeCalls->renderTable($this->getOutput());
29
    }
30
}
31