MakeTacticianCommandCommand   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 46
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getDefaultNamespace() 0 3 1
A getStub() 0 3 1
A getPath() 0 3 1
1
<?php
2
3
namespace Joselfonseca\LaravelTactician\Commands;
4
5
use Illuminate\Console\GeneratorCommand;
6
use Illuminate\Support\Str;
7
8
/**
9
 * Create a new Tactician Command
10
 * @package Joselfonseca\LaravelTactician\Commands
11
 */
12
class MakeTacticianCommandCommand extends GeneratorCommand
13
{
14
    /**
15
     * The console command name.
16
     *
17
     * @var string
18
     */
19
    protected $name = 'make:tactician:command';
20
21
    /**
22
     * The console command description.
23
     *
24
     * @var string
25
     */
26
    protected $description = 'Create a new Tactician Command';
27
28
    /**
29
     * Get the stub file for the generator.
30
     *
31
     * @return string
32
     */
33
    protected function getStub()
34
    {
35
        return __DIR__.'/../../stubs/command.stub';
36
    }
37
38
    /**
39
     * Get the default namespace for the class.
40
     *
41
     * @param  string  $rootNamespace
42
     * @return string
43
     */
44
    protected function getDefaultNamespace($rootNamespace)
45
    {
46
        return $rootNamespace.'\Commands';
47
    }
48
49
    /**
50
     * Get the destination class path.
51
     *
52
     * @param  string $name
53
     * @return string
54
     */
55
    protected function getPath($name)
56
    {
57
        return parent::getPath($name.'Command');
58
    }
59
}
60