Completed
Push — 4.0 ( e9991b...604d5a )
by Serhii
02:10
created

Result::getDevice()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace EndorphinStudio\Detector\Data;
4
5
class Result
6
{
7
    /**
8
     * @var Os
9
     */
10
    protected $os;
11
    /**
12
     * @var Browser
13
     */
14
    protected $browser;
15
    /**
16
     * @var Device
17
     */
18
    protected $device;
19
    /**
20
     * @var Robot
21
     */
22
    protected $robot;
23
24
    /**
25
     * @var boolean
26
     */
27
    protected $isRobot = false;
28
29
    /**
30
     * @var boolean
31
     */
32
    protected $isTouch = false;
33
    /**
34
     * @var boolean
35
     */
36
    protected $isMobile = false;
37
38
    /**
39
     * @return bool
40
     */
41
    public function isRobot(): bool
42
    {
43
        return $this->isRobot;
44
    }
45
46
    /**
47
     * @param bool $isRobot
48
     */
49
    public function setIsRobot(bool $isRobot)
50
    {
51
        $this->isRobot = $isRobot;
52
    }
53
54
    /**
55
     * @return bool
56
     */
57
    public function isTouch(): bool
58
    {
59
        return $this->isTouch;
60
    }
61
62
    /**
63
     * @param bool $isTouch
64
     */
65
    public function setIsTouch(bool $isTouch)
66
    {
67
        $this->isTouch = $isTouch;
68
    }
69
70
    /**
71
     * @return bool
72
     */
73
    public function isMobile(): bool
74
    {
75
        return $this->isMobile;
76
    }
77
78
    /**
79
     * @param bool $isMobile
80
     */
81
    public function setIsMobile(bool $isMobile)
82
    {
83
        $this->isMobile = $isMobile;
84
    }
85
86
    /**
87
     * @return bool
88
     */
89
    public function isTablet(): bool
90
    {
91
        return $this->isTablet;
92
    }
93
94
    /**
95
     * @param bool $isTablet
96
     */
97
    public function setIsTablet(bool $isTablet)
98
    {
99
        $this->isTablet = $isTablet;
100
    }
101
102
    /** @var boolean */
103
    protected $isTablet = false;
104
105
    public function __construct()
106
    {
107
        $this->os = new Os($this);
108
        $this->device = new Device($this);
109
        $this->browser = new Browser($this);
110
        $this->robot = new Robot($this);
111
    }
112
113
    /**
114
     * @return Os
115
     */
116
    public function getOs(): Os
117
    {
118
        return $this->os;
119
    }
120
121
    /**
122
     * @return Browser
123
     */
124
    public function getBrowser(): Browser
125
    {
126
        return $this->browser;
127
    }
128
129
    /**
130
     * @return Device
131
     */
132
    public function getDevice(): Device
133
    {
134
        return $this->device;
135
    }
136
137
    /**
138
     * @return Robot
139
     */
140
    public function getRobot(): Robot
141
    {
142
        return $this->robot;
143
    }
144
}