Completed
Push — master ( 882947...a4a53d )
by Mike
13:52 queued 13:46
created

LatestCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 9 1
A execute() 0 6 1
1
<?php
2
3
namespace Doctrine\DBAL\Migrations\Tools\Console\Command;
4
5
use Symfony\Component\Console\Input\InputInterface;
6
use Symfony\Component\Console\Output\OutputInterface;
7
8
/**
9
 * Outputs the latest version number.
10
 *
11
 * @author Kris Wallsmith <[email protected]>
12
 */
13
class LatestCommand extends AbstractCommand
14
{
15 8
    protected function configure()
16
    {
17
        $this
18 8
            ->setName('migrations:latest')
19 8
            ->setDescription('Outputs the latest version number')
20
        ;
21
22 8
        parent::configure();
23 8
    }
24
25 1
    public function execute(InputInterface $input, OutputInterface $output)
26
    {
27 1
        $configuration = $this->getMigrationConfiguration($input, $output);
28
29 1
        $output->writeln($configuration->getLatestVersion());
30 1
    }
31
}
32