Passed
Pull Request — master (#11)
by Michael
11:08
created
preloads/autoloader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
  * @see http://www.php-fig.org/psr/psr-4/examples/
5 5
  */
6 6
 spl_autoload_register(
7
-    static function ($class) {
7
+    static function($class) {
8 8
         // project-specific namespace prefix
9 9
         $prefix = 'XoopsModules\\' . ucfirst(basename(dirname(__DIR__)));
10 10
 
Please login to merge, or discard this patch.
blocks/xoopsfaq_category.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -110,16 +110,16 @@
 block discarded – undo
110 110
     $ychck = (isset($options[0]) && ($options[0] > 0)) ? ' checked' : '';
111 111
     $nchck = !empty($ychck) ? '' : ' checked';
112 112
     $form  = '<div class="line140">'
113
-             . _MB_XOOPSFAQ_SHOW_EMPTY
114
-             . '&nbsp;<label for="r0">'
115
-             . _NO
116
-             . '</label><input type="radio" name="options[0]" id="r0" value="0"'
117
-             . $nchck
118
-             . '>&nbsp;<label for="r1">'
119
-             . _YES
120
-             . '</label><input type="radio" name="options[0]" id="r1" value="1"'
121
-             . $ychck
122
-             . '></div>'
123
-             . "\n";
113
+                . _MB_XOOPSFAQ_SHOW_EMPTY
114
+                . '&nbsp;<label for="r0">'
115
+                . _NO
116
+                . '</label><input type="radio" name="options[0]" id="r0" value="0"'
117
+                . $nchck
118
+                . '>&nbsp;<label for="r1">'
119
+                . _YES
120
+                . '</label><input type="radio" name="options[0]" id="r1" value="1"'
121
+                . $ychck
122
+                . '></div>'
123
+                . "\n";
124 124
     return $form;
125 125
 }
Please login to merge, or discard this patch.
admin/menu.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 $helper->loadLanguage('common');
41 41
 
42 42
 // get path to icons
43
-$pathModIcon32 = XOOPS_URL .   '/modules/' . $moduleDirName . '/assets/images/icons/32/';
43
+$pathModIcon32 = XOOPS_URL . '/modules/' . $moduleDirName . '/assets/images/icons/32/';
44 44
 if (is_object($helper->getModule()) && false !== $helper->getModule()->getInfo('modicons32')) {
45 45
     $pathModIcon32 = $helper->url($helper->getModule()->getInfo('modicons32'));
46 46
 }
Please login to merge, or discard this patch.
class/Common/FilesManagement.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
                 self::rrmdir($fObj->getPathname());
147 147
             }
148 148
         }
149
-        $iterator = null;   // clear iterator Obj to close file/directory
149
+        $iterator = null; // clear iterator Obj to close file/directory
150 150
         return \rmdir($src); // remove the directory & return results
151 151
     }
152 152
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
                 //                rmdir($fObj->getPath()); // now delete the directory
187 187
             }
188 188
         }
189
-        $iterator = null;   // clear iterator Obj to close file/directory
189
+        $iterator = null; // clear iterator Obj to close file/directory
190 190
         return \rmdir($src); // remove the directory & return results
191 191
     }
192 192
 
Please login to merge, or discard this patch.
class/Common/TestdataButtons.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
     public static function hideButtons(): void
63 63
     {
64
-        $yamlFile            = \dirname(__DIR__, 2) . '/config/admin.yml';
64
+        $yamlFile = \dirname(__DIR__, 2) . '/config/admin.yml';
65 65
         $app                        = [];
66 66
         $app['displaySampleButton'] = 0;
67 67
         Yaml::save($app, $yamlFile);
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
     public static function showButtons(): void
72 72
     {
73
-        $yamlFile            = \dirname(__DIR__, 2) . '/config/admin.yml';
73
+        $yamlFile = \dirname(__DIR__, 2) . '/config/admin.yml';
74 74
         $app                        = [];
75 75
         $app['displaySampleButton'] = 1;
76 76
         Yaml::save($app, $yamlFile);
Please login to merge, or discard this patch.
class/Common/Jsonld.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
                     'text'  => $value['answer'],
27 27
                 ],
28 28
             ];
29
-            $jsonld[]                = $schema;
29
+            $jsonld[] = $schema;
30 30
         }
31 31
 
