MakeIntentCommand   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 8
dl 0
loc 28
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A qualifyClass() 0 3 1
A getStub() 0 3 1
A getPath() 0 3 1
A getNamespace() 0 3 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