Completed
Push — dev ( 122982...5e45c8 )
by Zach
02:18
created

NullCommand::addOption()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 5
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Yarak\Console\Stubs;
4
5
use Symfony\Component\Console\Command\Command;
6
7
class NullCommand extends Command
8
{
9
    protected $name;
10
11
    protected $description;
12
13
    protected $options = [];
14
15
    protected $arguments = [];
16
17
    function __construct($name = null)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
18
    {
19
        $this->name = $name;
20
    }
21
22
    public function setName($name)
23
    {
24
        $this->name = $name;
25
    }
26
27
    public function setDescription($description)
28
    {
29
        
30
    }
31
32
    public function addArgument($name, $mode = NULL, $description = '', $default = NULL)
33
    {
34
        $this->arguments[] = [
35
            'name'        => $name,
36
            'mode'        => $mode,
37
            'description' => $description,
38
            'default'     => $default,
39
        ];
40
    }
41
42
    public function addOption($name, $shortcut = NULL, $mode = NULL, $description = '', $default = NULL)
43
    {
44
        $this->options[] = [
45
            'name'        => $name,
46
            'shortcut'    => $shortcut,
47
            'mode'        => $mode,
48
            'description' => $description,
49
            'default'     => $default,
50
        ];
51
    }
52
53
    public function getName()
54
    {
55
        return $this->name;
56
    }
57
58
    public function getDescription()
59
    {
60
        return $this->description;
61
    }
62
63
    public function getArguments()
64
    {
65
        return $this->arguments;
66
    }
67
68
    public function getOptions()
69
    {
70
        return $this->options;
71
    }
72
}
73