StatusCommand::configure()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 14

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 14
ccs 7
cts 7
cp 1
rs 9.7998
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Migrations\Tools\Console\Command;
6
7
use Symfony\Component\Console\Input\InputInterface;
8
use Symfony\Component\Console\Output\OutputInterface;
9
10
/**
11
 * The StatusCommand class is responsible for outputting what the current state is of all your migrations. It shows
12
 * what your current version is, how many new versions you have to execute, etc. and details about each of your migrations.
13
 */
14
final class StatusCommand extends DoctrineCommand
15
{
16
    /** @var string */
17
    protected static $defaultName = 'migrations:status';
18
19 1
    protected function configure() : void
20
    {
21
        $this
22 1
            ->setAliases(['status'])
23 1
            ->setDescription('View the status of a set of migrations.')
24 1
            ->setHelp(<<<EOT
25 1
The <info>%command.name%</info> command outputs the status of a set of migrations:
26
27
    <info>%command.full_name%</info>
28
EOT
29
            );
30
31 1
        parent::configure();
32 1
    }
33
34 1
    protected function execute(InputInterface $input, OutputInterface $output) : int
35
    {
36 1
        $infosHelper = $this->getDependencyFactory()->getMigrationStatusInfosHelper();
37 1
        $infosHelper->showMigrationsInfo($output);
38
39 1
        return 0;
40
    }
41
}
42