Passed
Pull Request — master (#8)
by Michael
11:33
created
include/oninstall.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
  */
29 29
 function xoops_module_pre_install_myiframe(\XoopsModule $module)
30 30
 {
31
-    require_once \dirname(__DIR__) . '/preloads/autoloader.php';
31
+    require_once \dirname(__DIR__).'/preloads/autoloader.php';
32 32
     /** @var \Utility $utility */
33 33
     $utility      = new Utility();
34 34
     $xoopsSuccess = $utility::checkVerXoops($module);
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     if (false !== $xoopsSuccess && false !== $phpSuccess) {
38 38
         $moduleTables = &$module->getInfo('tables');
39 39
         foreach ($moduleTables as $table) {
40
-            $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS ' . $GLOBALS['xoopsDB']->prefix($table) . ';');
40
+            $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS '.$GLOBALS['xoopsDB']->prefix($table).';');
41 41
         }
42 42
     }
43 43
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
  */
53 53
 function xoops_module_install_myiframe(\XoopsModule $module)
54 54
 {
55
-    require \dirname(__DIR__, 3) . '/mainfile.php';
55
+    require \dirname(__DIR__, 3).'/mainfile.php';
56 56
 
57 57
     $moduleDirName = \basename(\dirname(__DIR__));
58 58
 
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
     /** @var \XoopsGroupPermHandler $grouppermHandler */
74 74
     $grouppermHandler = xoops_getHandler('groupperm');
75 75
     // access rights ------------------------------------------
76
-    $grouppermHandler->addRight($moduleDirName . '_approve', 1, XOOPS_GROUP_ADMIN, $moduleId);
77
-    $grouppermHandler->addRight($moduleDirName . '_submit', 1, XOOPS_GROUP_ADMIN, $moduleId);
78
-    $grouppermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_ADMIN, $moduleId);
79
-    $grouppermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_USERS, $moduleId);
80
-    $grouppermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_ANONYMOUS, $moduleId);
76
+    $grouppermHandler->addRight($moduleDirName.'_approve', 1, XOOPS_GROUP_ADMIN, $moduleId);
77
+    $grouppermHandler->addRight($moduleDirName.'_submit', 1, XOOPS_GROUP_ADMIN, $moduleId);
78
+    $grouppermHandler->addRight($moduleDirName.'_view', 1, XOOPS_GROUP_ADMIN, $moduleId);
79
+    $grouppermHandler->addRight($moduleDirName.'_view', 1, XOOPS_GROUP_USERS, $moduleId);
80
+    $grouppermHandler->addRight($moduleDirName.'_view', 1, XOOPS_GROUP_ANONYMOUS, $moduleId);
81 81
 
82 82
     //  ---  CREATE FOLDERS ---------------
