Passed
Push — nln-php7 ( 12eaac )
by Nicolas
05:28
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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
A run() 0 4 1
A getConsoleApplication() 0 4 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