Passed
Branch master (18a203)
by Michael
02:39
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
@@ -106,16 +106,16 @@
 block discarded – undo
106 106
     $ychck = (isset($options[0]) && ($options[0] > 0)) ? ' checked' : '';
107 107
     $nchck = !empty($ychck) ? '' : ' checked';
108 108
     $form  = '<div class="line140">'
109
-             . _MB_XOOPSFAQ_SHOW_EMPTY
110
-             . '&nbsp;<label for="r0">'
111
-             . _NO
112
-             . '</label><input type="radio" name="options[0]" id="r0" value="0"'
113
-             . $nchck
114
-             . '>&nbsp;<label for="r1">'
115
-             . _YES
116
-             . '</label><input type="radio" name="options[0]" id="r1" value="1"'
117
-             . $ychck
118
-             . '></div>'
119
-             . "\n";
109
+                . _MB_XOOPSFAQ_SHOW_EMPTY
110
+                . '&nbsp;<label for="r0">'
111
+                . _NO
112
+                . '</label><input type="radio" name="options[0]" id="r0" value="0"'
113
+                . $nchck
114
+                . '>&nbsp;<label for="r1">'
115
+                . _YES
116
+                . '</label><input type="radio" name="options[0]" id="r1" value="1"'
117
+                . $ychck
118
+                . '></div>'
119
+                . "\n";
120 120
     return $form;
121 121
 }
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -111,11 +111,11 @@  discard block
 block discarded – undo
111 111
         foreach ($objects['list'] as $object) {
112 112
             // only list categories and/or FAQs if user has rights
113 113
             if (false !== $permHelper->checkPermission('viewcat', $object->getVar('category_id'))) {
114
-                $category    = [
114
+                $category = [
115 115
                     'id'   => $object->getVar('category_id'),
116 116
                     'name' => $object->getVar('category_title'),
117 117
                 ];
118
-                $bodyWords   .= ' ' . $object->getVar('category_title');
118
+                $bodyWords .= ' ' . $object->getVar('category_title');
119 119
                 $contentsObj = $contentsHandler->getPublished($object->getVar('category_id'));
120 120
                 if ($contentsObj['count']) {
121 121
                     $category['questions'] = [];
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                             'link'  => $content->getVar('contents_id'),
126 126
                             'title' => $content->getVar('contents_title'),
127 127
                         ];
128
-                        $bodyWords               .= ' ' . $content->getVar('contents_title');
128
+                        $bodyWords .= ' ' . $content->getVar('contents_title');
129 129
                     }
130 130
                 }
131 131
                 $GLOBALS['xoopsTpl']->append_by_ref('categories', $category);
Please login to merge, or discard this patch.
class/Contents.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
         $options_tray  = new \XoopsFormElementTray(_AM_XOOPSFAQ_E_CONTENTS_CONTENT, '<br>');
139 139
         if (class_exists('XoopsFormEditor')) {
140 140
             // $editorConfigs = array('editor' => $GLOBALS['xoopsConfig']['general_editor'],
141
-            $editorConfigs     = [
141
+            $editorConfigs = [
142 142
                 'editor' => $helper->getConfig('use_wysiwyg', 'dhtmltextarea'),
143 143
                 'rows'   => 25,
144 144
                 'cols'   => '100%',
Please login to merge, or discard this patch.
class/CategoryHandler.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -103,23 +103,23 @@
 block discarded – undo
103 103
         $buttons = ['edit', 'delete'];
104 104
 
105 105
         $ret = '<table class="outer width100 bnone pad3 marg5">'
106
-               . '  <thead>'
107
-               . '  <tr class="xoopsCenter">'
108
-               . '    <th class="width5">'
109
-               . _AM_XOOPSFAQ_CATEGORY_ORDER
110
-               . '</th>'
111
-               . '    <th class="width5">'
112
-               . _AM_XOOPSFAQ_CATEGORY_ID
113
-               . '</th>'
114
-               . '    <th class="txtleft">'
115
-               . _AM_XOOPSFAQ_CATEGORY_TITLE
116
-               . '</th>'
117
-               . '    <th class="width20">'
118
-               . _AM_XOOPSFAQ_ACTIONS
119
-               . '</th>'
120
-               . '  </tr>'
121
-               . '  </thead>'
122
-               . '  <tbody>';
106
+                . '  <thead>'
107
+                . '  <tr class="xoopsCenter">'
108
+                . '    <th class="width5">'
109
+                . _AM_XOOPSFAQ_CATEGORY_ORDER
110
+                . '</th>'
111
+                . '    <th class="width5">'
112
+                . _AM_XOOPSFAQ_CATEGORY_ID
113
+                . '</th>'
114
+                . '    <th class="txtleft">'
115
+                . _AM_XOOPSFAQ_CATEGORY_TITLE
116
+                . '</th>'
117
+                . '    <th class="width20">'
118
+                . _AM_XOOPSFAQ_ACTIONS
119
+                . '</th>'
120
+                . '  </tr>'
121
+                . '  </thead>'
122
+                . '  <tbody>';
123 123
         if ($objects['count'] > 0) {
124 124
             /** @var XoopsObject $object */
125 125
             foreach ($objects['list'] as $object) {
Please login to merge, or discard this patch.
class/Utility.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
                 static::rrmdir($fObj->getPathname());
171 171
             }
172 172
         }
173
-        $iterator = null;   // clear iterator Obj to close file/directory
173
+        $iterator = null; // clear iterator Obj to close file/directory
174 174
         return rmdir($src); // remove the directory & return results
175 175
     }
176 176
 
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
                 static::rmove($fObj->getPathname(), $dest . '/' . $fObj->getFilename());
210 210
             }
211 211
         }
212
-        $iterator = null;   // clear iterator Obj to close file/directory
212
+        $iterator = null; // clear iterator Obj to close file/directory
213 213
         return rmdir($src); // remove the directory & return results
214 214
     }
