Passed
Push — master ( 28f242...472b4c )
by Gabriel
04:44
created

MigrateCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 17
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A execute() 0 4 1
A configure() 0 4 1
1
<?php
2
3
namespace ByTIC\Migrations\Console;
4
5
use ByTIC\Console\Command;
6
use Exception;
7
use Symfony\Component\Console\Input\InputInterface;
8
use Symfony\Component\Console\Output\OutputInterface;
9
10
/**
11
 * Class MigrateCommand
12
 * @package ByTIC\Migrations\Console
13
 */
14
class MigrateCommand extends Command
15
{
16 1
    protected function configure()
17
    {
18 1
        parent::configure();
19 1
        $this->setName('migrations:migrate');
20 1
    }
21
22
    /**
23
     * @inheritDoc
24
     * @noinspection PhpMissingParentCallCommonInspection
25
     * @throws Exception
26
     */
27 1
    protected function execute(InputInterface $input, OutputInterface $output)
28
    {
29 1
        $migrator = migrator();
30 1
        return $migrator->migrate($input->getArguments(), $output);
31
    }
32
}
33