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.

Version::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 3
crap 1
1
<?php
2
3
/*
4
 * This file is part of the composer-changelogs project.
5
 *
6
 * (c) Loïck Piera <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Pyrech\ComposerChangelogs;
13
14
class Version
15
{
16
    /** @var string */
17
    private $name;
18
19
    /** @var string */
20
    private $pretty;
21
22
    /** @var string */
23
    private $fullPretty;
24
25
    /**
26
     * @param string $name
27
     * @param string $pretty
28
     * @param string $fullPretty
29
     */
30 94
    public function __construct($name, $pretty, $fullPretty)
31
    {
32 94
        $this->name = $name;
33 94
        $this->pretty = $pretty;
34 94
        $this->fullPretty = $fullPretty;
35 94
    }
36
37
    /**
38
     * @return string
39
     */
40 22
    public function getName()
41
    {
42 22
        return $this->name;
43
    }
44
45
    /**
46
     * @return string
47
     */
48 68
    public function getPretty()
49
    {
50 68
        return $this->pretty;
51
    }
52
53
    /**
54
     * @return string
55
     */
56 8
    public function getFullPretty()
57
    {
58 8
        return $this->fullPretty;
59
    }
60
61
    /**
62
     * Return whether the version is dev or not.
63
     *
64
     * @return string
65
     */
66 46
    public function isDev()
67
    {
68 46
        return substr($this->name, 0, 4) === 'dev-' || substr($this->name, -4) === '-dev';
69
    }
70
}
71