Completed
Push — 42-formatter ( cff7a4 )
by Nicolas
32:10 queued 28:41
created

VCS::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 6
rs 9.4286
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace Karma\Command;
4
5
use Symfony\Component\Console\Input\InputInterface;
6
use Symfony\Component\Console\Output\OutputInterface;
7
use Karma\Command;
8
use Symfony\Component\Console\Input\InputArgument;
9
10
class VCS extends Command
11
{
12
    protected function configure()
13
    {
14
        parent::configure();
15
        
16
        $this
17
            ->setName('vcs')
18
            ->setDescription('')
19
            ->addArgument('sourcePath', InputArgument::REQUIRED, 'source path')
20
        ;
21
    }
22
    
23
    protected function execute(InputInterface $input, OutputInterface $output)
24
    {
25
        parent::execute($input, $output);
26
        
27
        $this->output->writeln("<info>Looking for vcs operations</info>\n");
28
        
29
        $this->app['sources.path'] = $input->getArgument('sourcePath');
30
        
31
        $vcs = $this->app['vcsHandler']($this->app['vcs']);
32
        $vcs->execute($this->app['sources.path']);
33
    }
34
}