InputArgs::getArguments()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
4
namespace Genesis;
5
6
7
/**
8
 * @author Adam Bisek <[email protected]>
9
 *
10
 * InputArgs
11
 */
12
class InputArgs
13
{
14
15
	private $arguments = [];
16
17
	private $options = [];
18
19
20
	/**
21
	 * @return array
22
	 */
23 14
	public function getArguments()
24
	{
25 14
		return $this->arguments;
26
	}
27
28
29
	/**
30
	 * @param array $arguments
31
	 */
32 15
	public function setArguments(array $arguments)
33
	{
34 15
		$this->arguments = $arguments;
35 15
	}
36
37
38
	/**
39
	 * @return array
40
	 */
41 1
	public function getOptions()
42
	{
43 1
		return $this->options;
44
	}
45
46
47
	/**
48
	 * @param $name
49
	 * @return string
50
	 */
51 15
	public function getOption($name)
52
	{
53 15
		if (!isset($this->options[$name])) {
54 9
			return NULL;
55
		}
56 15
		return $this->options[$name];
57
	}
58
59
60
	/**
61
	 * @param array $options
62
	 */
63 15
	public function setOptions(array $options)
64
	{
65 15
		$this->options = $options;
66 15
	}
67
68
}