Passed
Push — master ( c7459e...5c3821 )
by Arthur
22:05
created

RuleMakeCommand::stubOptions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Foundation\Generator\Commands;
4
5
use Foundation\Generator\Abstracts\AbstractGeneratorCommand;
6
7
class RuleMakeCommand extends AbstractGeneratorCommand
8
{
9
    /**
10
     * The console command name.
11
     *
12
     * @var string
13
     */
14
    protected $name = 'larapi:make:rule';
15
16
    /**
17
     * The console command description.
18
     *
19
     * @var string
20
     */
21
    protected $description = 'Create a new validation rule for the specified module.';
22
23
    /**
24
     * The name of the generated resource.
25
     *
26
     * @var string
27
     */
28
    protected $generatorName = 'rule';
29
30
    /**
31
     * The stub name.
32
     *
33
     * @var string
34
     */
35
    protected $stub = 'rule.stub';
36
37
    /**
38
     * The file path.
39
     *
40
     * @var string
41
     */
42
    protected $filePath = '/Rules';
43
44
    protected function stubOptions(): array
45
    {
46
        return [
47
            'NAMESPACE' => $this->getClassNamespace(),
48
            'CLASS' => $this->getClassName(),
49
        ];
50
    }
51
}
52