MigrateListCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 27
c 0
b 0
f 0
wmc 2
lcom 1
cbo 2
ccs 0
cts 11
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A execute() 0 6 1
1
<?php
2
/**
3
 * Created by IntelliJ IDEA.
4
 * User: gerk
5
 * Date: 20.04.17
6
 * Time: 00:47
7
 */
8
9
namespace PeekAndPoke\Component\Slumber\FrameworkIntegration\Cli;
10
11
use PeekAndPoke\Component\Slumber\Data\Migration\MigrationExecutor;
12
use Symfony\Component\Console\Command\Command;
13
use Symfony\Component\Console\Input\InputInterface;
14
use Symfony\Component\Console\Output\OutputInterface;
15
16
17
/**
18
 * @author Karsten J. Gerber <[email protected]>
19
 */
20
class MigrateListCommand extends Command
21
{
22
    /** @var MigrationExecutor */
23
    private $migrationExecutor;
24
25
    public function __construct(MigrationExecutor $migrationExecutor)
26
    {
27
        parent::__construct('slumber:migrate');
28
29
        $this->setDescription('List available and executed migrations');
30
31
        $this->migrationExecutor = $migrationExecutor;
32
    }
33
34
    /**
35
     * @param InputInterface  $input
36
     * @param OutputInterface $output
37
     *
38
     * @return mixed
39
     */
40
    protected function execute(InputInterface $input, OutputInterface $output)
41
    {
42
        $this->migrationExecutor->logStats();
43
44
        return 0;
45
    }
46
}
47