Completed
Pull Request — master (#20)
by Pavel
21:46
created

MigrateUpCommand::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 7
Ratio 100 %

Importance

Changes 0
Metric Value
dl 7
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace App\Console\Commands;
4
5
use App\Console\Traits\DbHelper;
6
use Symfony\Component\Console\Command\Command;
7
use Symfony\Component\Console\Input\InputInterface;
8
use Symfony\Component\Console\Output\OutputInterface;
9
10
/**
11
 * MigrateCommand
12
 */
13 View Code Duplication
class MigrateUpCommand extends Command
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...
14
{
15
    use DbHelper;
16
17
    /**
18
     * Configuration of command
19
     */
20
    protected function configure()
21
    {
22
        $this
23
            ->setName('migrate:up')
24
            ->setDescription('Command for run migration')
25
        ;
26
    }
27
28
    /**
29
     * Execute method of command
30
     *
31
     * @param InputInterface $input
32
     * @param OutputInterface $output
33
     *
34
     * @return void
35
     */
36
    protected function execute(InputInterface $input, OutputInterface $output)
37
    {
38
        $this->runAction(MIGRATIONS_PATH, $output, $this->migrationsTable, 'up');
39
40
        return;
41
    }
42
}
43