32 32
         $out .= '<script type="application/ld+json">' . json_encode($jsonld, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . '</script>';
Please login to merge, or discard this patch.
class/Common/ServerStats.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $html .= "<ul>\n";
48 48
 
49 49
         $gdlib = \function_exists('gd_info') ? '<span style="color: #008000;">' . \constant('CO_' . $moduleDirNameUpper . '_GDON') . '</span>' : '<span style="color: #ff0000;">' . \constant('CO_' . $moduleDirNameUpper . '_GDOFF') . '</span>';
50
-        $html  .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib;
50
+        $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib;
51 51
         if (\function_exists('gd_info') && true === ($gdlib = gd_info())) {
52 52
                 $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '<b>' . $gdlib['GD Version'] . '</b>';
53 53
             }
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         //    $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_REGISTERGLOBALS . $registerglobals;
59 59
 
60 60
         $downloads = \ini_get('file_uploads') ? '<span style="color: #008000;">' . \constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>' : '<span style="color: #ff0000;">' . \constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>';
61
-        $html      .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads;
61
+        $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads;
62 62
 
63 63
         $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' <b><span style="color: #0000ff;">' . \ini_get('upload_max_filesize') . "</span></b>\n";
64 64
         $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE') . ' <b><span style="color: #0000ff;">' . \ini_get('post_max_size') . "</span></b>\n";
Please login to merge, or discard this patch.
class/Common/SysUtility.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
167 167
             $tempTable = $GLOBALS['xoopsDB']->fetchArray($result, \MYSQLI_ASSOC);
168 168
         }
169 169
 
