Completed
Pull Request — master (#76)
by Marcel
33:21
created

InspectableArgvInput::hasArgumentSet()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace PHPSemVerChecker\Console;
4
5
use Symfony\Component\Console\Input\ArgvInput;
6
7
class InspectableArgvInput extends ArgvInput
8
{
9
	/**
10
	 * Returns true if the argument value is set.
11
	 *
12
	 * @param string $name The argument name
13
	 *
14
	 * @return bool true if the argument is set (not a default value)
15
	 */
16
	public function hasArgumentSet($name)
17
	{
18
		return isset($this->arguments[$name]);
19
	}
20
21
	/**
22
	 * Returns true if the option value is set.
23
	 *
24
	 * @param string $name The option name
25
	 *
26
	 * @return bool true if the option is set (not a default value)
27
	 */
28
	public function hasOptionSet($name)
29
	{
30
		return isset($this->options[$name]);
31
	}
32
}
33