215 215
 
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
                 }
283 283
                 $title = constant(htmlspecialchars(mb_strtoupper('_XO_LA_' . $iconName), ENT_QUOTES | ENT_HTML5));
284 284
                 $img   = '<img src="' . \Xmf\Module\Admin::iconUrl($iconName . '.' . $iconExt, '16') . '"' . ' title ="' . $title . '"' . ' alt = "' . $title . '"' . ' class="bnone middle">';
285
-                $ret   .= '<a href="' . $url . '"' . $extra . '>' . $img . '</a>';
285
+                $ret .= '<a href="' . $url . '"' . $extra . '>' . $img . '</a>';
286 286
             }
287 287
         }
288 288
         return $ret;
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
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
                 self::rrmdir($fObj->getPathname());
205 205
             }
206 206
         }
207
-        $iterator = null;   // clear iterator Obj to close file/directory
207
+        $iterator = null; // clear iterator Obj to close file/directory
208 208
         return rmdir($src); // remove the directory & return results
209 209
     }
210 210
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
                 //                rmdir($fObj->getPath()); // now delete the directory
245 245
             }
246 246
         }
247
-        $iterator = null;   // clear iterator Obj to close file/directory
247
+        $iterator = null; // clear iterator Obj to close file/directory
248 248
         return rmdir($src); // remove the directory & return results
249 249
     }
250 250
 
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
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $html .= '<ul>';
46 46
 
47 47
         $gdlib = function_exists('gd_info') ? '<span style="color: #008000;">' . constant('CO_' . $moduleDirNameUpper . '_GDON') . '</span>' : '<span style="color: #ff0000;">' . constant('CO_' . $moduleDirNameUpper . '_GDOFF') . '</span>';
