GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ArgvInputExtended   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A isOptionSet() 0 4 1
1
<?php
2
/**
3
 * This file is part of the Gerrie package.
4
 *
5
 * (c) Andreas Grunwald <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Gerrie\Component\Console;
12
13
use Symfony\Component\Console\Input\ArgvInput;
14
15
/**
16
 * ArgvInputExtended is a class to implement the extended version of InputInterface "InputExtendedInterface"
17
 * to complete missing functionality.
18
 *
19
 * @author Andreas Grunwald <[email protected]>
20
 *
21
 * @api
22
 */
23
class ArgvInputExtended extends ArgvInput implements InputExtendedInterface
24
{
25
26
    /**
27
     * Returns true if a option is set during the command call.
28
     *
29
     * This method is useful if you want to know if an option was passed during the command call.
30
     * Sometimes this is useful, e.g. to overwrite only values if you pass them.
31
     *
32
     * Example definition in a command:
33
     *      protected function configure() {
34
     *          $this->setName('my:command')
35
     *               ->addOption('foo', 'f', InputOption::VALUE_REQUIRED, 'Description', 'Default Value');
36
     *          ...
37
     *
38
     * Example:
39
     *      $ ./console my:command --foo=bar
40
     *      $input->isOptionSet('foo') => true
41
     *
42
     *      $ ./console my:command
43
     *      $input->isOptionSet('foo') => false
44
     *
45
     * @param string $optionName Name of the option you want to check ('foo' from example).
46
     * @return boolean
47
     */
48 7
    public function isOptionSet($optionName)
49
    {
50 7
        return array_key_exists($optionName, $this->options);
51
    }
52
}
53