Passed
Push — master ( 617e52...ff4e9f )
by Arthur
35:51
created

ProviderMakeCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 49
rs 10
c 0
b 0
f 0
ccs 3
cts 3
cp 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A stubOptions() 0 5 1
1
<?php
2
3
namespace Foundation\Generator\Commands;
4
5
use Foundation\Generator\Abstracts\AbstractGeneratorCommand;
6
use Foundation\Generator\Abstracts\ClassGeneratorCommand;
7
use Foundation\Generator\Events\ProviderGeneratedEvent;
8
9
class ProviderMakeCommand extends ClassGeneratorCommand
10
{
11
    /**
12
     * The console command name.
13
     *
14
     * @var string
15
     */
16
    protected $name = 'larapi:make:provider';
17
18
    /**
19
     * The console command description.
20
     *
21
     * @var string
22
     */
23
    protected $description = 'Create a new service provider class for the specified module.';
24
25
    /**
26
     * The name of the generated resource.
27
     *
28
     * @var string
29
     */
30
    protected $generatorName = 'provider';
31
32
    /**
33
     * The stub name.
34
     *
35
     * @var string
36
     */
37
    protected $stub = 'provider.stub';
38
39
    /**
40
     * The file path.
41
     *
42
     * @var string
43
     */
44
    protected $filePath = '/Providers';
45
46
    /**
47
     * The event that will fire when the file is created.
48
     *
49
     * @var string
50
     */
51
    protected $event = ProviderGeneratedEvent::class;
52
53 1
    protected function stubOptions(): array
54
    {
55
        return [
56 1
            'NAMESPACE' => $this->getClassNamespace(),
57 1
            'CLASS' => $this->getClassName(),
58
        ];
59
    }
60
}
61