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

Console::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 8
nc 1
nop 2
dl 0
loc 11
rs 9.4285
c 0
b 0
f 0
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