Command   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 32
ccs 14
cts 14
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A configure() 0 6 1
A execute() 0 5 1
1
<?php
2
3
namespace Hairmare\Dodat;
4
5
use Symfony\Component\Console\Command\Command as SymfonyCommand;
6
use Symfony\Component\Console\Input\InputInterface;
7
use Symfony\Component\Console\Output\OutputInterface;
8
use Hairmare\Dodat\Run;
9
use Hairmare\Dodat\Load;
10
11
class Command extends SymfonyCommand
12
{
13
    /**
14
     * @var Run
15
     */
16
        private $run;
17
18
    /**
19
     * @var Load
20
     */
21
    private $load;
22
23 1
    public function __construct(Run $run, Load $load)
24
    {
25 1
        $this->load = $load;
26 1
        $this->run = $run;
27 1
        parent::__construct();
28 1
    }
29
30 1
    protected function configure()
31
    {
32 1
        $this
33 1
            ->setName('run')
34 1
            ->setDescription('Run scripts from .travis.yml');
35 1
    }
36
37 1
    protected function execute(InputInterface $input, OutputInterface $output)
38
    {
39 1
        $this->run->setScripts($this->load->getScripts());
40 1
        $this->run->run();
41 1
    }
42
}
43