Passed
Push — develop ( 28e0ad...7b5dfd )
by Brent
03:35
created

Console   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 7

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 7

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
1
<?php
2
3
namespace Brendt\Stitcher\Application;
4
5
use Brendt\Stitcher\App;
6
use Brendt\Stitcher\Command\CleanCommand;
7
use Brendt\Stitcher\Command\GenerateCommand;
8
use Brendt\Stitcher\Command\InstallCommand;
9
use Brendt\Stitcher\Command\RouterDispatchCommand;
10
use Brendt\Stitcher\Command\RouterListCommand;
11
use Symfony\Component\Console\Application;
12
13
class Console extends Application {
14
15
    public function __construct(string $configPath = './config.yml', array $defaultConfig = []) {
16
        App::init($configPath, $defaultConfig);
17
18
        parent::__construct('Stitcher Console');
19
20
        $this->add(new InstallCommand());
21
        $this->add(new GenerateCommand($configPath, $defaultConfig));
22
        $this->add(new CleanCommand());
23
        $this->add(new RouterListCommand($configPath, $defaultConfig));
24
        $this->add(new RouterDispatchCommand($configPath, $defaultConfig));
25
    }
26
27
}
28