Completed
Push — master ( 6d20cc...f05bcc )
by T
10:20
created

InspectableArgvInput   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 2
cbo 1
dl 0
loc 26
ccs 4
cts 4
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A hasArgumentSet() 0 4 1
A hasOptionSet() 0 4 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 1
	public function hasArgumentSet($name)
17
	{
18 1
		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 1
	public function hasOptionSet($name)
29
	{
30 1
		return isset($this->options[$name]);
31
	}
32
}
33