Passed
Push — master ( 84911a...1f9a15 )
by Vladimir
02:21
created

MakeIntentCommand::getNamespace()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FondBot\Console;
6
7
use Illuminate\Console\GeneratorCommand;
8
9
class MakeIntentCommand extends GeneratorCommand
10
{
11
    protected $name = 'fondbot:make:intent';
12
    protected $description = 'Create a new intent class';
13
    protected $type = 'Intent';
14
15
    /** {@inheritdoc} */
16
    protected function getStub(): string
17
    {
18
        return __DIR__.'/../../resources/stubs/Intent.stub';
19
    }
20
21
    /** {@inheritdoc} */
22
    protected function qualifyClass($name): string
23
    {
24
        return $name;
25
    }
26
27
    /** {@inheritdoc} */
28
    protected function getPath($name): string
29
    {
30
        return $this->laravel['path'].'/Intents/'.$name.'.php';
31
    }
32
33
    /** {@inheritdoc} */
34
    protected function getNamespace($name): string
35
    {
36
        return 'Intents';
37
    }
38
}
39