Completed
Push — nln-php7 ( 1a6b54...2856d9 )
by Nicolas
02:57
created

Console   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 6

Test Coverage

Coverage 76.92%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 6
dl 0
loc 26
ccs 10
cts 13
cp 0.7692
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Karma;
6
7
class Console
8
{
9
    private \Symfony\Component\Console\Application
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_NS_SEPARATOR, expecting T_FUNCTION or T_CONST
Loading history...
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 Console\Hydrate($dic));
17 36
        $this->app->add(new Console\Generate($dic));
18 36
        $this->app->add(new Console\Display($dic));
19 36
        $this->app->add(new Console\Diff($dic));
20 36
        $this->app->add(new Console\Rollback($dic));
21 36
    }
22
23
    public function run(): void
24
    {
25
        $this->app->run();
26
    }
27
28 36
    public function getConsoleApplication(): \Symfony\Component\Console\Application
29
    {
30 36
        return $this->app;
31
    }
32
}
33