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.

Device   A
last analyzed

Complexity

Total Complexity 11

Size/Duplication

Total Lines 137
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 11
lcom 1
cbo 0
dl 0
loc 137
c 0
b 0
f 0
ccs 31
cts 31
cp 1
rs 10

11 Methods

Rating   Name   Duplication   Size   Complexity  
A setModel() 0 4 1
A getModel() 0 4 1
A setBrand() 0 4 1
A getBrand() 0 4 1
A setType() 0 4 1
A getType() 0 4 1
A setIsMobile() 0 4 1
A getIsMobile() 0 4 1
A setIsTouch() 0 4 1
A getIsTouch() 0 4 1
A toArray() 0 10 1
1
<?php
2
namespace UserAgentParser\Model;
3
4
/**
5
 * Device model
6
 *
7
 * @author Martin Keckeis <[email protected]>
8
 * @license MIT
9
 */
10
class Device
11
{
12
    /**
13
     *
14
     * @var string
15
     */
16
    private $model;
17
18
    /**
19
     *
20
     * @var string
21
     */
22
    private $brand;
23
24
    /**
25
     *
26
     * @var string
27
     */
28
    private $type;
29
30
    /**
31
     *
32
     * @var boolean
33
     */
34
    private $isMobile;
35
36
    /**
37
     *
38
     * @var boolean
39
     */
40
    private $isTouch;
41
42
    /**
43
     *
44
     * @param string $model
45
     */
46 2
    public function setModel($model)
47
    {
48 2
        $this->model = $model;
49 2
    }
50
51
    /**
52
     *
53
     * @return string
54
     */
55 2
    public function getModel()
56
    {
57 2
        return $this->model;
58
    }
59
60
    /**
61
     *
62
     * @param string $brand
63
     */
64 2
    public function setBrand($brand)
65
    {
66 2
        $this->brand = $brand;
67 2
    }
68
69
    /**
70
     *
71
     * @return string
72
     */
73 2
    public function getBrand()
74
    {
75 2
        return $this->brand;
76
    }
77
78
    /**
79
     *
80
     * @param string $type
81
     */
82 2
    public function setType($type)
83
    {
84 2
        $this->type = $type;
85 2
    }
86
87
    /**
88
     *
89
     * @return string
90
     */
91 2
    public function getType()
92
    {
93 2
        return $this->type;
94
    }
95
96
    /**
97
     *
98
     * @param boolean $isMobile
99
     */
100 2
    public function setIsMobile($isMobile)
101
    {
102 2
        $this->isMobile = $isMobile;
103 2
    }
104
105
    /**
106
     *
107
     * @return boolean
108
     */
109 2
    public function getIsMobile()
110
    {
111 2
        return $this->isMobile;
112
    }
113
114
    /**
115
     *
116
     * @param boolean $isTouch
117
     */
118 2
    public function setIsTouch($isTouch)
119
    {
120 2
        $this->isTouch = $isTouch;
121 2
    }
122
123
    /**
124
     *
125
     * @return boolean
126
     */
127 2
    public function getIsTouch()
128
    {
129 2
        return $this->isTouch;
130
    }
131
132
    /**
133
     *
134
     * @return array
135
     */
136 1
    public function toArray()
137
    {
138
        return [
139 1
            'model'    => $this->getModel(),
140 1
            'brand'    => $this->getBrand(),
141 1
            'type'     => $this->getType(),
142 1
            'isMobile' => $this->getIsMobile(),
143 1
            'isTouch'  => $this->getIsTouch(),
144
        ];
145
    }
146
}
147