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.

RenderingEngine::setName()   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
dl 0
loc 4
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
namespace UserAgentParser\Model;
3
4
/**
5
 * Rendering engine model
6
 *
7
 * @author Martin Keckeis <[email protected]>
8
 * @license MIT
9
 */
10
class RenderingEngine
11
{
12
    /**
13
     * @var string
14
     */
15
    private $name;
16
17
    /**
18
     * @var Version
19
     */
20
    private $version;
21
22 3
    public function __construct()
23
    {
24 3
        $this->version = new Version();
25 3
    }
26
27
    /**
28
     *
29
     * @param string $name
30
     */
31 2
    public function setName($name)
32
    {
33 2
        $this->name = $name;
34 2
    }
35
36
    /**
37
     *
38
     * @return string
39
     */
40 2
    public function getName()
41
    {
42 2
        return $this->name;
43
    }
44
45
    /**
46
     * @param Version $version
47
     */
48 1
    public function setVersion(Version $version)
49
    {
50 1
        $this->version = $version;
51 1
    }
52
53
    /**
54
     * @return Version
55
     */
56 2
    public function getVersion()
57
    {
58 2
        return $this->version;
59
    }
60
61
    /**
62
     * @return array
63
     */
64 1
    public function toArray()
65
    {
66
        return [
67 1
            'name'    => $this->getName(),
68 1
            'version' => $this->getVersion()->toArray(),
69
        ];
70
    }
71
}
72