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

VCS   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 10
Bugs 1 Features 2
Metric Value
wmc 2
c 10
b 1
f 2
lcom 1
cbo 4
dl 0
loc 25
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 10 1
A execute() 0 11 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
}