170
-         if (!$tempTable) {
170
+            if (!$tempTable) {
171 171
             \trigger_error($GLOBALS['xoopsDB']->error());
172 172
         }
173 173
         // set the auto-incremented id's value to blank.
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
  */
39 39
 class SysUtility
40 40
 {
41
-    use VersionChecks;    //checkVerXoops, checkVerPhp Traits
42
-    use ServerStats;    // getServerStats Trait
43
-    use FilesManagement;    // Files Management Trait
41
+    use VersionChecks; //checkVerXoops, checkVerPhp Traits
42
+    use ServerStats; // getServerStats Trait
43
+    use FilesManagement; // Files Management Trait
44 44
     //use ModuleStats;    // ModuleStats Trait
45 45
 
46 46
     //--------------- Common module methods -----------------------------
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     {
63 63
         global $start, $order, $sort;
64 64
 
65
-        $selectView   = '';
65
+        $selectView = '';
66 66
         $helper        = Helper::getInstance();
67 67
 
68 68
         //$pathModIcon16 = XOOPS_URL . '/modules/' . $moduleDirName . '/' . $helper->getConfig('modicons16');
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
                 $contentLength = \mb_strlen(\preg_replace('/&[0-9a-z]{2,8};|&#\d{1,7};|[0-9a-f]{1,6};/i', ' ', $lineMatchings[2]));
243 243
                 if ($totalLength + $contentLength > $length) {
244 244
                     // the number of characters which are left
245
-                    $left            = $length - $totalLength;
245
+                    $left = $length - $totalLength;
246 246
                     $entitiesLength = 0;
247 247
                     // search for html entities
248 248
                     if (\preg_match_all('/&[0-9a-z]{2,8};|&#\d{1,7};|[0-9a-f]{1,6};/i', $lineMatchings[2], $entities, \PREG_OFFSET_CAPTURE)) {
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
                     // maximum length is reached, so get off the loop
262 262
                     break;
263 263
                 }
264
-                $truncate     .= $lineMatchings[2];
264
+                $truncate .= $lineMatchings[2];
265 265
                 $totalLength += $contentLength;
266 266
 
267 267
                 // if the maximum length is reached, get off the loop
Please login to merge, or discard this patch.
class/ContentsHandler.php 2 patches
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -164,32 +164,32 @@  discard block
 block discarded – undo
164 164
         $buttons = ['edit', 'delete'];
165 165
 
166 166
         $ret = '<table class="outer width100 bnone pad3 marg5">'
167
-               . '  <thead>'
168
-               . '  <tr class="center">'
169
-               . '    <th class="width5">'
170
-               . \_AM_XOOPSFAQ_CONTENTS_ID
171
-               . '</th>'
172
-               . '    <th class="width5">'
173
-               . \_AM_XOOPSFAQ_CONTENTS_ACTIVE
174
-               . '</th>'
175
-               . '    <th class="width5">'
176
-               . \_AM_XOOPSFAQ_CONTENTS_WEIGHT
177
-               . '</th>'
178
-               . '    <th class="left">'
179
-               . \_AM_XOOPSFAQ_CONTENTS_TITLE
180
-               . '</th>'
181
-               . '    <th class="left">'
182
-               . \_AM_XOOPSFAQ_CATEGORY_TITLE
183
-               . '</th>'
184
-               . '    <th>'
185
-               . \_AM_XOOPSFAQ_CONTENTS_PUBLISH
186
-               . '</th>'
187
-               . '    <th class="width20">'
188
-               . \_AM_XOOPSFAQ_ACTIONS
189
-               . '</th>'
190
-               . '  </tr>'
191
-               . '  </thead>'
192
-               . '  <tbody>';
167
+                . '  <thead>'
168
+                . '  <tr class="center">'
169
+                . '    <th class="width5">'
170
+                . \_AM_XOOPSFAQ_CONTENTS_ID
171
+                . '</th>'
172
+                . '    <th class="width5">'
173
+                . \_AM_XOOPSFAQ_CONTENTS_ACTIVE
174
+                . '</th>'
175
+                . '    <th class="width5">'
176
+                . \_AM_XOOPSFAQ_CONTENTS_WEIGHT
177
+                . '</th>'
178
+                . '    <th class="left">'
179
+                . \_AM_XOOPSFAQ_CONTENTS_TITLE
180
+                . '</th>'
181
+                . '    <th class="left">'
182
+                . \_AM_XOOPSFAQ_CATEGORY_TITLE
183
+                . '</th>'
184
+                . '    <th>'
185
+                . \_AM_XOOPSFAQ_CONTENTS_PUBLISH
186
+                . '</th>'
187
+                . '    <th class="width20">'
188
+                . \_AM_XOOPSFAQ_ACTIONS
189
+                . '</th>'
190
+                . '  </tr>'
191
+                . '  </thead>'
192
+                . '  <tbody>';
193 193
         if ($objects['count'] > 0) {
194 194
             $tdClass = 0;
195 195
             /** @var \Contents $object */
@@ -200,39 +200,39 @@  discard block
 block discarded – undo
200 200
                 ++$tdClass;
201 201
                 $dispClass = ($tdClass % 1) ? 'even' : 'odd';
202 202
                 $ret       .= '  <tr class="center middle">'
203
-                              . '    <td class="'
204
-                              . $dispClass
205
-                              . '">'
206
-                              . $object->getVar('contents_id')
207
-                              . '</td>'
208
-                              . '    <td class="'
209
-                              . $dispClass
210
-                              . '">'
211
-                              . $object->getActiveIcon()
212
-                              . '</td>'
213
-                              . '    <td class="'
214
-                              . $dispClass
215
-                              . '">'
216
-                              . $object->getVar('contents_weight')
217
-                              . '</td>'
218
-                              . '    <td class="'
219
-                              . $dispClass
220
-                              . ' left">'
221
-                              . $thisContentTitle
222
-                              . '</td>'
223
-                              . '    <td class="'
224
-                              . $dispClass
225
-                              . ' left">'
226
-                              . $thisCatTitle
227
-                              . '</td>'
228
-                              . '    <td class="'
229
-                              . $dispClass
230
-                              . '">'
231
-                              . $object->getPublished(_SHORTDATESTRING)
232
-                              . '</td>'
233
-                              . '    <td class="'
234
-                              . $dispClass
235
-                              . '">';
203
+                                . '    <td class="'
204
+                                . $dispClass
205
+                                . '">'
206
+                                . $object->getVar('contents_id')
207
+                                . '</td>'
208
+                                . '    <td class="'
209
+                                . $dispClass
210
+                                . '">'
211
+                                . $object->getActiveIcon()
212
+                                . '</td>'
213
+                                . '    <td class="'
214
+                                . $dispClass
215
+                                . '">'
216
+                                . $object->getVar('contents_weight')
217
+                                . '</td>'
218
+                                . '    <td class="'
219
+                                . $dispClass
220
+                                . ' left">'
221
+                                . $thisContentTitle
222
+                                . '</td>'
223
+                                . '    <td class="'
224
+                                . $dispClass
225
+                                . ' left">'
226
+                                . $thisCatTitle
227
+                                . '</td>'
228
+                                . '    <td class="'
229
+                                . $dispClass
230
+                                . '">'
231
+                                . $object->getPublished(_SHORTDATESTRING)
232
+                                . '</td>'
233
+                                . '    <td class="'
234
+                                . $dispClass
235
+                                . '">';
236 236
                 $ret       .= Utility::renderIconLinks($buttons, 'contents_id', $object->getVar('contents_id')) . '</td>' . '  </tr>';
237 237
             }
238 238
         } else {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
                 $thisContentTitle = '<a href="' . $helper->url('index.php?cat_id=' . $thisCatId . '#q' . $object->getVar('contents_id')) . '" title="' . \_AM_XOOPSFAQ_CONTENTS_VIEW . '">' . $object->getVar('contents_title') . '</a>';
200 200
                 ++$tdClass;
201 201
                 $dispClass = ($tdClass % 1) ? 'even' : 'odd';
202
-                $ret       .= '  <tr class="center middle">'
202
+                $ret .= '  <tr class="center middle">'
203 203
                               . '    <td class="'
204 204
                               . $dispClass
205 205
                               . '">'
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
                               . '    <td class="'
234 234
                               . $dispClass
235 235
                               . '">';
236
-                $ret       .= Utility::renderIconLinks($buttons, 'contents_id', $object->getVar('contents_id')) . '</td>' . '  </tr>';
236
+                $ret .= Utility::renderIconLinks($buttons, 'contents_id', $object->getVar('contents_id')) . '</td>' . '  </tr>';
237 237
             }
238 238
         } else {
239 239
             $ret .= '  <tr class="center"><td colspan="7" class="even">' . \_AM_XOOPSFAQ_NOLISTING . '</td></tr>';
Please login to merge, or discard this patch.