MigrateCommand   A
last analyzed

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