@@ -70,7 +70,7 @@ |
||
70 | 70 | } elseif (is_string($value)) { |
71 | 71 | $cleanValue = strtotime($value); |
72 | 72 | } else { |
73 | - $cleanValue = (int) $value; |
|
73 | + $cleanValue = (int)$value; |
|
74 | 74 | } |
75 | 75 | return $cleanValue; |
76 | 76 | } |
@@ -61,10 +61,10 @@ |
||
61 | 61 | public function cleanVar(XoopsObject $obj, $key) |
62 | 62 | { |
63 | 63 | $value = $obj->vars[$key]['value']; |
64 | - $value = ($value===null || $value==='' || $value===false) ? null : $value; |
|
65 | - if ($value!==null && null === json_decode($value, true)) { |
|
64 | + $value = ($value === null || $value === '' || $value === false) ? null : $value; |
|
65 | + if ($value !== null && null === json_decode($value, true)) { |
|
66 | 66 | $value = json_encode($value, JSON_FORCE_OBJECT); |
67 | - if ($value===false) { |
|
67 | + if ($value === false) { |
|
68 | 68 | \Xoops::getInstance()->logger()->warning( |
69 | 69 | sprintf('Failed to encode to JSON - %s', json_last_error_msg()) |
70 | 70 | ); |
@@ -93,6 +93,6 @@ |
||
93 | 93 | if (false === $decoded || !(isset($decoded['amount']) && isset($decoded['currency']))) { |
94 | 94 | return null; |
95 | 95 | } |
96 | - return new Money((int) $decoded['amount'], new Currency($decoded['currency'])); |
|
96 | + return new Money((int)$decoded['amount'], new Currency($decoded['currency'])); |
|
97 | 97 | } |
98 | 98 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | return $value; |
43 | 43 | } |
44 | 44 | if ($value != '' && !preg_match("/^http[s]*:\/\//i", $value)) { |
45 | - $value = 'http://' . $value; |
|
45 | + $value = 'http://'.$value; |
|
46 | 46 | } |
47 | 47 | return $value; |
48 | 48 | } |
@@ -68,7 +68,7 @@ |
||
68 | 68 | * @param string $format Dtype::FORMAT_* constant indicating desired formatting |
69 | 69 | * |
70 | 70 | * @return mixed |
71 | - */ |
|
71 | + */ |
|
72 | 72 | public function getVar(XoopsObject $obj, $key, $format) |
73 | 73 | { |
74 | 74 | $value = $obj->vars[$key]['value']; |
@@ -72,9 +72,9 @@ |
||
72 | 72 | $rows = $this->db2->updatePrefix( |
73 | 73 | 'system_online', |
74 | 74 | array( |
75 | - 'online_uname' => $uname, |
|
76 | - 'online_updated' => $time, |
|
77 | - 'online_module' => $module, |
|
75 | + 'online_uname' => $uname, |
|
76 | + 'online_updated' => $time, |
|
77 | + 'online_module' => $module, |
|
78 | 78 | ), |
79 | 79 | $criteria |
80 | 80 | ); |
@@ -96,7 +96,7 @@ |
||
96 | 96 | if ($rows === false) { |
97 | 97 | return false; |
98 | 98 | } |
99 | - return ($rows>0); |
|
99 | + return ($rows > 0); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | /** |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | return false; |
415 | 415 | } |
416 | 416 | $funcFile = $xoops->path( |
417 | - 'modules/' . $this->getVar('dirname') . '/blocks/' . $this->getVar('func_file') |
|
417 | + 'modules/'.$this->getVar('dirname').'/blocks/'.$this->getVar('func_file') |
|
418 | 418 | ); |
419 | 419 | if (\XoopsLoad::fileExists($funcFile)) { |
420 | 420 | $xoops->loadLanguage('blocks', $this->getVar('dirname')); |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | } |
469 | 469 | if (!\XoopsLoad::fileExists( |
470 | 470 | $func_file = $xoops->path( |
471 | - 'modules/' . $this->getVar('dirname') . '/blocks/' . $this->getVar('func_file') |
|
471 | + 'modules/'.$this->getVar('dirname').'/blocks/'.$this->getVar('func_file') |
|
472 | 472 | ) |
473 | 473 | )) { |
474 | 474 | return false; |
@@ -346,14 +346,14 @@ discard block |
||
346 | 346 | $hash = $user[0]->pass(); |
347 | 347 | $type = substr($user[0]->pass(), 0, 1); |
348 | 348 | // see if we have a crypt like signature, old md5 hash is just hex digits |
349 | - if ($type==='$') { |
|
349 | + if ($type === '$') { |
|
350 | 350 | if (!password_verify($pwd, $hash)) { |
351 | 351 | return false; |
352 | 352 | } |
353 | 353 | // check if hash uses the best algorithm (i.e. after a PHP upgrade) |
354 | 354 | $rehash = password_needs_rehash($hash, PASSWORD_DEFAULT); |
355 | 355 | } else { |
356 | - if ($hash!=md5($pwd)) { |
|
356 | + if ($hash != md5($pwd)) { |
|
357 | 357 | return false; |
358 | 358 | } |
359 | 359 | $rehash = true; // automatically update old style |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | $qb = $this->userHandler->db2->createXoopsQueryBuilder(); |
461 | 461 | $eb = $qb->expr(); |
462 | 462 | |
463 | - $qb ->select('DISTINCT ' . ($asobject ? 'u.*' : 'u.uid')) |
|
463 | + $qb ->select('DISTINCT '.($asobject ? 'u.*' : 'u.uid')) |
|
464 | 464 | ->fromPrefix('system_user', 'u') |
465 | 465 | ->leftJoinPrefix('u', 'system_usergroup', 'm', 'm.uid = u.uid'); |
466 | 466 |
@@ -44,9 +44,9 @@ |
||
44 | 44 | */ |
45 | 45 | public $adminmenu; |
46 | 46 | /** |
47 | - * |
|
48 | - * @var array |
|
49 | - */ |
|
47 | + * |
|
48 | + * @var array |
|
49 | + */ |
|
50 | 50 | private $internalMessages = array(); |
51 | 51 | |
52 | 52 | protected $xoops_url; |
@@ -186,8 +186,8 @@ discard block |
||
186 | 186 | public function mainLink() |
187 | 187 | { |
188 | 188 | if ($this->getVar('hasmain') == 1) { |
189 | - $ret = '<a href="' . $this->xoops_url . '/modules/' . $this->getVar('dirname') . '/">' |
|
190 | - . $this->getVar('name') . '</a>'; |
|
189 | + $ret = '<a href="'.$this->xoops_url.'/modules/'.$this->getVar('dirname').'/">' |
|
190 | + . $this->getVar('name').'</a>'; |
|
191 | 191 | return $ret; |
192 | 192 | } |
193 | 193 | return false; |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | if ($this->getInfo('sub') && is_array($this->getInfo('sub'))) { |
205 | 205 | foreach ($this->getInfo('sub') as $submenu) { |
206 | 206 | $ret[] = array( |
207 | - 'name' => $submenu['name'] , |
|
207 | + 'name' => $submenu['name'], |
|
208 | 208 | 'url' => $submenu['url']); |
209 | 209 | } |
210 | 210 | } |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | */ |
219 | 219 | public function loadAdminMenu() |
220 | 220 | { |
221 | - $file = $this->xoops_root_path . '/modules/' . $this->getInfo('dirname') . '/' . $this->getInfo('adminmenu'); |
|
221 | + $file = $this->xoops_root_path.'/modules/'.$this->getInfo('dirname').'/'.$this->getInfo('adminmenu'); |
|
222 | 222 | if ($this->getInfo('adminmenu') && $this->getInfo('adminmenu') != '' && \XoopsLoad::fileExists($file)) { |
223 | 223 | $adminmenu = array(); |
224 | 224 | include $file; |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | $xoops->loadLanguage('modinfo', $dirname); |
266 | 266 | $xoops->loadLocale($dirname); |
267 | 267 | |
268 | - if (!\XoopsLoad::fileExists($file = $xoops->path('modules/' . $dirname . '/xoops_version.php'))) { |
|
268 | + if (!\XoopsLoad::fileExists($file = $xoops->path('modules/'.$dirname.'/xoops_version.php'))) { |
|
269 | 269 | if (false != $verbose) { |
270 | 270 | echo "Module File for $dirname Not Found!"; |
271 | 271 | } |