Passed
Push — master ( 4c85b9...e180ca )
by Arthur
36:55
created

GuardMakeCommand::stubOptions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Foundation\Generator\Commands;
4
5
use Foundation\Generator\Abstracts\ClassGeneratorCommand;
6
use Foundation\Generator\Events\EventGeneratedEvent;
7
use Foundation\Generator\Events\GuardGeneratedEvent;
8
9
class GuardMakeCommand extends ClassGeneratorCommand
10
{
11
    /**
12
     * The console command name.
13
     *
14
     * @var string
15
     */
16
    protected $name = 'larapi:make:guard';
17
18
    /**
19
     * The console command description.
20
     *
21
     * @var string
22
     */
23
    protected $description = 'Create a new guard class for the specified module';
24
25
    /**
26
     * The name of the generated resource.
27
     *
28
     * @var string
29
     */
30
    protected $generatorName = 'guard';
31
32
    /**
33
     * The stub name.
34
     *
35
     * @var string
36
     */
37
    protected $stub = 'guard.stub';
38
39
    /**
40
     * The file path.
41
     *
42
     * @var string
43
     */
44
    protected $filePath = '/Guards';
45
46
    /**
47
     * The event that will fire when the file is created.
48
     *
49
     * @var string
50
     */
51
    protected $event = GuardGeneratedEvent::class;
52
53
    protected function stubOptions(): array
54
    {
55
        return [
56
            'NAMESPACE' => $this->getClassNamespace(),
57
            'CLASS' => $this->getClassName(),
58
        ];
59
    }
60
}
61