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.

Bot::setIsBot()   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
 * Bot model
6
 *
7
 * @author Martin Keckeis <[email protected]>
8
 * @license MIT
9
 */
10
class Bot
11
{
12
    /**
13
     *
14
     * @var boolean
15
     */
16
    private $isBot;
17
18
    /**
19
     *
20
     * @var string
21
     */
22
    private $name;
23
24
    /**
25
     *
26
     * @var string
27
     */
28
    private $type;
29
30
    /**
31
     *
32
     * @param boolean $mode
33
     */
34 2
    public function setIsBot($mode)
35
    {
36 2
        $this->isBot = $mode;
37 2
    }
38
39
    /**
40
     *
41
     * @return boolean
42
     */
43 2
    public function getIsBot()
44
    {
45 2
        return $this->isBot;
46
    }
47
48
    /**
49
     *
50
     * @param string $name
51
     */
52 2
    public function setName($name)
53
    {
54 2
        $this->name = $name;
55 2
    }
56
57
    /**
58
     *
59
     * @return string
60
     */
61 2
    public function getName()
62
    {
63 2
        return $this->name;
64
    }
65
66
    /**
67
     *
68
     * @param string $type
69
     */
70 2
    public function setType($type)
71
    {
72 2
        $this->type = $type;
73 2
    }
74
75
    /**
76
     * @return string
77
     */
78 2
    public function getType()
79
    {
80 2
        return $this->type;
81
    }
82
83
    /**
84
     *
85
     * @return array
86
     */
87 1
    public function toArray()
88
    {
89
        return [
90 1
            'isBot' => $this->getIsBot(),
91 1
            'name'  => $this->getName(),
92 1
            'type'  => $this->getType(),
93
        ];
94
    }
95
}
96