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.

GitTask::offsetSet()   A
last analyzed

Complexity

Conditions 4
Paths 3

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 8
nc 3
nop 2
dl 0
loc 13
rs 9.2
c 0
b 0
f 0
1
<?php
2
/**
3
 * See class comment
4
 *
5
 * PHP Version 5
6
 *
7
 * @category   Netresearch
8
 * @package    Netresearch\Kite
9
 * @subpackage Task
10
 * @author     Christian Opitz <[email protected]>
11
 * @license    http://www.netresearch.de Netresearch Copyright
12
 * @link       http://www.netresearch.de
13
 */
14
15
namespace Netresearch\Kite\Task;
16
17
/**
18
 * Execute a git command and return the result
19
 *
20
 * @category   Netresearch
21
 * @package    Netresearch\Kite
22
 * @subpackage Task
23
 * @author     Christian Opitz <[email protected]>
24
 * @license    http://www.netresearch.de Netresearch Copyright
25
 * @link       http://www.netresearch.de
26
 */
27
class GitTask extends ShellTask
28
{
29
    /**
30
     * Infere command to gitCommand
31
     *
32
     * @param string $name  Name
33
     * @param mixed  $value Value
34
     *
35
     * @return void
36
     */
37
    public function offsetSet($name, $value)
38
    {
39
        if ($name === 'command') {
40
            if (is_array($value)) {
41
                foreach ($value as &$item) {
42
                    $item = 'git ' . $item;
43
                }
44
            } else {
45
                $value = 'git ' .  $value;
46
            }
47
        }
48
        parent::offsetSet($name, $value);
49
    }
50
}
51
?>
52