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   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 86
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 7
lcom 1
cbo 0
dl 0
loc 86
c 0
b 0
f 0
ccs 19
cts 19
cp 1
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A setIsBot() 0 4 1
A getIsBot() 0 4 1
A setName() 0 4 1
A getName() 0 4 1
A setType() 0 4 1
A getType() 0 4 1
A toArray() 0 8 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