GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

StatusCommand::configure()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Dami\Cli\Command;
4
5
use Symfony\Component\Console\Input\InputArgument,
6
    Symfony\Component\Console\Input\InputOption,
7
    Symfony\Component\Console,
8
    Symfony\Component\Console\Input\InputInterface,
9
    Symfony\Component\Console\Output\OutputInterface;
10
11
use Dami\Migration\MigrationFiles;
12
13
class StatusCommand extends ContainerAwareCommand
14
{
15
    protected function configure()
16
    {
17
        parent::configure();
18
        $this
19
            ->setDescription('Migrations status.');
20
    }
21
22
    protected function execute(InputInterface $input, OutputInterface $output)
23
    {
24
        parent::execute($input, $output);
25
26
        $migrationFiles = $this->getContainer()->get('dami.migration_files');
27
        $migrationFiles->statusIntention();
28
        $rows = array();
29
        foreach ($migrationFiles->get() as $migrationFile) {
30
            $status = $migrationFile->isMigrated() ? 'Migrated' : 'Not migrated';
31
            $rows[] = array($status, $migrationFile->getVersion(), $migrationFile->getName());
32
        }
33
        if (count($rows) > 0) {
34
            $table = $this->getHelperSet()->get('table');
35
            $table
36
                ->setHeaders(array('Status', 'Version', 'Name'))
37
                ->setRows($rows)
38
                ->render($output);
39
        } else {
40
            $output->writeln(sprintf('<comment>There are no migrations.</comment>'));
41
        }
42
    }
43
}
44