1 | <?php |
||
10 | class UserAgent |
||
11 | { |
||
12 | /** |
||
13 | * Provider name |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | private $providerName; |
||
18 | |||
19 | /** |
||
20 | * Provider version |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | private $providerVersion; |
||
25 | |||
26 | /** |
||
27 | * @var Browser |
||
28 | */ |
||
29 | private $browser; |
||
30 | |||
31 | /** |
||
32 | * @var RenderingEngine |
||
33 | */ |
||
34 | private $renderingEngine; |
||
35 | |||
36 | /** |
||
37 | * @var OperatingSystem |
||
38 | */ |
||
39 | private $operatingSystem; |
||
40 | |||
41 | /** |
||
42 | * @var Device |
||
43 | */ |
||
44 | private $device; |
||
45 | |||
46 | /** |
||
47 | * @var Bot |
||
48 | */ |
||
49 | private $bot; |
||
50 | |||
51 | /** |
||
52 | * @var mixed |
||
53 | */ |
||
54 | private $providerResultRaw; |
||
55 | |||
56 | /** |
||
57 | * |
||
58 | * @param string $provider |
||
|
|||
59 | */ |
||
60 | 9 | public function __construct($providerName = null, $providerVersion = null) |
|
71 | |||
72 | /** |
||
73 | * |
||
74 | * @return string |
||
75 | */ |
||
76 | public function getProviderName() |
||
80 | |||
81 | /** |
||
82 | * |
||
83 | * @return string |
||
84 | */ |
||
85 | public function getProviderVersion() |
||
89 | |||
90 | /** |
||
91 | * @param Browser $browser |
||
92 | */ |
||
93 | 1 | public function setBrowser(Browser $browser) |
|
97 | |||
98 | /** |
||
99 | * @return Browser |
||
100 | */ |
||
101 | 2 | public function getBrowser() |
|
105 | |||
106 | /** |
||
107 | * @param RenderingEngine $renderingEngine |
||
108 | */ |
||
109 | 1 | public function setRenderingEngine(RenderingEngine $renderingEngine) |
|
113 | |||
114 | /** |
||
115 | * @return RenderingEngine |
||
116 | */ |
||
117 | 2 | public function getRenderingEngine() |
|
121 | |||
122 | /** |
||
123 | * @param OperatingSystem $operatingSystem |
||
124 | */ |
||
125 | 1 | public function setOperatingSystem(OperatingSystem $operatingSystem) |
|
129 | |||
130 | /** |
||
131 | * @return OperatingSystem |
||
132 | */ |
||
133 | 2 | public function getOperatingSystem() |
|
137 | |||
138 | /** |
||
139 | * @param Device $device |
||
140 | */ |
||
141 | 1 | public function setDevice(Device $device) |
|
145 | |||
146 | /** |
||
147 | * @return Device |
||
148 | */ |
||
149 | 3 | public function getDevice() |
|
153 | |||
154 | /** |
||
155 | * @param Bot $bot |
||
156 | */ |
||
157 | 1 | public function setBot(Bot $bot) |
|
161 | |||
162 | /** |
||
163 | * @return Bot |
||
164 | */ |
||
165 | 3 | public function getBot() |
|
169 | |||
170 | /** |
||
171 | * |
||
172 | * @return boolean |
||
173 | */ |
||
174 | 1 | public function isBot() |
|
182 | |||
183 | /** |
||
184 | * |
||
185 | * @return boolean |
||
186 | */ |
||
187 | 1 | public function isMobile() |
|
195 | |||
196 | /** |
||
197 | * @param mixed $providerResultRaw |
||
198 | */ |
||
199 | 1 | public function setProviderResultRaw($providerResultRaw) |
|
203 | |||
204 | /** |
||
205 | * @return mixed |
||
206 | */ |
||
207 | 2 | public function getProviderResultRaw() |
|
211 | |||
212 | /** |
||
213 | * @return array |
||
214 | */ |
||
215 | 1 | public function toArray($includeResultRaw = false) |
|
232 | } |
||
233 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.