SeedCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A handle() 0 5 1
1
<?php namespace Jawaraegov\Workflows\Console\Commands;
2
3
use Illuminate\Console\Command;
4
use Illuminate\Support\Facades\Artisan;
5
6
/**
7
 * The WorkflowCommand class.
8
 *
9
 * @package Jawaraegov\Workflows
10
 * @author  Jawaraegov <[email protected]>
11
 */
12
class SeedCommand extends Command
13
{
14
15
    /**
16
     * The name and signature of the console command.
17
     *
18
     * @var string
19
     */
20
    protected $signature = 'jawaraegov:workflow:seed';
21
22
    /**
23
     * The console command description.
24
     *
25
     * @var string
26
     */
27
    protected $description = 'Seed Database';
28
29
    /**
30
     * Create a new command instance.
31
     *
32
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
33
     */
34
    public function __construct()
35
    {
36
        parent::__construct();
37
    }
38
39
    /**
40
     * Execute the console command.
41
     *
42
     * @return mixed
43
     */
44
    public function handle()
45
    {
46
        Artisan::call('db:seed', ['--class' => 'Jawaraegov\Workflows\database\seeds\DatabaseSeeder']);
47
        $this->info('Seeded: Jawaraegov\Workflows\database\seeds\DatabaseSeeder');
48
    }
49
}
50