Passed
Push — master ( ff4e9f...624a9a )
by Arthur
35:46
created

EventMakeCommand::stubOptions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

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