@@ -267,8 +267,8 @@ discard block |
||
267 | 267 | |
268 | 268 | // process right data |
269 | 269 | $right_data = $this->config->getDb()->fetchArray($res); |
270 | - $right_data['for_users'] = (bool) $right_data['for_users']; |
|
271 | - $right_data['for_groups'] = (bool) $right_data['for_groups']; |
|
270 | + $right_data['for_users'] = (bool)$right_data['for_users']; |
|
271 | + $right_data['for_groups'] = (bool)$right_data['for_groups']; |
|
272 | 272 | |
273 | 273 | return $right_data; |
274 | 274 | } |
@@ -327,8 +327,8 @@ discard block |
||
327 | 327 | $nextId, |
328 | 328 | $rightData['name'], |
329 | 329 | $rightData['description'], |
330 | - isset($rightData['for_users']) ? (int) $rightData['for_users'] : 1, |
|
331 | - isset($rightData['for_groups']) ? (int) $rightData['for_groups'] : 1 |
|
330 | + isset($rightData['for_users']) ? (int)$rightData['for_users'] : 1, |
|
331 | + isset($rightData['for_groups']) ? (int)$rightData['for_groups'] : 1 |
|
332 | 332 | ); |
333 | 333 | |
334 | 334 | if (!$this->config->getDb()->query($insert)) { |
@@ -552,8 +552,8 @@ discard block |
||
552 | 552 | $right_data['for_groups'] = $this->default_right_data['for_groups']; |
553 | 553 | } |
554 | 554 | |
555 | - $right_data['for_users'] = (int) $right_data['for_users']; |
|
556 | - $right_data['for_groups'] = (int) $right_data['for_groups']; |
|
555 | + $right_data['for_users'] = (int)$right_data['for_users']; |
|
556 | + $right_data['for_groups'] = (int)$right_data['for_groups']; |
|
557 | 557 | |
558 | 558 | return $right_data; |
559 | 559 | } |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | $nextId, |
277 | 277 | $groupData['name'], |
278 | 278 | $groupData['description'], |
279 | - (int) $groupData['auto_join'] |
|
279 | + (int)$groupData['auto_join'] |
|
280 | 280 | ); |
281 | 281 | |
282 | 282 | $res = $this->config->getDb()->query($insert); |
@@ -768,7 +768,7 @@ discard block |
||
768 | 768 | if (!isset($groupData['auto_join'])) { |
769 | 769 | $groupData['auto_join'] = $this->defaultGroupData['auto_join']; |
770 | 770 | } |
771 | - $groupData['auto_join'] = (int) $groupData['auto_join']; |
|
771 | + $groupData['auto_join'] = (int)$groupData['auto_join']; |
|
772 | 772 | |
773 | 773 | return $groupData; |
774 | 774 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | ); |
125 | 125 | break; |
126 | 126 | |
127 | - default: |
|
127 | + default: |
|
128 | 128 | $query = sprintf(' |
129 | 129 | SELECT |
130 | 130 | fd.id AS id, |
@@ -164,12 +164,12 @@ discard block |
||
164 | 164 | $result = $this->_config->getDb()->query($query); |
165 | 165 | while ($row = $this->_config->getDb()->fetchObject($result)) { |
166 | 166 | $ratings[] = array( |
167 | - 'id' => $row->id, |
|
168 | - 'lang' => $row->lang, |
|
169 | - 'category_id' => $row->category_id, |
|
170 | - 'question' => $row->question, |
|
171 | - 'num' => $row->num, |
|
172 | - 'usr' => $row->usr, |
|
167 | + 'id' => $row->id, |
|
168 | + 'lang' => $row->lang, |
|
169 | + 'category_id' => $row->category_id, |
|
170 | + 'question' => $row->question, |
|
171 | + 'num' => $row->num, |
|
172 | + 'usr' => $row->usr, |
|
173 | 173 | ); |
174 | 174 | } |
175 | 175 |
@@ -87,7 +87,7 @@ |
||
87 | 87 | } |
88 | 88 | |
89 | 89 | foreach ($botBlacklist as $bot) { |
90 | - if ((bool) PMF_String::strstr($agent, $bot)) { |
|
90 | + if ((bool)PMF_String::strstr($agent, $bot)) { |
|
91 | 91 | ++$bots; |
92 | 92 | } |
93 | 93 | } |
@@ -77,14 +77,14 @@ |
||
77 | 77 | return mb_detect_encoding($str, 'UTF-8', true); |
78 | 78 | } else { |
79 | 79 | $regex = '/^([\x00-\x7f]|' |
80 | - .'[\xc2-\xdf][\x80-\xbf]|' |
|
81 | - .'\xe0[\xa0-\xbf][\x80-\xbf]|' |
|
82 | - .'[\xe1-\xec][\x80-\xbf]{2}|' |
|
83 | - .'\xed[\x80-\x9f][\x80-\xbf]|' |
|
84 | - .'[\xee-\xef][\x80-\xbf]{2}|' |
|
85 | - .'\xf0[\x90-\xbf][\x80-\xbf]{2}|' |
|
86 | - .'[\xf1-\xf3][\x80-\xbf]{3}|' |
|
87 | - .'\xf4[\x80-\x8f][\x80-\xbf]{2})*$/'; |
|
80 | + .'[\xc2-\xdf][\x80-\xbf]|' |
|
81 | + .'\xe0[\xa0-\xbf][\x80-\xbf]|' |
|
82 | + .'[\xe1-\xec][\x80-\xbf]{2}|' |
|
83 | + .'\xed[\x80-\x9f][\x80-\xbf]|' |
|
84 | + .'[\xee-\xef][\x80-\xbf]{2}|' |
|
85 | + .'\xf0[\x90-\xbf][\x80-\xbf]{2}|' |
|
86 | + .'[\xf1-\xf3][\x80-\xbf]{3}|' |
|
87 | + .'\xf4[\x80-\x8f][\x80-\xbf]{2})*$/'; |
|
88 | 88 | |
89 | 89 | return preg_match($regex, $str) === 1; |
90 | 90 | } |
@@ -155,7 +155,7 @@ |
||
155 | 155 | */ |
156 | 156 | public function strstr($haystack, $needle, $part = false) |
157 | 157 | { |
158 | - return strstr($haystack, $needle, (boolean) $part); |
|
158 | + return strstr($haystack, $needle, (boolean)$part); |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | /** |
@@ -335,6 +335,6 @@ |
||
335 | 335 | */ |
336 | 336 | private static function appendU($str) |
337 | 337 | { |
338 | - return ((string) $str).'u'; |
|
338 | + return ((string)$str).'u'; |
|
339 | 339 | } |
340 | 340 | } |
@@ -63,7 +63,7 @@ |
||
63 | 63 | * |
64 | 64 | * @param string $language |
65 | 65 | * |
66 | - * @return PMF_String_Basic |
|
66 | + * @return PMF_String_UTF8ToLatinConvertable |
|
67 | 67 | */ |
68 | 68 | public static function getInstance($language = 'en') |
69 | 69 | { |
@@ -38,7 +38,6 @@ |
||
38 | 38 | * @author Anatoliy Belsky <[email protected]> |
39 | 39 | * @copyright 2009-2019 phpMyFAQ Team |
40 | 40 | * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
41 | - |
|
42 | 41 | * @link https://www.phpmyfaq.de |
43 | 42 | * @since 2009-04-06 |
44 | 43 | */ |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | return 0; |
291 | 291 | } |
292 | 292 | |
293 | - return ($_SERVER['REQUEST_TIME'] - $_SESSION[PMF_SESSION_ID_TIMESTAMP]) / 60; |
|
293 | + return ($_SERVER['REQUEST_TIME'] - $_SESSION[PMF_SESSION_ID_TIMESTAMP])/60; |
|
294 | 294 | } |
295 | 295 | |
296 | 296 | /** |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | PMF_Db::getTablePrefix(), |
366 | 366 | session_id(), |
367 | 367 | $_SERVER['REQUEST_TIME'], |
368 | - $updateLastlogin ? "last_login = '".date('YmdHis', $_SERVER['REQUEST_TIME'])."'," : '', |
|
368 | + $updateLastlogin ? "last_login = '".date('YmdHis', $_SERVER['REQUEST_TIME'])."'," : '', |
|
369 | 369 | $_SERVER['REMOTE_ADDR'], |
370 | 370 | $this->getUserId() |
371 | 371 | ); |
@@ -601,7 +601,7 @@ discard block |
||
601 | 601 | */ |
602 | 602 | protected function setSuccess($success) |
603 | 603 | { |
604 | - $this->loginState = (int) $success; |
|
604 | + $this->loginState = (int)$success; |
|
605 | 605 | |
606 | 606 | $update = sprintf(' |
607 | 607 | UPDATE |
@@ -312,8 +312,8 @@ |
||
312 | 312 | %sfaquser |
313 | 313 | WHERE |
314 | 314 | user_id = %d', |
315 | - PMF_Db::getTablePrefix(), |
|
316 | - $this->getUserId() |
|
315 | + PMF_Db::getTablePrefix(), |
|
316 | + $this->getUserId() |
|
317 | 317 | ); |
318 | 318 | |
319 | 319 | $res = $this->config->getDb()->query($select); |
@@ -111,7 +111,7 @@ |
||
111 | 111 | } |
112 | 112 | } |
113 | 113 | |
114 | - uasort($relatedTags, function ($a, $b) { |
|
114 | + uasort($relatedTags, function($a, $b) { |
|
115 | 115 | return ($b - $a); |
116 | 116 | } |
117 | 117 | ); |