GenerateResourcePermissions::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace BBSLab\NovaPermission\Console\Commands;
4
5
use BBSLab\NovaPermission\Actions\GenerateResourcePermissionsAction;
6
use Illuminate\Console\Command;
7
8
class GenerateResourcePermissions extends Command
9
{
10
    /**
11
     * The name and signature of the console command.
12
     *
13
     * @var string
14
     */
15
    protected $signature = 'nova-permission:generate';
16
17
    /**
18
     * The console command description.
19
     *
20
     * @var string
21
     */
22
    protected $description = 'Generate resource permissions';
23
24
    /**
25
     * Execute the console command.
26
     *
27
     * @param  \BBSLab\NovaPermission\Actions\GenerateResourcePermissionsAction  $action
28
     * @return mixed
29
     */
30
    public function handle(GenerateResourcePermissionsAction $action)
31
    {
32
        $this->comment('Generating permissions');
33
34
        $action->execute();
35
36
        $this->info('Permission generated');
37
    }
38
}
39