Completed
Push — develop ( 9cc351...6f56c4 )
by Abdelrahman
14:30
created

SeedCommand::handle()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 2
eloc 4
nc 2
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cortex\Console\Console\Commands;
6
7
use Illuminate\Console\Command;
8
use Rinvex\Support\Traits\SeederHelper;
9
10
class SeedCommand extends Command
11
{
12
    use SeederHelper;
13
14
    /**
15
     * The name and signature of the console command.
16
     *
17
     * @var string
18
     */
19
    protected $signature = 'cortex:seed:console';
20
21
    /**
22
     * The console command description.
23
     *
24
     * @var string
25
     */
26
    protected $description = 'Seed Cortex Console Data.';
27
28
    /**
29
     * Execute the console command.
30
     *
31
     * @return void
32
     */
33
    public function handle()
34
    {
35
        $this->warn($this->description);
36
37
        if ($this->ensureExistingDatabaseTables('rinvex/fort')) {
38
            $this->seedResources(app('rinvex.fort.ability'), realpath(__DIR__.'/../../../resources/data/abilities.json'), ['name', 'description', 'policy']);
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 157 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
39
        }
40
    }
41
}
42