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.

Exec   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getCommandForDirectory() 0 7 1
1
<?php
2
/**
3
 * Exec.php
4
 *
5
 * @package         ProjectVersioner
6
 * @subpackage      Reader
7
 */
8
9
namespace Naneau\ProjectVersioner\Reader\Git\Describe;
10
11
use Naneau\ProjectVersioner\Reader\Git\Exec as GitExec;
12
13
/**
14
 * Exec
15
 *
16
 * Reads the latest "described" version from git, which includes the latest
17
 * (reachable) tag, and a postfix for any commits added after that
18
 *
19
 * For example: 3.0.2-12-gd504031 for tag 3.0.2, with 12 additional commits,
20
 * the latest being gd504031
21
 *
22
 * @see http://git-scm.com/docs/git-describe
23
 *
24
 * @category        Naneau
25
 * @package         ProjectVersioner
26
 * @subpackage      Reader
27
 */
28
class Exec extends GitExec
29
{
30
    /**
31
     * Get command for directory
32
     *
33
     * @param  string $directory
34
     * @return string
35
     **/
36
    protected function getCommandForDirectory($directory)
37
    {
38
        return sprintf(
39
            'cd %s && git describe',
40
            escapeshellarg($directory)
41
        );
42
    }
43
}
44