Passed
Push — nln-php7 ( 12eaac )
by Nicolas
05:28
created

Console::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 8
cts 8
cp 1
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Karma;
6
7
class Console
8
{
9
    private
10
        $app;
11
12 36
    public function __construct(Application $dic)
13
    {
14 36
        $this->app = new \Symfony\Component\Console\Application('Karma', Application::VERSION);
15
16 36
        $this->app->add(new Command\Hydrate($dic));
17 36
        $this->app->add(new Command\Generate($dic));
18 36
        $this->app->add(new Command\Display($dic));
19 36
        $this->app->add(new Command\Diff($dic));
20 36
        $this->app->add(new Command\Rollback($dic));
21 36
    }
22
23
    public function run()
24
    {
25
        $this->app->run();
26
    }
27
28 36
    public function getConsoleApplication()
29
    {
30 36
        return $this->app;
31
    }
32
}
33