MigrateCommand::configure()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
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