@@ -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 | } |
@@ -95,7 +95,7 @@ |
||
95 | 95 | ->fromPrefix('system_usergroup', 'g') |
96 | 96 | ->where($eb->eq('g.groupid', ':gid')) |
97 | 97 | ->setParameter(':gid', $groupid, \PDO::PARAM_INT); |
98 | - if ($limit!=0 || $start!=0) { |
|
98 | + if ($limit != 0 || $start != 0) { |
|
99 | 99 | $qb->setFirstResult($start) |
100 | 100 | ->setMaxResults($limit); |
101 | 101 | } |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | |
182 | 182 | if (is_array($groupid)) { |
183 | 183 | if (count($groupid) > 1) { |
184 | - $in=array(); |
|
184 | + $in = array(); |
|
185 | 185 | foreach ($groupid as $gid) { |
186 | 186 | $in[] = $qb->createNamedParameter($gid, \PDO::PARAM_INT); |
187 | 187 | } |
@@ -194,9 +194,9 @@ discard block |
||
194 | 194 | if (isset($side)) { |
195 | 195 | // get both sides in sidebox? (some themes need this) |
196 | 196 | if ($side == XOOPS_SIDEBLOCK_BOTH) { |
197 | - $qb->andWhere($eb->in('b.side', array(0,1))); |
|
197 | + $qb->andWhere($eb->in('b.side', array(0, 1))); |
|
198 | 198 | } elseif ($side == XOOPS_CENTERBLOCK_ALL) { |
199 | - $qb->andWhere($eb->in('b.side', array(3,4,5,7,8,9))); |
|
199 | + $qb->andWhere($eb->in('b.side', array(3, 4, 5, 7, 8, 9))); |
|
200 | 200 | } else { |
201 | 201 | $qb->andWhere($eb->eq('b.side', $qb->createNamedParameter($side, \PDO::PARAM_INT))); |
202 | 202 | } |
@@ -247,9 +247,9 @@ discard block |
||
247 | 247 | if (isset($side)) { |
248 | 248 | // get both sides in sidebox? (some themes need this) |
249 | 249 | if ($side == XOOPS_SIDEBLOCK_BOTH) { |
250 | - $qb->andWhere($eb->in('side', array(0,1))); |
|
250 | + $qb->andWhere($eb->in('side', array(0, 1))); |
|
251 | 251 | } elseif ($side == XOOPS_CENTERBLOCK_ALL) { |
252 | - $qb->andWhere($eb->in('side', array(3,4,5,7,8,9))); |
|
252 | + $qb->andWhere($eb->in('side', array(3, 4, 5, 7, 8, 9))); |
|
253 | 253 | } else { |
254 | 254 | $qb->andWhere($eb->eq('side', $qb->createNamedParameter($side, \PDO::PARAM_INT))); |
255 | 255 | } |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | $qb = $this->db2->createXoopsQueryBuilder(); |
347 | 347 | $eb = $qb->expr(); |
348 | 348 | |
349 | - $blockids=null; |
|
349 | + $blockids = null; |
|
350 | 350 | if (isset($groupid)) { |
351 | 351 | $qb ->select('DISTINCT gperm_itemid') |
352 | 352 | ->fromPrefix('system_permission', null) |
@@ -376,17 +376,17 @@ discard block |
||
376 | 376 | $qb ->fromPrefix('system_blockmodule', 'm') |
377 | 377 | ->andWhere($eb->eq('m.block_id', 'b.bid')); |
378 | 378 | if (!empty($module_id)) { |
379 | - $in=array(); |
|
380 | - $in[]=0; |
|
381 | - $in[]=(int)($module_id); |
|
379 | + $in = array(); |
|
380 | + $in[] = 0; |
|
381 | + $in[] = (int)($module_id); |
|
382 | 382 | if ($toponlyblock) { |
383 | - $in[]=(int)(-1); |
|
383 | + $in[] = (int)(-1); |
|
384 | 384 | } |
385 | 385 | } else { |
386 | 386 | if ($toponlyblock) { |
387 | - $in=array(0, -1); |
|
387 | + $in = array(0, -1); |
|
388 | 388 | } else { |
389 | - $in=0; |
|
389 | + $in = 0; |
|
390 | 390 | } |
391 | 391 | } |
392 | 392 | if (is_array($in)) { |
@@ -462,17 +462,17 @@ discard block |
||
462 | 462 | $qb ->fromPrefix('system_blockmodule', 'm') |
463 | 463 | ->andWhere($eb->eq('m.block_id', 'b.bid')); |
464 | 464 | if (!empty($module_id)) { |
465 | - $in=array(); |
|
466 | - $in[]=0; |
|
467 | - $in[]=(int)($module_id); |
|
465 | + $in = array(); |
|
466 | + $in[] = 0; |
|
467 | + $in[] = (int)($module_id); |
|
468 | 468 | if ($toponlyblock) { |
469 | - $in[]=(int)(-1); |
|
469 | + $in[] = (int)(-1); |
|
470 | 470 | } |
471 | 471 | } else { |
472 | 472 | if ($toponlyblock) { |
473 | - $in=array(0, -1); |
|
473 | + $in = array(0, -1); |
|
474 | 474 | } else { |
475 | - $in=0; |
|
475 | + $in = 0; |
|
476 | 476 | } |
477 | 477 | } |
478 | 478 | if (is_array($in)) { |
@@ -545,10 +545,10 @@ discard block |
||
545 | 545 | { |
546 | 546 | $ret = ''; |
547 | 547 | if ($position == 0) { |
548 | - $ret = $contentdb . $content; |
|
548 | + $ret = $contentdb.$content; |
|
549 | 549 | } else { |
550 | 550 | if ($position == 1) { |
551 | - $ret = $content . $contentdb; |
|
551 | + $ret = $content.$contentdb; |
|
552 | 552 | } |
553 | 553 | } |
554 | 554 | return $ret; |