ArgvInput::hasOptionSpecified()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
/**
4
 * TechDivision\Import\Cli\Console\ArgvInput
5
 *
6
 * PHP version 7
7
 *
8
 * @author    Tim Wagner <[email protected]>
9
 * @copyright 2016 TechDivision GmbH <[email protected]>
10
 * @license   https://opensource.org/licenses/MIT
11
 * @link      https://github.com/techdivision/import-cli-simple
12
 * @link      http://www.techdivision.com
13
 */
14
15
namespace TechDivision\Import\Cli\Console;
16
17
/**
18
 * Utility class containing the available visibility keys.
19
 *
20
 * @author    Tim Wagner <[email protected]>
21
 * @copyright 2016 TechDivision GmbH <[email protected]>
22
 * @license   https://opensource.org/licenses/MIT
23
 * @link      https://github.com/techdivision/import-cli-simple
24
 * @link      http://www.techdivision.com
25
 */
26
class ArgvInput extends \Symfony\Component\Console\Input\ArgvInput
27
{
28
29
    /**
30
     * Queries whether or not, a option value HAS been specified on command line.
31
     *
32
     * @param string $name The option name to be queried
33
     *
34
     * @return boolean TRUE if the option has been specified, else FALSE
35
     */
36
    public function hasOptionSpecified($name)
37
    {
38
        return isset($this->options[$name]);
39
    }
40
}
41