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.
Test Setup Failed
Push — master ( e165f3...e86535 )
by Albert
03:50
created

GeneratorCommand::sectionMessage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 2
1
<?php 
2
namespace Elimuswift\DbExporter\Commands;
3
4
use Config;
5
use Illuminate\Console\Command;
6
use Symfony\Component\Console\Input\InputOption;
7
use Symfony\Component\Console\Input\InputArgument;
8
9
class GeneratorCommand extends Command
10
{
11
    /**
12
     * Get the database name from the app/config/database.php file
13
     * @return String
14
     */
15
    protected function getDatabaseName()
16
    {
17
        $connType = Config::get('database.default');
18
        $database = Config::get('database.connections.' .$connType );
19
20
        return $database['database'];
21
    }
22
23
    protected function blockMessage($title, $message, $style = 'info')
24
    {
25
        // Symfony style block messages
26
        $formatter = $this->getHelperSet()->get('formatter');
27
        $errorMessages = array($title, $message);
28
        $formattedBlock = $formatter->formatBlock($errorMessages, $style, true);
29
        $this->line($formattedBlock);
30
    }
31
32
    protected function sectionMessage($title, $message)
33
    {
34
        $formatter = $this->getHelperSet()->get('formatter');
35
        $formattedLine = $formatter->formatSection(
36
            $title,
37
            $message
38
        );
39
        $this->line($formattedLine);
40
    }
41
    protected function getArguments()
42
    {
43
        return array(
44
            array('database', InputArgument::OPTIONAL, 'Override the application database')
45
        );
46
    }
47
48
    protected function getOptions()
49
    {
50
        return array(
51
            array('ignore', 'i', InputOption::VALUE_REQUIRED, 'Ignore tables to export, seperated by a comma', null)
52
        );
53
    }
54
55
    protected function fireAction($action,$database)
56
    {
57
        // Grab the options
58
        $ignore = $this->option('ignore');
59
60
        if (empty($ignore)) {
61
            $this->handler->$action($database);
62
        } else {
63
            $tables = explode(',', str_replace(' ', '', $ignore));
64
65
            $this->handler->ignore($tables)->$action($database);
66
            foreach (DbExporter::$ignore as $table) {
67
                $this->comment("Ignoring the {$table} table");
68
            }
69
        }
70
    }
71
}