Command::configure()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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