DatabaseMigrate::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
ccs 0
cts 5
cp 0
crap 2
rs 10
1
<?php
2
3
namespace CodexShaper\DBM\Commands;
4
5
use Illuminate\Console\Command;
6
7
class DatabaseMigrate extends Command
8
{
9
    /**
10
     * The console command name.
11
     *
12
     * @var string
13
     */
14
    protected $name = 'dbm:migrate';
15
    /**
16
     * The console command description.
17
     *
18
     * @var string
19
     */
20
    protected $description = 'Migrate the Laravel Database Manager';
21
22
    /**
23
     * Execute the console command.
24
     *
25
     * @param \Illuminate\Filesystem\Filesystem $filesystem
26
     *
27
     * @return void
28
     */
29
    public function handle()
30
    {
31
        $migrationPath = config('dbm.migrations', '/vendor/codexshaper/laravel-database-manager/database/migrations');
32
        // Migrate Database
33
        $this->info('Migrating the database manager tables into your application');
34
        $this->call('migrate', ['--path' => $migrationPath, '--force' => 'force']);
35
    }
36
}
37