Completed
Pull Request — master (#622)
by Richard
29:20 queued 24s
created
xoops_lib/Xoops/Module/Helper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
             if ($xoops->isActiveModule($dirname)) {
36 36
                 //Load Module helper if available
37 37
                 if (\XoopsLoad::loadFile($xoops->path("modules/{$dirname}/class/helper.php"))) {
38
-                    $className = '\\' . ucfirst($dirname);
38
+                    $className = '\\'.ucfirst($dirname);
39 39
                     if (class_exists($className)) {
40 40
                         $class = new $className();
41 41
                         if ($class instanceof \Xoops\Module\Helper\HelperAbstract) {
Please login to merge, or discard this patch.
xoops_lib/Xoops/Module/Plugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,8 +70,8 @@
 block discarded – undo
70 70
             }
71 71
             foreach ($dirnames as $dirname) {
72 72
                 if (\XoopsLoad::loadFile($xoops->path("modules/{$dirname}/class/plugin/{$pluginName}.php"))) {
73
-                    $className = '\\' . ucfirst($dirname) . ucfirst($pluginName) . 'Plugin';
74
-                    $interface = '\\' . ucfirst($pluginName) . 'PluginInterface';
73
+                    $className = '\\'.ucfirst($dirname).ucfirst($pluginName).'Plugin';
74
+                    $interface = '\\'.ucfirst($pluginName).'PluginInterface';
75 75
                     $class = new $className($dirname);
76 76
                     if ($class instanceof $interface) {
77 77
                         static::$plugins[$pluginName][$dirname] = $class;
Please login to merge, or discard this patch.
xoops_lib/Xoops/Module/Admin.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -283,21 +283,21 @@  discard block
 block discarded – undo
283 283
      */
284 284
     public function addConfigModuleVersion($moddir, $minversion)
285 285
     {
286
-        $return=false;
287
-        $helper= \Xoops::getInstance()->getModuleHelper($moddir);
286
+        $return = false;
287
+        $helper = \Xoops::getInstance()->getModuleHelper($moddir);
288 288
         if (is_object($helper) && is_object($helper->getModule())) {
289
-            $mod_modversion=$helper->getModule()->getVar('version');
290
-            $mod_version_f = $mod_modversion/100;
291
-            $min_version_f = $minversion/100;
289
+            $mod_modversion = $helper->getModule()->getVar('version');
290
+            $mod_version_f = $mod_modversion / 100;
291
+            $min_version_f = $minversion / 100;
292 292
             $value = sprintf(
293 293
                 \XoopsLocale::EF_MODULE_VERSION,
294 294
                 strtoupper($moddir),
295 295
                 $min_version_f,
296 296
                 $mod_version_f
297 297
             );
298
-            if ($mod_modversion>=$minversion) {
298
+            if ($mod_modversion >= $minversion) {
299 299
                 $this->addConfigAccept($value);
300
-                $return=true;
300
+                $return = true;
301 301
             } else {
302 302
                 $this->addConfigError($value);
303 303
             }
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
             $value = sprintf(
306 306
                 \XoopsLocale::EF_MODULE_NOTFOUND,
307 307
                 strtoupper($moddir),
308
-                $minversion/100
308
+                $minversion / 100
309 309
             );
310 310
             $this->addConfigError($value);
311 311
         }
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
      */
397 397
     private function getTplPath($type = '')
398 398
     {
399
-        return 'admin:' . $this->tplModule . '/' . $this->tplFile[$type];
399
+        return 'admin:'.$this->tplModule.'/'.$this->tplFile[$type];
400 400
     }
401 401
 
402 402
     /**
@@ -484,19 +484,19 @@  discard block
 block discarded – undo
484 484
         $xoops = \Xoops::getInstance();
485 485
         $this->module->loadAdminMenu();
486 486
         foreach (array_keys($this->module->adminmenu) as $i) {
487
-            if (\XoopsLoad::fileExists($xoops->path("media/xoops/images/icons/32/" . $this->module->adminmenu[$i]['icon']))) {
488
-                $this->module->adminmenu[$i]['icon'] = $xoops->url("media/xoops/images/icons/32/" . $this->module->adminmenu[$i]['icon']);
489
-            } elseif (\XoopsLoad::fileExists($xoops->path("modules/" . $xoops->module->dirname() . "/assets/icons/32/" . $this->module->adminmenu[$i]['icon']))) {
490
-                $this->module->adminmenu[$i]['icon'] = $xoops->url("modules/" . $xoops->module->dirname() . "/assets/icons/32/" . $this->module->adminmenu[$i]['icon']);
487
+            if (\XoopsLoad::fileExists($xoops->path("media/xoops/images/icons/32/".$this->module->adminmenu[$i]['icon']))) {
488
+                $this->module->adminmenu[$i]['icon'] = $xoops->url("media/xoops/images/icons/32/".$this->module->adminmenu[$i]['icon']);
489
+            } elseif (\XoopsLoad::fileExists($xoops->path("modules/".$xoops->module->dirname()."/assets/icons/32/".$this->module->adminmenu[$i]['icon']))) {
490
+                $this->module->adminmenu[$i]['icon'] = $xoops->url("modules/".$xoops->module->dirname()."/assets/icons/32/".$this->module->adminmenu[$i]['icon']);
491 491
             } else {
492
-                $this->module->adminmenu[$i]['icon'] = $xoops->url("modules/" . $xoops->module->dirname() . "/icons/32/" . $this->module->adminmenu[$i]['icon']);
492
+                $this->module->adminmenu[$i]['icon'] = $xoops->url("modules/".$xoops->module->dirname()."/icons/32/".$this->module->adminmenu[$i]['icon']);
493 493
             }
494 494
             $xoops->tpl()->append('xo_admin_index_menu', $this->module->adminmenu[$i]);
495 495
         }
496 496
         if ($this->module->getInfo('help')) {
497 497
             $help = array();
498
-            $help['link'] = '../system/help.php?mid=' . $this->module->getVar('mid', 's')
499
-                . "&" . $this->module->getInfo('help');
498
+            $help['link'] = '../system/help.php?mid='.$this->module->getVar('mid', 's')
499
+                . "&".$this->module->getInfo('help');
500 500
             $help['icon'] = $xoops->url("/media/xoops/images/icons/32/help.png");
501 501
             $help['title'] = \XoopsLocale::HELP;
502 502
             $xoops->tpl()->append('xo_admin_index_menu', $help);
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
                     if (0 >= version_compare($dbCurrentVersion, $dbRequiredVersion)) {
558 558
                         $this->addConfigBoxLine(
559 559
                             sprintf(
560
-                                strtoupper(\XoopsBaseConfig::get('db-type')) . ' '
560
+                                strtoupper(\XoopsBaseConfig::get('db-type')).' '
561 561
                                 . \XoopsLocale::F_MINIMUM_DATABASE_VERSION_REQUIRED,
562 562
                                 $dbRequiredVersion,
563 563
                                 $dbCurrentVersion
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
                     } else {
568 568
                         $this->addConfigBoxLine(
569 569
                             sprintf(
570
-                                strtoupper(\XoopsBaseConfig::get('db-type')) . ' ' . \XoopsLocale::F_MINIMUM_DATABASE_VERSION_REQUIRED,
570
+                                strtoupper(\XoopsBaseConfig::get('db-type')).' '.\XoopsLocale::F_MINIMUM_DATABASE_VERSION_REQUIRED,
571 571
                                 $dbRequiredVersion,
572 572
                                 $dbCurrentVersion
573 573
                             ),
@@ -635,13 +635,13 @@  discard block
 block discarded – undo
635 635
 
636 636
         $this->module->loadAdminMenu();
637 637
         foreach (array_keys($this->module->adminmenu) as $i) {
638
-            if ($this->module->adminmenu[$i]['link'] == "admin/" . $menu) {
639
-                if (\XoopsLoad::fileExists($xoops->path("media/xoops/images/icons/32/" . $this->module->adminmenu[$i]['icon']))) {
640
-                    $this->module->adminmenu[$i]['icon'] = $xoops->url("media/xoops/images/icons/32/". $this->module->adminmenu[$i]['icon']);
641
-                } elseif (\XoopsLoad::fileExists($xoops->path("modules/" . $xoops->module->dirname() . "/assets/icons/32/" . $this->module->adminmenu[$i]['icon']))) {
642
-                    $this->module->adminmenu[$i]['icon'] = $xoops->url("modules/" . $xoops->module->dirname() . "/assets/icons/32/" . $this->module->adminmenu[$i]['icon']);
638
+            if ($this->module->adminmenu[$i]['link'] == "admin/".$menu) {
639
+                if (\XoopsLoad::fileExists($xoops->path("media/xoops/images/icons/32/".$this->module->adminmenu[$i]['icon']))) {
640
+                    $this->module->adminmenu[$i]['icon'] = $xoops->url("media/xoops/images/icons/32/".$this->module->adminmenu[$i]['icon']);
641
+                } elseif (\XoopsLoad::fileExists($xoops->path("modules/".$xoops->module->dirname()."/assets/icons/32/".$this->module->adminmenu[$i]['icon']))) {
642
+                    $this->module->adminmenu[$i]['icon'] = $xoops->url("modules/".$xoops->module->dirname()."/assets/icons/32/".$this->module->adminmenu[$i]['icon']);
643 643
                 } else {
644
-                    $this->module->adminmenu[$i]['icon'] = $xoops->url("modules/" . $xoops->module->dirname() . "/icons/32/". $this->module->adminmenu[$i]['icon']);
644
+                    $this->module->adminmenu[$i]['icon'] = $xoops->url("modules/".$xoops->module->dirname()."/icons/32/".$this->module->adminmenu[$i]['icon']);
645 645
                 }
646 646
                 $xoops->tpl()->assign('xo_sys_navigation', $this->module->adminmenu[$i]);
647 647
                 $ret[] = $xoops->tpl()->fetch($this->getTplPath('nav'));
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
         foreach (array_keys($author) as $i) {
708 708
             $author_list .= $author[$i];
709 709
             if (isset($nickname[$i]) && $nickname[$i] != '') {
710
-                $author_list .= " (" . $nickname[$i] . "), ";
710
+                $author_list .= " (".$nickname[$i]."), ";
711 711
             } else {
712 712
                 $author_list .= ", ";
713 713
             }
@@ -715,19 +715,19 @@  discard block
 block discarded – undo
715 715
         $changelog = '';
716 716
         $language = $xoops->getConfig('locale');
717 717
         if (!is_file(
718
-            \XoopsBaseConfig::get('root-path') . "/modules/" . $this->module->getVar("dirname")
719
-            . "/locale/" . $language . "/changelog.txt"
718
+            \XoopsBaseConfig::get('root-path')."/modules/".$this->module->getVar("dirname")
719
+            . "/locale/".$language."/changelog.txt"
720 720
         )) {
721 721
             $language = 'en_US';
722 722
         }
723
-        $file = \XoopsBaseConfig::get('root-path') . "/modules/" . $this->module->getVar("dirname")
724
-            . "/locale/" . $language . "/changelog.txt";
723
+        $file = \XoopsBaseConfig::get('root-path')."/modules/".$this->module->getVar("dirname")
724
+            . "/locale/".$language."/changelog.txt";
725 725
         if (is_readable($file)) {
726
-            $changelog = utf8_encode(implode("<br />", file($file))) . "\n";
726
+            $changelog = utf8_encode(implode("<br />", file($file)))."\n";
727 727
         } else {
728
-            $file = \XoopsBaseConfig::get('root-path') . "/modules/" . $this->module->getVar("dirname") . "/docs/changelog.txt";
728
+            $file = \XoopsBaseConfig::get('root-path')."/modules/".$this->module->getVar("dirname")."/docs/changelog.txt";
729 729
             if (is_readable($file)) {
730
-                $changelog = utf8_encode(implode("<br />", file($file))) . "\n";
730
+                $changelog = utf8_encode(implode("<br />", file($file)))."\n";
731 731
             }
732 732
         }
733 733
         $author_list = substr($author_list, 0, -2);
@@ -742,22 +742,22 @@  discard block
 block discarded – undo
742 742
 
743 743
         $this->addInfoBox(\XoopsLocale::MODULE_INFORMATION, 'info', 'id="xo-about"');
744 744
         $this->addInfoBoxLine(
745
-            \XoopsLocale::C_DESCRIPTION . ' ' . $this->module->getInfo("description"),
745
+            \XoopsLocale::C_DESCRIPTION.' '.$this->module->getInfo("description"),
746 746
             'info'
747 747
         );
748 748
         $this->addInfoBoxLine(
749
-            \XoopsLocale::C_UPDATE_DATE . ' <span class="bold">'
749
+            \XoopsLocale::C_UPDATE_DATE.' <span class="bold">'
750 750
             . \XoopsLocale::formatTimestamp($this->module->getVar("last_update"), "m")
751 751
             . '</span>',
752 752
             'info'
753 753
         );
754 754
         $this->addInfoBoxLine(
755
-            \XoopsLocale::C_WEBSITE . ' <a class="xo-tooltip" href="http://'
755
+            \XoopsLocale::C_WEBSITE.' <a class="xo-tooltip" href="http://'
756 756
             . $this->module->getInfo("module_website_url")
757 757
             . '" rel="external" title="'
758
-            . $this->module->getInfo("module_website_name") . ' - '
759
-            . $this->module->getInfo("module_website_url") . '">'
760
-            . $this->module->getInfo("module_website_name") . '</a>',
758
+            . $this->module->getInfo("module_website_name").' - '
759
+            . $this->module->getInfo("module_website_url").'">'
760
+            . $this->module->getInfo("module_website_name").'</a>',
761 761
             'info'
762 762
         );
763 763
 
Please login to merge, or discard this patch.
xoops_lib/Xoops/Locale/AbstractLocale.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@
 block discarded – undo
171 171
     public static function substr($str, $start, $length, $ellipsis = '…')
172 172
     {
173 173
         $str2 = mb_strcut($str, $start, $length - strlen($ellipsis));
174
-        return $str2 . (mb_strlen($str)-$start != mb_strlen($str2) ? $ellipsis : '');
174
+        return $str2.(mb_strlen($str) - $start != mb_strlen($str2) ? $ellipsis : '');
175 175
     }
176 176
 
177 177
     /**
Please login to merge, or discard this patch.
xoops_lib/Xoops/Html/Img.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      */
42 42
     public function render()
43 43
     {
44
-        $tag = '<img ' . $this->renderAttributeString() . ' />';
44
+        $tag = '<img '.$this->renderAttributeString().' />';
45 45
 
46 46
         return $tag;
47 47
     }
Please login to merge, or discard this patch.
xoops_lib/Xoops/Html/Menu/Render/BreadCrumb.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,13 +60,13 @@
 block discarded – undo
60 60
                 $anchorEnd = '';
61 61
                 $liClass = ' class="active"';
62 62
                 if ($item->has('link')) {
63
-                    $anchorStart = '<a href="' . $this->xoops->url($item->get('link')) . '">';
63
+                    $anchorStart = '<a href="'.$this->xoops->url($item->get('link')).'">';
64 64
                     $anchorEnd = '</a>';
65 65
                     $liClass = '';
66 66
                 }
67 67
                 $caption = $item->get('caption', '');
68 68
                 $icon = $item->has('icon') ?
69
-                    '<span class="' . $item->get('icon') . '" aria-hidden="true"></span> ' : '';
69
+                    '<span class="'.$item->get('icon').'" aria-hidden="true"></span> ' : '';
70 70
                 $renderedItems .= "<li{$liClass}>{$anchorStart}{$icon}{$caption}{$anchorEnd}</li>";
71 71
                 break;
72 72
             case Item::TYPE_LIST:
Please login to merge, or discard this patch.
xoops_lib/Xoops/Html/Menu/Render/DropDownButton.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
         $dropdown = $menu->get('dropdown', 'dropdown');
39 39
         $renderedMenu = "<div class=\"{$dropdown}\">\n";
40 40
         $class = $menu->get('class', 'btn btn-default dropdown-toggle');
41
-        $id = ($menu->has('id')) ? ' id="' . $menu->get('id') . '"' : '';
42
-        $labeledId = ($menu->has('id')) ? ' aria-labelledby="' . $menu->get('id') . '"' : '';
41
+        $id = ($menu->has('id')) ? ' id="'.$menu->get('id').'"' : '';
42
+        $labeledId = ($menu->has('id')) ? ' aria-labelledby="'.$menu->get('id').'"' : '';
43 43
         $caption = $menu->get('caption', '');
44
-        $icon = $menu->has('icon') ? '<span class="' . $menu->get('icon') . '" aria-hidden="true"></span> ' : '';
44
+        $icon = $menu->has('icon') ? '<span class="'.$menu->get('icon').'" aria-hidden="true"></span> ' : '';
45 45
         $renderedMenu .= <<<EOT
46 46
 <button class="{$class}" type="button"{$id} data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
47 47
 {$icon}{$caption} <span class="caret"></span>
@@ -74,13 +74,13 @@  discard block
 block discarded – undo
74 74
                 $anchorEnd = '';
75 75
                 $liClass = ' class="active"';
76 76
                 if ($item->has('link')) {
77
-                    $anchorStart = '<a href="' . $this->xoops->url($item->get('link')) . '">';
77
+                    $anchorStart = '<a href="'.$this->xoops->url($item->get('link')).'">';
78 78
                     $anchorEnd = '</a>';
79 79
                     $liClass = '';
80 80
                 }
81 81
                 $caption = $item->get('caption', '');
82 82
                 $icon = $item->has('icon') ?
83
-                    '<span class="' . $item->get('icon') . '" aria-hidden="true"></span> ' : '';
83
+                    '<span class="'.$item->get('icon').'" aria-hidden="true"></span> ' : '';
84 84
                 $renderedItems .= "<li{$liClass}>{$anchorStart}{$icon}{$caption}{$anchorEnd}</li>";
85 85
                 break;
86 86
             case Item::TYPE_LIST:
Please login to merge, or discard this patch.
xoops_lib/Xoops/Auth/Provisioning.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 
198 198
             return $newuser;
199 199
         } else {
200
-            $xoops->redirect(\XoopsBaseConfig::get('url') . '/user.php', 5, $newuser->getHtmlErrors());
200
+            $xoops->redirect(\XoopsBaseConfig::get('url').'/user.php', 5, $newuser->getHtmlErrors());
201 201
         }
202 202
 
203 203
         return $ret;
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
         if ($member_handler->insertUser($xoopsUser)) {
226 226
             return $xoopsUser;
227 227
         } else {
228
-            $xoops->redirect(\XoopsBaseConfig::get('url') . '/user.php', 5, $xoopsUser->getHtmlErrors());
228
+            $xoops->redirect(\XoopsBaseConfig::get('url').'/user.php', 5, $xoopsUser->getHtmlErrors());
229 229
         }
230 230
 
231 231
         return $ret;
Please login to merge, or discard this patch.
xoops_lib/Xoops/Auth/AuthAbstract.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,10 +94,10 @@
 block discarded – undo
94 94
         if ($xoops->getConfig('debug_mode') == 1 || $xoops->getConfig('debug_mode') == 2) {
95 95
             if (!empty($this->errors)) {
96 96
                 foreach ($this->errors as $errstr) {
97
-                    $ret .= $errstr . '<br/>';
97
+                    $ret .= $errstr.'<br/>';
98 98
                 }
99 99
             } else {
100
-                $ret .= \XoopsLocale::NONE . '<br />';
100
+                $ret .= \XoopsLocale::NONE.'<br />';
101 101
             }
102 102
             $ret .= sprintf(\XoopsLocale::F_USING_AUTHENTICATION_METHOD, $this->auth_method);
103 103
         } else {
Please login to merge, or discard this patch.