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.

JobUtils::configureJobNamesArgument()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 2
crap 1
1
<?php
2
/**
3
 * @package: chapi
4
 *
5
 * @author:  msiebeneicher
6
 * @since:   2015-09-02
7
 */
8
9
namespace Chapi\Component\Command;
10
11
use Symfony\Component\Console\Command\Command;
12
use Symfony\Component\Console\Input\InputArgument;
13
use Symfony\Component\Console\Input\InputInterface;
14
15
class JobUtils implements JobUtilsInterface
16
{
17
    /**
18
     * @inheritdoc
19
     */
20 8
    public static function configureJobNamesArgument(Command $command, $description)
21
    {
22 8
        $command->addArgument(self::ARGUMENT_JOBNAMES, InputArgument::IS_ARRAY, $description);
23 8
    }
24
25
    /**
26
     * @inheritdoc
27
     */
28 9
    public static function getJobNames(InputInterface $input, Command $command)
29
    {
30 9
        $jobNames = $input->getArgument(self::ARGUMENT_JOBNAMES);
31
32 9
        if (empty($jobNames)) {
33 1
            throw new \InvalidArgumentException(sprintf('Nothing specified, nothing %sed. Maybe you wanted to say "%s ."?', $command->getName(), $command->getName()));
34
        }
35
36 8
        return $jobNames;
37
    }
38
39
    /**
40
     * @inheritdoc
41
     */
42 8
    public static function isWildcard(array $jobNames)
43
    {
44 8
        return (isset($jobNames[0]) && in_array($jobNames[0], ['.', '*']));
45
    }
46
}
47