Passed
Push — master ( 8a373e...617e52 )
by Arthur
22:06
created

AttributeMakeCommand::stubOptions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
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\EventGeneratedEvent;
8
use Foundation\Generator\Events\ServiceGeneratedEvent;
9
use Foundation\Generator\Managers\GeneratorManager;
10
11
class AttributeMakeCommand extends ClassGeneratorCommand
12
{
13
    /**
14
     * The console command name.
15
     *
16
     * @var string
17
     */
18
    protected $name = 'larapi:make:attribute';
19
20
    /**
21
     * The console command description.
22
     *
23
     * @var string
24
     */
25
    protected $description = 'Create a new attribute interface for a model';
26
27
    /**
28
     * The name of the generated resource.
29
     *
30
     * @var string
31
     */
32
    protected $generatorName = 'attribute';
33
34
    /**
35
     * The stub name.
36
     *
37
     * @var string
38
     */
39
    protected $stub = 'attribute.stub';
40
41
    /**
42
     * The file path.
43
     *
44
     * @var string
45
     */
46
    protected $filePath = '/Attributes';
47
48
    /**
49
     * The event that will fire when the file is created.
50
     *
51
     * @var string
52
     */
53
    protected $event = AttributeGeneratedEvent::class;
54
55
    protected function stubOptions(): array
56
    {
57
        return [
58
            'NAMESPACE' => $this->getClassNamespace(),
59
            'CLASS' => $this->getClassName(),
60
        ];
61
    }
62
63
    protected function afterGeneration(): void
64
    {
65
        $this->info("don't forget to implement this attribute on the model");
66
    }
67
}
68