Completed
Push — dev ( 9312cf...e964a0 )
by Zach
02:18
created

NullCommand::addInput()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 5

Duplication

Lines 10
Ratio 100 %

Importance

Changes 0
Metric Value
cc 2
eloc 5
nc 2
nop 1
dl 10
loc 10
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Yarak\Console\Stubs;
4
5
use Yarak\Console\Command;
6
use Yarak\Console\Input\Input;
7
8
class NullCommand extends Command
9
{
10
    protected $name;
11
12
    protected $description;
13
14
    protected $options = [];
15
16
    protected $arguments = [];
17
18
    public function __construct($name = null)
19
    {
20
        $this->name = $name;
21
    }
22
23
    public function setName($name)
24
    {
25
        $this->name = $name;
26
    }
27
28
    public function setDescription($description)
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