MakeCommandCommand::getStub()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace R\Hive\Commands;
4
5
use Symfony\Component\Console\Input\InputOption;
6
7
class MakeCommandCommand extends HiveGeneratorCommand
8
{
9
    /**
10
     * The console command name.
11
     *
12
     * @var string
13
     */
14
    protected $name = 'hive:command';
15
16
    /**
17
     * The console command description.
18
     *
19
     * @var string
20
     */
21
    protected $description = 'Create a new Hive command class.';
22
23
    /**
24
     * The type of class being generated.
25
     *
26
     * @var string
27
     */
28
    protected $type = 'Command';
29
30
    /**
31
     * The compound command to fire after the parent succeeds.
32
     *
33
     * @var string
34
     */
35
    protected $compound = 'handler';
36
37
    /**
38
     * Get the stub file for the generator.
39
     *
40
     * @return string
41
     */
42
    protected function getStub()
43
    {
44
        return __DIR__.'/stubs/command.stub';
45
    }
46
47
    /**
48
     * Get the default namespace for the class.
49
     *
50
     * @param string $rootNamespace
51
     *
52
     * @return string
53
     */
54
    protected function getDefaultNamespace($rootNamespace)
55
    {
56
        return $rootNamespace.'\Lib\Commands';
57
    }
58
59
    /**
60
     * Get the console command options.
61
     *
62
     * @return array
63
     */
64
    protected function getOptions()
65
    {
66
        return [
67
            ['handler', 'H', InputOption::VALUE_NONE, 'Create a handler for this command.'],
68
        ];
69
    }
70
}
71