83 83
     if (count($configurator->uploadFolders) > 0) {
@@ -89,14 +89,14 @@  discard block
 block discarded – undo
89 89
 
90 90
     //  ---  COPY blank.png FILES ---------------
91 91
     if (count($configurator->copyBlankFiles) > 0) {
92
-        $file = \dirname(__DIR__) . '/assets/images/blank.png';
92
+        $file = \dirname(__DIR__).'/assets/images/blank.png';
93 93
         foreach (array_keys($configurator->copyBlankFiles) as $i) {
94
-            $dest = $configurator->copyBlankFiles[$i] . '/blank.png';
94
+            $dest = $configurator->copyBlankFiles[$i].'/blank.png';
95 95
             $utility::copyFile($file, $dest);
96 96
         }
97 97
     }
98 98
     //delete .html entries from the tpl table
99
-    $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('tplfile') . " WHERE `tpl_module` = '" . $xoopsModule->getVar('dirname', 'n') . "' AND `tpl_file` LIKE '%.html%'";
99
+    $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('tplfile')." WHERE `tpl_module` = '".$xoopsModule->getVar('dirname', 'n')."' AND `tpl_file` LIKE '%.html%'";
100 100
     $GLOBALS['xoopsDB']->queryF($sql);
101 101
 
102 102
     return true;
Please login to merge, or discard this patch.
include/onuninstall.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,8 @@
 block discarded – undo
51 51
     if ($dirInfo->isDir()) {
52 52
         // The directory exists so rename it
53 53
         $date = date('Y-m-d');
54
-        if (!rename($uploadDirectory, $uploadDirectory . "_bak_$date")) {
55
-            $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_DEL_PATH'), $uploadDirectory));
54
+        if (!rename($uploadDirectory, $uploadDirectory."_bak_$date")) {
55
+            $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_DEL_PATH'), $uploadDirectory));
56 56
             $success = false;
57 57
         }
58 58
     }
Please login to merge, or discard this patch.
blocks/myiframe_iframe.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * Copyright (c) Hervé Thouzard of Instant Zero (https://www.instant-zero.com)
7 7
  * ****************************************************************************
8 8
  */
9
-require_once XOOPS_ROOT_PATH . '/modules/myiframe/include/functions.php';
9
+require_once XOOPS_ROOT_PATH.'/modules/myiframe/include/functions.php';
10 10
 
11 11
 /**
12 12
  * @param $options
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         'left',
23 23
         'rigth',
24 24
     ];
25
-    $tblscrolling  = [
25
+    $tblscrolling = [
26 26
         'yes',
27 27
         'no',
28 28
         'auto',
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
         $block['longdesc']     = $frame->getVar('frame_description');
36 36
         $block['width']        = $frame->getVar('frame_width');
37 37
         $block['height']       = $frame->getVar('frame_height');
38
-        $block['align']        = $tblalign[$frame->getVar('frame_align') - 1];
38
+        $block['align']        = $tblalign[$frame->getVar('frame_align')-1];
39 39
         $block['frameborder']  = $frame->getVar('frame_frameborder');
40 40
         $block['marginwidth']  = $frame->getVar('frame_marginwidth');
41 41
         $block['marginheight'] = $frame->getVar('frame_marginheight');
42
-        $block['scrolling']    = $tblscrolling[$frame->getVar('frame_scrolling') - 1];
42
+        $block['scrolling']    = $tblscrolling[$frame->getVar('frame_scrolling')-1];
43 43
         $block['url']          = $frame->getVar('frame_url');
44 44
     }
45 45
 
@@ -59,14 +59,14 @@  discard block
 block discarded – undo
59 59
     $critere->setSort('frame_description');
60 60
     $frarray = $iframeHandler->getObjects($critere);
61 61
 
62
-    $form = '' . _MB_MYIFRAME_IFRAME . "&nbsp;<select name='options[0]'>";
62
+    $form = ''._MB_MYIFRAME_IFRAME."&nbsp;<select name='options[0]'>";
63 63
     /** @var Myiframe $oneframe */
64 64
     foreach ($frarray as $oneframe) {
65
-        $form .= "<option value='" . $oneframe->getVar('frame_frameid') . "'";
65
+        $form .= "<option value='".$oneframe->getVar('frame_frameid')."'";
66 66
         if ($options[0] == $oneframe->getVar('frame_frameid')) {
67 67
             $form .= " selected='selected'";
68 68
         }
69
-        $form .= '>' . $oneframe->getVar('frame_description') . '</option>';
69
+        $form .= '>'.$oneframe->getVar('frame_description').'</option>';
70 70
     }
71 71
     $form .= "</select>\n";
72 72
 
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -11,14 +11,14 @@  discard block
 block discarded – undo
11 11
 
12 12
 
13 13
 $GLOBALS['xoopsOption']['template_main'] = 'myiframe.tpl';
14
-require __DIR__ . '/header.php';
15
-require_once XOOPS_ROOT_PATH . '/header.php';
14
+require __DIR__.'/header.php';
15
+require_once XOOPS_ROOT_PATH.'/header.php';
16 16
 
17 17
 $suplparam = '';
18 18
 if (isset($_GET)) {
19 19
     foreach ($_GET as $k => $v) {
20 20
         if ('IFRAMEID' !== \mb_strtoupper(trim($k))) {
21
-            $suplparam .= $k . '=' . $v . '&';
21
+            $suplparam .= $k.'='.$v.'&';
22 22
         }
23 23
     }
24 24
 }
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 $iframeHandler = $helper->getHandler('MyiframeBase');
32 32
 
33 33
 if (Request::hasVar('iframeid', 'GET')) {
34
-    $tblalign     = [
34
+    $tblalign = [
35 35
         'top',
36 36
         'middle',
37 37
         'bottom',
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         'no',
44 44
         'auto',
45 45
     ];
46
-    $frameid      = Request::getInt('iframeid', 0, 'GET');
46
+    $frameid = Request::getInt('iframeid', 0, 'GET');
47 47
 
48 48
     $frame = $iframeHandler->get($frameid);
49 49
 
@@ -53,13 +53,13 @@  discard block
 block discarded – undo
53 53
         $xoopsTpl->assign('longdesc', $frame->getVar('frame_description'));
54 54
         $xoopsTpl->assign('width', $frame->getVar('frame_width'));
55 55
         $xoopsTpl->assign('height', $frame->getVar('frame_height'));
56
-        $xoopsTpl->assign('align', $tblalign[$frame->getVar('frame_align') - 1]);
56
+        $xoopsTpl->assign('align', $tblalign[$frame->getVar('frame_align')-1]);
57 57
         $xoopsTpl->assign('frameborder', $frame->getVar('frame_frameborder'));
58 58
         $xoopsTpl->assign('marginwidth', $frame->getVar('frame_marginwidth'));
59 59
         $xoopsTpl->assign('marginheight', $frame->getVar('frame_marginheight'));
60
-        $xoopsTpl->assign('scrolling', $tblscrolling[$frame->getVar('frame_scrolling') - 1]);
60
+        $xoopsTpl->assign('scrolling', $tblscrolling[$frame->getVar('frame_scrolling')-1]);
61 61
         if ('' !== xoops_trim($suplparam)) {
62
-            $xoopsTpl->assign('url', $frame->getVar('frame_url') . '?' . $suplparam);
62
+            $xoopsTpl->assign('url', $frame->getVar('frame_url').'?'.$suplparam);
63 63
         } else {
64 64
             $xoopsTpl->assign('url', $frame->getVar('frame_url'));
65 65
         }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     }
72 72
 } else {
73 73
     if (myiframe_getmoduleoption('showlist')) {
74
-        $baseurl = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/index.php';
74
+        $baseurl = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/index.php';
75 75
         $frarray = [];
76 76
         $critere = new \Criteria('1', '1', '=');
77 77
         $critere->setSort('frame_description');
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                 if ('' === xoops_trim($frame->getVar('frame_description'))) {
83 83
                     $liendesc = $frame->getVar('frame_url');
84 84
                 } else {
85
-                    $liendesc = "<a href='" . $baseurl . '?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . '</a>';
85
+                    $liendesc = "<a href='".$baseurl.'?iframeid='.$frame->getVar('frame_frameid')."'>".$frame->getVar('frame_description').'</a>';
86 86
                 }
87 87
                 $iframe['list'] = $liendesc;
88 88
                 $xoopsTpl->append('iframes', $iframe);
@@ -93,4 +93,4 @@  discard block
 block discarded – undo
93 93
         $xoopsTpl->assign('frame_error', _MYIFRAME_FRAME_ERROR);
94 94
     }
95 95
 }
96
-require_once XOOPS_ROOT_PATH . '/footer.php';
96
+require_once XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
class/Helper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     {
68 68
         $ret = false;
69 69
 
70
-        $class = __NAMESPACE__ . '\\' . \ucfirst($name) . 'Handler';
70
+        $class = __NAMESPACE__.'\\'.\ucfirst($name).'Handler';
71 71
         if (!\class_exists($class)) {
72 72
             throw new \RuntimeException("Class '$class' not found");
73 73
         }
Please login to merge, or discard this patch.
class/Common/VersionChecks.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
         //check for minimum XOOPS version
41 41
         $currentVer = mb_substr(\XOOPS_VERSION, 6); // get the numeric part of string
42 42
         if (null === $requiredVer) {
43
-            $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string
43
+            $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string
44 44
         }
45 45
         $success = true;
46 46
 
47 47
         if (\version_compare($currentVer, $requiredVer, '<')) {
48 48
             $success = false;
49
-            $module->setErrors(\sprintf(\constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS'), $requiredVer, $currentVer));
49
+            $module->setErrors(\sprintf(\constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS'), $requiredVer, $currentVer));
50 50
         }
51 51
 
52 52
         return $success;
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
         if (false !== $reqVer && '' !== $reqVer) {
79 79
             if (\version_compare($verNum, $reqVer, '<')) {
80
-                $module->setErrors(\sprintf(\constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP'), $reqVer, $verNum));
80
+                $module->setErrors(\sprintf(\constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP'), $reqVer, $verNum));
81 81
                 $success = false;
82 82
             }
83 83
         }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $moduleDirName      = \basename(\dirname(__DIR__, 2));
97 97
         $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
98 98
         $update             = '';
99
-        $repository         = 'XoopsModules25x/' . $moduleDirName;
99
+        $repository         = 'XoopsModules25x/'.$moduleDirName;
100 100
         //        $repository         = 'XoopsModules25x/publisher'; //for testing only
101 101
         $ret             = null;
102 102
         $infoReleasesUrl = "https://api.github.com/repos/$repository/releases";
@@ -110,14 +110,14 @@  discard block
 block discarded – undo
110 110
                 if (false === $curlReturn) {
111 111
                     \trigger_error(\curl_error($curlHandle));
112 112
                 } elseif (false !== \mb_strpos($curlReturn, 'Not Found')) {
113
-                    \trigger_error('Repository Not Found: ' . $infoReleasesUrl);
113
+                    \trigger_error('Repository Not Found: '.$infoReleasesUrl);
114 114
                 } else {
115 115
                     $file              = json_decode($curlReturn, false);
116 116
                     $latestVersionLink = \sprintf("https://github.com/$repository/archive/%s.zip", $file ? \reset($file)->tag_name : $default);
117 117
                     $latestVersion     = $file[0]->tag_name;
118 118
                     $prerelease        = $file[0]->prerelease;
119 119
                     if ('master' !== $latestVersionLink) {
120
-                        $update = \constant('CO_' . $moduleDirNameUpper . '_' . 'NEW_VERSION') . $latestVersion;
120
+                        $update = \constant('CO_'.$moduleDirNameUpper.'_'.'NEW_VERSION').$latestVersion;
121 121
                     }
122 122
                     //"PHP-standardized" version
123 123
                     $latestVersion = \mb_strtolower($latestVersion);
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                         $latestVersion = \str_replace('_', '', \mb_strtolower($latestVersion));
126 126
                         $latestVersion = \str_replace('final', '', \mb_strtolower($latestVersion));
127 127
                     }
128
-                    $moduleVersion = ($helper->getModule()->getInfo('version') . '_' . $helper->getModule()->getInfo('module_status'));
128
+                    $moduleVersion = ($helper->getModule()->getInfo('version').'_'.$helper->getModule()->getInfo('module_status'));
129 129
                     //"PHP-standardized" version
130 130
                     $moduleVersion = \str_replace(' ', '', \mb_strtolower($moduleVersion));
131 131
                     //                    $moduleVersion = '1.0'; //for testing only
Please login to merge, or discard this patch.
class/Common/TestdataButtons.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -62,13 +62,13 @@  discard block
 block discarded – undo
62 62
 
63 63
         if (self::SHOW_BUTTONS == $displaySampleButton) {
64 64
             \xoops_loadLanguage('admin/modulesadmin', 'system');
65
-            $adminObject->addItemButton(\constant('CO_' . $moduleDirNameUpper . '_' . 'LOAD_SAMPLEDATA'), $helper->url('testdata/index.php?op=load'), 'add');
66
-            $adminObject->addItemButton(\constant('CO_' . $moduleDirNameUpper . '_' . 'SAVE_SAMPLEDATA'), $helper->url('testdata/index.php?op=save'), 'add');
67
-            $adminObject->addItemButton(\constant('CO_' . $moduleDirNameUpper . '_' . 'CLEAR_SAMPLEDATA'), $helper->url('testdata/index.php?op=clear'), 'alert');
65
+            $adminObject->addItemButton(\constant('CO_'.$moduleDirNameUpper.'_'.'LOAD_SAMPLEDATA'), $helper->url('testdata/index.php?op=load'), 'add');
66
+            $adminObject->addItemButton(\constant('CO_'.$moduleDirNameUpper.'_'.'SAVE_SAMPLEDATA'), $helper->url('testdata/index.php?op=save'), 'add');
67
+            $adminObject->addItemButton(\constant('CO_'.$moduleDirNameUpper.'_'.'CLEAR_SAMPLEDATA'), $helper->url('testdata/index.php?op=clear'), 'alert');
68 68
             //    $adminObject->addItemButton(constant('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA'), $helper->url( 'testdata/index.php?op=exportschema'), 'add');
69
-            $adminObject->addItemButton(\constant('CO_' . $moduleDirNameUpper . '_' . 'HIDE_SAMPLEDATA_BUTTONS'), '?op=hide_buttons', 'delete');
69
+            $adminObject->addItemButton(\constant('CO_'.$moduleDirNameUpper.'_'.'HIDE_SAMPLEDATA_BUTTONS'), '?op=hide_buttons', 'delete');
70 70
         } else {
71
-            $adminObject->addItemButton(\constant('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLEDATA_BUTTONS'), '?op=show_buttons', 'add');
71
+            $adminObject->addItemButton(\constant('CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLEDATA_BUTTONS'), '?op=show_buttons', 'add');
72 72
             // $displaySampleButton = $config['displaySampleButton'];
73 73
         }
74 74
     }
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public static function hideButtons(): void
82 82
     {
83
-        $yamlFile                   = \dirname(__DIR__, 2) . '/config/admin.yml';
83
+        $yamlFile                   = \dirname(__DIR__, 2).'/config/admin.yml';
84 84
         $app                        = [];
85 85
         $app['displaySampleButton'] = 0;
86 86
         Yaml::save($app, $yamlFile);
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public static function showButtons(): void
96 96
     {
97
-        $yamlFile                   = \dirname(__DIR__, 2) . '/config/admin.yml';
97
+        $yamlFile                   = \dirname(__DIR__, 2).'/config/admin.yml';
98 98
         $app                        = [];
99 99
         $app['displaySampleButton'] = 1;
100 100
         Yaml::save($app, $yamlFile);
Please login to merge, or discard this patch.
class/Common/ServerStats.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -36,19 +36,19 @@  discard block
 block discarded – undo
36 36
         //        $sql   .= " WHERE metakey='version' LIMIT 1";
37 37
         //        $query = $GLOBALS['xoopsDB']->query($sql);
38 38
         //        list($meta) = $GLOBALS['xoopsDB']->fetchRow($query);
39
-        $html .= "<fieldset><legend style='font-weight: bold; color: #900;'>" . \constant('CO_' . $moduleDirNameUpper . '_IMAGEINFO') . "</legend>\n";
39
+        $html .= "<fieldset><legend style='font-weight: bold; color: #900;'>".\constant('CO_'.$moduleDirNameUpper.'_IMAGEINFO')."</legend>\n";
40 40
         $html .= "<div style='padding: 8px;'>\n";
41 41
         //        $html .= '<div>' . constant('CO_' . $moduleDirNameUpper . '_METAVERSION') . $meta . "</div>\n";
42 42
         //        $html .= "<br>\n";
43 43
         //        $html .= "<br>\n";
44
-        $html .= '<div>' . \constant('CO_' . $moduleDirNameUpper . '_SPHPINI') . "</div>\n";
44
+        $html .= '<div>'.\constant('CO_'.$moduleDirNameUpper.'_SPHPINI')."</div>\n";
45 45
         $html .= "<ul>\n";
46 46
 
47
-        $gdlib = \function_exists('gd_info') ? '<span style="color: green;">' . \constant('CO_' . $moduleDirNameUpper . '_GDON') . '</span>' : '<span style="color: red;">' . \constant('CO_' . $moduleDirNameUpper . '_GDOFF') . '</span>';
48
-        $html  .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib;
47
+        $gdlib = \function_exists('gd_info') ? '<span style="color: green;">'.\constant('CO_'.$moduleDirNameUpper.'_GDON').'</span>' : '<span style="color: red;">'.\constant('CO_'.$moduleDirNameUpper.'_GDOFF').'</span>';
48
+        $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS').$gdlib;
49 49
         if (\function_exists('gd_info')) {
50 50
             if (true === ($gdlib = gd_info())) {
51
-                $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '<b>' . $gdlib['GD Version'] . '</b>';
51
+                $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_GDLIBVERSION').'<b>'.$gdlib['GD Version'].'</b>';
52 52
             }
53 53
         }
54 54
         //
@@ -58,18 +58,18 @@  discard block
 block discarded – undo
58 58
         //    $registerglobals = (!ini_get('register_globals')) ? "<span style=\"color: green;\">" . constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>' : "<span style=\"color: red;\">" . constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>';
59 59
         //    $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_REGISTERGLOBALS . $registerglobals;
60 60
         //
61
-        $downloads = \ini_get('file_uploads') ? '<span style="color: green;">' . \constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>' : '<span style="color: red;">' . \constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>';
62
-        $html      .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads;
61
+        $downloads = \ini_get('file_uploads') ? '<span style="color: green;">'.\constant('CO_'.$moduleDirNameUpper.'_ON').'</span>' : '<span style="color: red;">'.\constant('CO_'.$moduleDirNameUpper.'_OFF').'</span>';
62
+        $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS').$downloads;
63 63
 
64
-        $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' <b><span style="color: blue;">' . \ini_get('upload_max_filesize') . "</span></b>\n";
65
-        $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE') . ' <b><span style="color: blue;">' . \ini_get('post_max_size') . "</span></b>\n";
66
-        $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT') . ' <b><span style="color: blue;">' . \ini_get('memory_limit') . "</span></b>\n";
64
+        $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE').' <b><span style="color: blue;">'.\ini_get('upload_max_filesize')."</span></b>\n";
65
+        $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE').' <b><span style="color: blue;">'.\ini_get('post_max_size')."</span></b>\n";
66
+        $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT').' <b><span style="color: blue;">'.\ini_get('memory_limit')."</span></b>\n";
67 67
         $html .= "</ul>\n";
68 68
         $html .= "<ul>\n";
69
-        $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_SERVERPATH') . ' <b>' . XOOPS_ROOT_PATH . "</b>\n";
69
+        $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_SERVERPATH').' <b>'.XOOPS_ROOT_PATH."</b>\n";
70 70
         $html .= "</ul>\n";
71 71
         $html .= "<br>\n";
72
-        $html .= \constant('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC') . "\n";
72
+        $html .= \constant('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC')."\n";
73 73
         $html .= '</div>';
74 74
         $html .= '</fieldset><br>';
75 75
 
Please login to merge, or discard this patch.
class/Common/FilesManagement.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
                     throw new \RuntimeException(\sprintf('Unable to create the %s directory', $folder));
33 33
                 }
34 34
 
35
-                file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>');
35
+                file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>');
36 36
             }
37 37
         } catch (\Throwable $e) {
38 38
             echo 'Caught exception: ', $e->getMessage(), "\n", '<br>';
@@ -57,14 +57,14 @@  discard block
 block discarded – undo
57 57
         $dir = \opendir($src);
58 58
         //        @mkdir($dst);
59 59
         if (!@\mkdir($dst) && !\is_dir($dst)) {
60
-            throw new \RuntimeException('The directory ' . $dst . ' could not be created.');
60
+            throw new \RuntimeException('The directory '.$dst.' could not be created.');
61 61
         }
62 62
         while (false !== ($file = \readdir($dir))) {
63 63
             if (('.' !== $file) && ('..' !== $file)) {
64
-                if (\is_dir($src . '/' . $file)) {
65
-                    self::recurseCopy($src . '/' . $file, $dst . '/' . $file);
64
+                if (\is_dir($src.'/'.$file)) {
65
+                    self::recurseCopy($src.'/'.$file, $dst.'/'.$file);
66 66
                 } else {
67
-                    \copy($src . '/' . $file, $dst . '/' . $file);
67
+                    \copy($src.'/'.$file, $dst.'/'.$file);
68 68
                 }
69 69
             }
70 70
         }
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                 self::rrmdir($fObj->getPathname());
155 155
             }
156 156
         }
157
-        $iterator = null;   // clear iterator Obj to close file/directory
157
+        $iterator = null; // clear iterator Obj to close file/directory
158 158
 
159 159
         return \rmdir($src); // remove the directory & return results
160 160
     }
@@ -188,14 +188,14 @@  discard block
 block discarded – undo
188 188
         $iterator = new \DirectoryIterator($src);
189 189
         foreach ($iterator as $fObj) {
190 190
             if ($fObj->isFile()) {
191
-                \rename($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
191
+                \rename($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
192 192
             } elseif (!$fObj->isDot() && $fObj->isDir()) {
193 193
                 // Try recursively on directory
194
-                self::rmove($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
194
+                self::rmove($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
195 195
                 //                rmdir($fObj->getPath()); // now delete the directory
196 196
             }
197 197
         }
198
-        $iterator = null;   // clear iterator Obj to close file/directory
198
+        $iterator = null; // clear iterator Obj to close file/directory
199 199
 
200 200
         return \rmdir($src); // remove the directory & return results
201 201
     }
@@ -232,9 +232,9 @@  discard block
 block discarded – undo
232 232
         $iterator = new \DirectoryIterator($src);
233 233
         foreach ($iterator as $fObj) {
234 234
             if ($fObj->isFile()) {
235
-                \copy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
235
+                \copy($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
236 236
             } elseif (!$fObj->isDot() && $fObj->isDir()) {
237
-                self::rcopy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
237
+                self::rcopy($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
238 238
             }
239 239
         }
240 240
 
Please login to merge, or discard this patch.