@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | */ |
298 | 298 | protected function checkPlatform() { |
299 | 299 | foreach ($this->_platforms as $regex => $value) { |
300 | - if (preg_match($regex, $this->_agent) ) { |
|
300 | + if (preg_match($regex, $this->_agent)) { |
|
301 | 301 | $this->setPlatform($value); |
302 | 302 | break; |
303 | 303 | } |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | */ |
310 | 310 | protected function checkBrowser() { |
311 | 311 | foreach ($this->_browsers as $regex => $value) { |
312 | - if (preg_match($regex, $this->_agent ) ) { |
|
312 | + if (preg_match($regex, $this->_agent)) { |
|
313 | 313 | $this->setBrowser($value); |
314 | 314 | break; |
315 | 315 | } |
@@ -319,10 +319,10 @@ discard block |
||
319 | 319 | /** |
320 | 320 | * Routine to determine the browser version |
321 | 321 | */ |
322 | - protected function checkBrowserVersion(){ |
|
322 | + protected function checkBrowserVersion() { |
|
323 | 323 | $detected = $this->getBrowser(); |
324 | 324 | $d = array_search($detected, $this->_browsers); |
325 | - $browser = str_replace(array("/i","/"), "", $d); |
|
325 | + $browser = str_replace(array("/i", "/"), "", $d); |
|
326 | 326 | $regex = "/(?<browser>version|{$browser})[\/]+(?<version>[0-9.|a-zA-Z.]*)/i"; |
327 | 327 | if (preg_match_all($regex, $this->_agent, $matches)) { |
328 | 328 | $found = array_search($browser, $matches["browser"]); |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | * Determine if the browser is Mobile or not |
335 | 335 | */ |
336 | 336 | protected function checkMobile() { |
337 | - if (preg_match('/mobile|phone|ipod/i', $this->_agent) ) { |
|
337 | + if (preg_match('/mobile|phone|ipod/i', $this->_agent)) { |
|
338 | 338 | $this->setMobile(true); |
339 | 339 | } |
340 | 340 | } |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | * Determine if the browser is Tablet or not |
344 | 344 | */ |
345 | 345 | protected function checkTablet() { |
346 | - if (preg_match('/tablet|ipad/i', $this->_agent) ) { |
|
346 | + if (preg_match('/tablet|ipad/i', $this->_agent)) { |
|
347 | 347 | $this->setTablet(true); |
348 | 348 | } |
349 | 349 | } |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | * Determine if the browser is Robot or not |
353 | 353 | */ |
354 | 354 | protected function checkBot() { |
355 | - if (preg_match('/bot/i', $this->_agent) ) { |
|
355 | + if (preg_match('/bot/i', $this->_agent)) { |
|
356 | 356 | $this->setTablet(true); |
357 | 357 | } |
358 | 358 | } |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | if (stristr($this->_agent, 'FacebookExternalHit')) { |
365 | 365 | $this->setRobot(true); |
366 | 366 | $this->setFacebook(true); |
367 | - } else if (stristr($this->_agent, 'FBIOS')) { |
|
367 | + } else if (stristr($this->_agent, 'FBIOS')) { |
|
368 | 368 | $this->setFacebook(true); |
369 | 369 | } |
370 | 370 | } |