48
-        $html  .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib;
48
+        $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib;
49 49
         if (function_exists('gd_info')) {
50 50
             if (true === ($gdlib = gd_info())) {
51 51
                 $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '<b>' . $gdlib['GD Version'] . '</b>';
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         //    $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_REGISTERGLOBALS . $registerglobals;
60 60
 
61 61
         $downloads = ini_get('file_uploads') ? '<span style="color: #008000;">' . constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>' : '<span style="color: #ff0000;">' . constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>';
62
-        $html      .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads;
62
+        $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads;
63 63
 
64 64
         $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' <b><span style="color: #0000ff;">' . ini_get('upload_max_filesize') . '</span></b>';
65 65
         $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE') . ' <b><span style="color: #0000ff;">' . ini_get('post_max_size') . '</span></b>';
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
@@ -159,32 +159,32 @@  discard block
 block discarded – undo
159 159
         $buttons = ['edit', 'delete'];
160 160
 
161 161
         $ret = '<table class="outer width100 bnone pad3 marg5">'
162
-               . '  <thead>'
163
-               . '  <tr class="center">'
164
-               . '    <th class="width5">'
165
-               . _AM_XOOPSFAQ_CONTENTS_ID
166
-               . '</th>'
167
-               . '    <th class="width5">'
168
-               . _AM_XOOPSFAQ_CONTENTS_ACTIVE
169
-               . '</th>'
170
-               . '    <th class="width5">'
171
-               . _AM_XOOPSFAQ_CONTENTS_WEIGHT
172
-               . '</th>'
173
-               . '    <th class="left">'
174
-               . _AM_XOOPSFAQ_CONTENTS_TITLE
175
-               . '</th>'
176
-               . '    <th class="left">'
177
-               . _AM_XOOPSFAQ_CATEGORY_TITLE
178
-               . '</th>'
179
-               . '    <th>'
180
-               . _AM_XOOPSFAQ_CONTENTS_PUBLISH
181
-               . '</th>'
182
-               . '    <th class="width20">'
183
-               . _AM_XOOPSFAQ_ACTIONS
184
-               . '</th>'
185
-               . '  </tr>'
186
-               . '  </thead>'
187
-               . '  <tbody>';
162
+                . '  <thead>'
163
+                . '  <tr class="center">'
164
+                . '    <th class="width5">'
165
+                . _AM_XOOPSFAQ_CONTENTS_ID
166
+                . '</th>'
167
+                . '    <th class="width5">'
168
+                . _AM_XOOPSFAQ_CONTENTS_ACTIVE
169
+                . '</th>'
170
+                . '    <th class="width5">'
171
+                . _AM_XOOPSFAQ_CONTENTS_WEIGHT
172
+                . '</th>'
173
+                . '    <th class="left">'
174
+                . _AM_XOOPSFAQ_CONTENTS_TITLE
175
+                . '</th>'
176
+                . '    <th class="left">'
177
+                . _AM_XOOPSFAQ_CATEGORY_TITLE
178
+                . '</th>'
179
+                . '    <th>'
180
+                . _AM_XOOPSFAQ_CONTENTS_PUBLISH
181
+                . '</th>'
182
+                . '    <th class="width20">'
183
+                . _AM_XOOPSFAQ_ACTIONS
184
+                . '</th>'
185
+                . '  </tr>'
186
+                . '  </thead>'
187
+                . '  <tbody>';
188 188
         if ($objects['count'] > 0) {
189 189
             $tdClass = 0;
190 190
             /** @var \Contents $object */
@@ -195,39 +195,39 @@  discard block
 block discarded – undo
195 195
                 ++$tdClass;
196 196
                 $dispClass = ($tdClass % 1) ? 'even' : 'odd';
197 197
                 $ret       .= '  <tr class="center middle">'
198
-                              . '    <td class="'
199
-                              . $dispClass
200
-                              . '">'
201
-                              . $object->getVar('contents_id')
202
-                              . '</td>'
203
-                              . '    <td class="'
204
-                              . $dispClass
205
-                              . '">'
206
-                              . $object->getActiveIcon()
207
-                              . '</td>'
208
-                              . '    <td class="'
209
-                              . $dispClass
210
-                              . '">'
211
-                              . $object->getVar('contents_weight')
212
-                              . '</td>'
213
-                              . '    <td class="'
214
-                              . $dispClass
215
-                              . ' left">'
216
-                              . $thisContentTitle
217
-                              . '</td>'
218
-                              . '    <td class="'
219
-                              . $dispClass
220
-                              . ' left">'
221
-                              . $thisCatTitle
222
-                              . '</td>'
223
-                              . '    <td class="'
224
-                              . $dispClass
225
-                              . '">'
226
-                              . $object->getPublished(_SHORTDATESTRING)
227
-                              . '</td>'
228
-                              . '    <td class="'
229
-                              . $dispClass
230
-                              . '">';
198
+                                . '    <td class="'
199
+                                . $dispClass
200
+                                . '">'
201
+                                . $object->getVar('contents_id')
202
+                                . '</td>'
203
+                                . '    <td class="'
204
+                                . $dispClass
205
+                                . '">'
206
+                                . $object->getActiveIcon()
207
+                                . '</td>'
208
+                                . '    <td class="'
209
+                                . $dispClass
210
+                                . '">'
211
+                                . $object->getVar('contents_weight')
212
+                                . '</td>'
213
+                                . '    <td class="'
214
+                                . $dispClass
215
+                                . ' left">'
216
+                                . $thisContentTitle
217
+                                . '</td>'
218
+                                . '    <td class="'
219
+                                . $dispClass
220
+                                . ' left">'
221
+                                . $thisCatTitle
222
+                                . '</td>'
223
+                                . '    <td class="'
224
+                                . $dispClass
225
+                                . '">'
226
+                                . $object->getPublished(_SHORTDATESTRING)
227
+                                . '</td>'
228
+                                . '    <td class="'
229
+                                . $dispClass
230
+                                . '">';
231 231
                 $ret       .= Xoopsfaq\Utility::renderIconLinks($buttons, 'contents_id', $object->getVar('contents_id')) . '</td>' . '  </tr>';
232 232
             }
233 233
         } else {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
                 $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>';
195 195
                 ++$tdClass;
196 196
                 $dispClass = ($tdClass % 1) ? 'even' : 'odd';
197
-                $ret       .= '  <tr class="center middle">'
197
+                $ret .= '  <tr class="center middle">'
198 198
                               . '    <td class="'
199 199
                               . $dispClass
200 200
                               . '">'
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
                               . '    <td class="'
229 229
                               . $dispClass
230 230
                               . '">';
231
-                $ret       .= Xoopsfaq\Utility::renderIconLinks($buttons, 'contents_id', $object->getVar('contents_id')) . '</td>' . '  </tr>';
231
+                $ret .= Xoopsfaq\Utility::renderIconLinks($buttons, 'contents_id', $object->getVar('contents_id')) . '</td>' . '  </tr>';
232 232
             }
233 233
         } else {
234 234
             $ret .= '  <tr class="center"><td colspan="7" class="even">' . _AM_XOOPSFAQ_NOLISTING . '</td></tr>';
Please login to merge, or discard this patch.