@@ -10,7 +10,7 @@ |
||
10 | 10 | * @param Language $language |
11 | 11 | * @param AcceptLanguage $acceptLanguage |
12 | 12 | * |
13 | - * @return bool |
|
13 | + * @return boolean|null |
|
14 | 14 | */ |
15 | 15 | public static function detect(Language $language, AcceptLanguage $acceptLanguage) |
16 | 16 | { |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | */ |
165 | 165 | public function setIsRobot($isRobot) |
166 | 166 | { |
167 | - $this->isRobot = (bool)$isRobot; |
|
167 | + $this->isRobot = (bool) $isRobot; |
|
168 | 168 | |
169 | 169 | return $this; |
170 | 170 | } |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | */ |
199 | 199 | public function setIsChromeFrame($isChromeFrame) |
200 | 200 | { |
201 | - $this->isChromeFrame = (bool)$isChromeFrame; |
|
201 | + $this->isChromeFrame = (bool) $isChromeFrame; |
|
202 | 202 | |
203 | 203 | return $this; |
204 | 204 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | self::checkChromeFrame(); |
90 | 90 | |
91 | 91 | foreach (self::$browsersList as $browserName) { |
92 | - $funcName = self::FUNC_PREFIX . $browserName; |
|
92 | + $funcName = self::FUNC_PREFIX.$browserName; |
|
93 | 93 | |
94 | 94 | if (self::$funcName()) { |
95 | 95 | return true; |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | if (stripos(self::$userAgentString, 'Edge') !== false) { |
343 | 343 | $version = explode('Edge/', self::$userAgentString); |
344 | 344 | if (isset($version[1])) { |
345 | - self::$browser->setVersion((float)$version[1]); |
|
345 | + self::$browser->setVersion((float) $version[1]); |
|
346 | 346 | } |
347 | 347 | self::$browser->setName(Browser::EDGE); |
348 | 348 |
@@ -97,7 +97,7 @@ |
||
97 | 97 | } |
98 | 98 | |
99 | 99 | if (!empty($locale)) { |
100 | - return $userLanguage . $separator . strtoupper($locale); |
|
100 | + return $userLanguage.$separator.strtoupper($locale); |
|
101 | 101 | } else { |
102 | 102 | return $userLanguage; |
103 | 103 | } |
@@ -150,7 +150,7 @@ |
||
150 | 150 | */ |
151 | 151 | public function setIsMobile($isMobile = true) |
152 | 152 | { |
153 | - $this->isMobile = (bool)$isMobile; |
|
153 | + $this->isMobile = (bool) $isMobile; |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | /** |
@@ -148,8 +148,8 @@ discard block |
||
148 | 148 | $os->setVersion('NT 4.0'); |
149 | 149 | break; |
150 | 150 | default: |
151 | - if ((float)$matches[1] >= 10.0) { |
|
152 | - $os->setVersion((float)$matches[1]); |
|
151 | + if ((float) $matches[1] >= 10.0) { |
|
152 | + $os->setVersion((float) $matches[1]); |
|
153 | 153 | } |
154 | 154 | break; |
155 | 155 | } |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | // Windows version |
197 | 197 | if (preg_match('/Windows Phone ([\d\.]*)/i', $userAgent->getUserAgentString(), $matches)) { |
198 | 198 | if (isset($matches[1])) { |
199 | - $os->setVersion((float)$matches[1]); |
|
199 | + $os->setVersion((float) $matches[1]); |
|
200 | 200 | } |
201 | 201 | } |
202 | 202 |