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.

MigrationsGeneratorCommand   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 1
cbo 2
dl 0
loc 39
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A handle() 0 17 2
1
<?php
2
3
namespace Elimuswift\DbExporter\Commands;
4
5
use Elimuswift\DbExporter\DbExportHandler;
6
7
class MigrationsGeneratorCommand extends GeneratorCommand
8
{
9
    protected $name = 'db-exporter:migrations';
10
11
    protected $description = 'Export your database to migrations.';
12
    /**
13
     * @var \Elimuswift\DbExporter\DbExportHandler
14
     */
15
    protected $handler;
16
17
    public function __construct(DbExportHandler $handler)
18
    {
19
        parent::__construct();
20
21
        $this->handler = $handler;
22
    }
23
24
    //end __construct()
25
26
    public function handle()
27
    {
28
        $database = $this->argument('database');
29
30
        // Display some helpfull info
31
        if (empty($database)) {
32
            $this->comment("Preparing the migrations for database: {$this->getDatabaseName()}");
33
            $database = $this->getDatabaseName();
34
        } else {
35
            $this->comment("Preparing the migrations for database {$database}");
36
        }
37
38
        $this->fireAction('migrate', $database);
39
40
        // Symfony style block messages
41
        $this->blockMessage('Success!', 'Database migrations generated in: '.$this->handler->getMigrationsFilePath());
42
    }
43
44
    //end fire()
45
}//end class
46