Total Complexity | 9 |
Total Lines | 63 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
7 | class NullCommand extends Command |
||
8 | { |
||
9 | protected $name; |
||
10 | |||
11 | protected $description; |
||
12 | |||
13 | protected $options = []; |
||
14 | |||
15 | protected $arguments = []; |
||
16 | |||
17 | public function __construct($name = null) |
||
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 | public function addArgument($name, $mode = null, $description = '', $default = null) |
||
32 | { |
||
33 | $this->arguments[] = [ |
||
34 | 'name' => $name, |
||
35 | 'mode' => $mode, |
||
36 | 'description' => $description, |
||
37 | 'default' => $default, |
||
38 | ]; |
||
39 | } |
||
40 | |||
41 | public function addOption($name, $shortcut = null, $mode = null, $description = '', $default = null) |
||
42 | { |
||
43 | $this->options[] = [ |
||
44 | 'name' => $name, |
||
45 | 'shortcut' => $shortcut, |
||
46 | 'mode' => $mode, |
||
47 | 'description' => $description, |
||
48 | 'default' => $default, |
||
49 | ]; |
||
50 | } |
||
51 | |||
52 | public function getName() |
||
53 | { |
||
54 | return $this->name; |
||
55 | } |
||
56 | |||
57 | public function getDescription() |
||
58 | { |
||
59 | return $this->description; |
||
60 | } |
||
61 | |||
62 | public function getArguments() |
||
63 | { |
||
64 | return $this->arguments; |
||
65 | } |
||
66 | |||
67 | public function getOptions() |
||
68 | { |
||
69 | return $this->options; |
||
70 | } |
||
72 |