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.

ChapiApplication::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 11
ccs 0
cts 7
cp 0
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 6
nc 2
nop 2
crap 6
1
<?php
2
/**
3
 * @package: Chapi
4
 *
5
 * @author:  msiebeneicher
6
 * @since:   2015-07-28
7
 *
8
 */
9
namespace Chapi;
10
11
use Symfony\Component\Console\Application;
12
13
class ChapiApplication extends Application
14
{
15
    public function __construct($name = 'Chapi', $version = '@package_version@')
16
    {
17
        if ('@package_version@' !== $version) {
18
            $version = ltrim($version, 'v');
0 ignored issues
show
Coding Style introduced by
Consider using a different name than the parameter $version. This often makes code more readable.
Loading history...
19
        }
20
21
        parent::__construct($name, $version);
22
23
        $this->setDefaultCommand('help.commands');
24
        $this->addCommands($this->getCommands());
25
    }
26
27
    /**
28
     * @return \Symfony\Component\Console\Command\Command[]
29
     */
30
    private function getCommands()
31
    {
32
        return [
33
            // GENERAL COMMANDS
34
            new Commands\AddCommand(),
35
            new Commands\CommitCommand(),
36
            new Commands\ConfigureCommand(),
37
            new Commands\DiffCommand(),
38
            new Commands\HelpCommandsCommand(),
39
            new Commands\InfoCommand(),
40
            new Commands\ListCommand(),
41
            new Commands\PullCommand(),
42
            new Commands\ResetCommand(),
43
            new Commands\SchedulingViewCommand(),
44
            new Commands\StatusCommand(),
45
            new Commands\ValidationCommand(),
46
        ];
47
    }
48
}
49