Passed
Push — master ( b3b4c7...2fd2da )
by Arthur
24:27
created

MiddlewareMakeCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 55
ccs 0
cts 15
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

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