Completed
Push — master ( 01e4c8...9bd1b4 )
by Joao
02:25
created

DatabaseVersionCommand::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 5
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 5
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: jg
5
 * Date: 17/06/16
6
 * Time: 21:52
7
 */
8
9
namespace ByJG\DbMigration\Console;
10
11
use Symfony\Component\Console\Input\InputInterface;
12
use Symfony\Component\Console\Output\OutputInterface;
13
14 View Code Duplication
class DatabaseVersionCommand extends ConsoleCommand
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
15
{
16
    protected function configure()
17
    {
18
        parent::configure(); 
19
        $this
20
            ->setName('version')
21
            ->setDescription('Get the current database version');
22
23
    }
24
25
    protected function execute(InputInterface $input, OutputInterface $output)
26
    {
27
        parent::execute($input, $output);
28
        $output->writeln('version: ' . $this->migration->getCurrentVersion());
29
    }
30
}
31