Passed
Push — master ( 624a9a...4c85b9 )
by Arthur
36:47
created

DtoMakeCommand::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\AttributeGeneratedEvent;
7
use Foundation\Generator\Events\DtoGeneratedEvent;
8
use Foundation\Generator\Events\EventGeneratedEvent;
9
use Foundation\Generator\Events\ServiceGeneratedEvent;
10
use Foundation\Generator\Managers\GeneratorManager;
11
12
class DtoMakeCommand extends ClassGeneratorCommand
13
{
14
    /**
15
     * The console command name.
16
     *
17
     * @var string
18
     */
19
    protected $name = 'larapi:make:dto';
20
21
    /**
22
     * The console command description.
23
     *
24
     * @var string
25
     */
26
    protected $description = 'Create a new data transfer object';
27
28
    /**
29
     * The name of the generated resource.
30
     *
31
     * @var string
32
     */
33
    protected $generatorName = 'dto';
34
35
    /**
36
     * The stub name.
37
     *
38
     * @var string
39
     */
40
    protected $stub = 'dto.stub';
41
42
    /**
43
     * The file path.
44
     *
45
     * @var string
46
     */
47
    protected $filePath = '/Dtos';
48
49
    /**
50
     * The event that will fire when the file is created.
51
     *
52
     * @var string
53
     */
54
    protected $event = DtoGeneratedEvent::class;
55
56 3
    protected function stubOptions(): array
57
    {
58
        return [
59 3
            'NAMESPACE' => $this->getClassNamespace(),
60 3
            'CLASS' => $this->getClassName(),
61
        ];
62
    }
63
}
64