Passed
Pull Request — master (#145)
by Goffy
04:27
created
class/Utility.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,11 +56,11 @@  discard block
 block discarded – undo
56 56
     {
57 57
         if ($considerHtml) {
58 58
             // if the plain text is shorter than the maximum length, return the whole text
59
-            if (mb_strlen(preg_replace('/<.*?' . '>/', '', $text)) <= $length) {
59
+            if (mb_strlen(preg_replace('/<.*?'.'>/', '', $text)) <= $length) {
60 60
                 return $text;
61 61
             }
62 62
             // splits all html-tags to scanable lines
63
-            preg_match_all('/(<.+?' . '>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER);
63
+            preg_match_all('/(<.+?'.'>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER);
64 64
             $total_length = mb_strlen($ending);
65 65
             $open_tags    = [];
66 66
             $truncate     = '';
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                             unset($open_tags[$pos]);
79 79
                         }
80 80
                         // if tag is an opening tag
81
-                    } elseif (preg_match('/^<\s*([^\s>!]+).*?' . '>$/s', $line_matchings[1], $tag_matchings)) {
81
+                    } elseif (preg_match('/^<\s*([^\s>!]+).*?'.'>$/s', $line_matchings[1], $tag_matchings)) {
82 82
                         // add tag to the beginning of $open_tags list
83 83
                         array_unshift($open_tags, mb_strtolower($tag_matchings[1]));
84 84
                     }
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         if ($considerHtml) {
137 137
             // close all unclosed html-tags
138 138
             foreach ($open_tags as $tag) {
139
-                $truncate .= '</' . $tag . '>';
139
+                $truncate .= '</'.$tag.'>';
140 140
             }
141 141
         }
142 142
 
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 //--></script>
210 210
 <!-- End Form Validation JavaScript //-->',
211 211
         ];
212
-        $paypalform   = [
212
+        $paypalform = [
213 213
             0 => '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">',
214 214
             1 => '<input name="cmd" value="_s-xclick" type="hidden">',
215 215
             2 => '<input name="hosted_button_id" value="%s" type="hidden">',
@@ -222,11 +222,11 @@  discard block
 block discarded – undo
222 222
                 case 2:
223 223
                     $donationform[$key] = sprintf(
224 224
                         $donationform[$key],
225
-                        $GLOBALS['xoopsConfig']['sitename'] . ' - ' . ('' != $GLOBALS['xoopsUser']->getVar('name') ? $GLOBALS['xoopsUser']->getVar('name') . ' [' . $GLOBALS['xoopsUser']->getVar('uname') . ']' : $GLOBALS['xoopsUser']->getVar('uname')),
225
+                        $GLOBALS['xoopsConfig']['sitename'].' - '.('' != $GLOBALS['xoopsUser']->getVar('name') ? $GLOBALS['xoopsUser']->getVar('name').' ['.$GLOBALS['xoopsUser']->getVar('uname').']' : $GLOBALS['xoopsUser']->getVar('uname')),
226 226
                         $GLOBALS['xoopsUser']->getVar('email'),
227 227
                         XOOPS_LICENSE_KEY,
228 228
                         mb_strtoupper($GLOBALS['xoopsModule']->getVar('dirname')),
229
-                        mb_strtoupper($GLOBALS['xoopsModule']->getVar('dirname')) . ' ' . $GLOBALS['xoopsModule']->getVar('name')
229
+                        mb_strtoupper($GLOBALS['xoopsModule']->getVar('dirname')).' '.$GLOBALS['xoopsModule']->getVar('name')
230 230
                     );
231 231
                     break;
232 232
             }
Please login to merge, or discard this patch.
class/autoload.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,15 +37,15 @@
 block discarded – undo
37 37
      */
38 38
     function application_autoloader($class)
39 39
     {
40
-        $classFilename = $class . '.php';
41
-        $cachePath     = XOOPS_VAR_PATH . '/caches/tdmcreate_cache';
40
+        $classFilename = $class.'.php';
41
+        $cachePath     = XOOPS_VAR_PATH.'/caches/tdmcreate_cache';
42 42
         if (!is_dir($cachePath)) {
43 43
             if (!mkdir($cachePath, 0777) && !is_dir($cachePath)) {
44 44
                 throw new \RuntimeException(sprintf('Directory "%s" was not created', $cachePath));
45 45
             }
46 46
             chmod($cachePath, 0777);
47 47
         }
48
-        $pathCache = file_exists($cacheFile = $cachePath . '/classpaths.cache') ? unserialize(file_get_contents($cacheFile)) : [];
48
+        $pathCache = file_exists($cacheFile = $cachePath.'/classpaths.cache') ? unserialize(file_get_contents($cacheFile)) : [];
49 49
         if (!is_array($pathCache)) {
50 50
             $pathCache = [];
51 51
         }
Please login to merge, or discard this patch.
class/Files/Assets/Css/Admin/CssAdminStyles.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
         $filename      = $this->getFileName();
78 78
         $moduleDirname = $module->getVar('mod_dirname');
79 79
         $content       = $this->getHeaderFilesComments($module, $filename, '@charset "UTF-8";');
80
-        $content       .= <<<'EOT'
80
+        $content .= <<<'EOT'
81 81
 img {
82 82
 	max-width: 200px;
83 83
 }
Please login to merge, or discard this patch.
class/Files/Assets/Css/CssStyles.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
         $filename      = $this->getFileName();
78 78
         $moduleDirname = $module->getVar('mod_dirname');
79 79
         $content       = $this->getHeaderFilesComments($module, $filename, '@charset "UTF-8";');
80
-        $content       .= <<<EOT
80
+        $content .= <<<EOT
81 81
 ul.menu {
82 82
 	list-style: none;
83 83
 	background-color: #f5f5f5;
Please login to merge, or discard this patch.
class/Files/Assets/Js/JavascriptJQuery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@
 block discarded – undo
178 178
         $moduleDirname = $module->getVar('mod_dirname');
179 179
         $content       = $this->getHeaderFilesComments($module, $filename);
180 180
         $content       = $this->getJavascriptJQueryButtons();
181
-        $content       .= $this->getJavascriptJQueryPrint();
181
+        $content .= $this->getJavascriptJQueryPrint();
182 182
 
183 183
         $this->create($moduleDirname, 'assets/js', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
184 184
 
Please login to merge, or discard this patch.
class/Files/Assets/Js/JsJquery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
         $filename      = $this->getFileName();
81 81
         $moduleDirname = $module->getVar('mod_dirname');
82 82
         $content       = $this->getHeaderFilesComments($module, $filename, 0);
83
-        $content       .= <<<'EOT'
83
+        $content .= <<<'EOT'
84 84
 $(document).ready(function(){
85 85
     $( "button, input:button, input:submit, input:file, input:reset" ).css("color","inherit").button();
86 86
     $( ".check" ).css("color","#fff").button();
Please login to merge, or discard this patch.
class/Files/Sql/SqlFile.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
             $tableName          = $tables[$t]->getVar('table_name');
149 149
             $tableAutoincrement = $tables[$t]->getVar('table_autoincrement');
150 150
             $fieldsNumb         = $tables[$t]->getVar('table_nbfields');
151
-            $ret                .= $this->getDatabaseFields($moduleDirname, $tableMid, $tableId, $tableName, $tableAutoincrement, $fieldsNumb);
151
+            $ret .= $this->getDatabaseFields($moduleDirname, $tableMid, $tableId, $tableName, $tableAutoincrement, $fieldsNumb);
152 152
         }
153 153
 
154 154
         return $ret;
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
                     case 3:
209 209
                     case 4:
210 210
                     case 5:
211
-                        $type = $fieldTypeName . '(' . $fieldValue . ')';
211
+                        $type = $fieldTypeName.'('.$fieldValue.')';
212 212
                         if (empty($fieldDefault)) {
213 213
                             $default = "DEFAULT '0'";
214 214
                         } else {
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
                     case 6:
219 219
                     case 7:
220 220
                     case 8:
221
-                        $type = $fieldTypeName . '(' . $fieldValue . ')';
221
+                        $type = $fieldTypeName.'('.$fieldValue.')';
222 222
                         if (empty($fieldDefault)) {
223 223
                             $default = "DEFAULT '0.00'"; // From MySQL 5.7 Manual
224 224
                         } else {
@@ -228,11 +228,11 @@  discard block
 block discarded – undo
228 228
                     case 9:
229 229
                     case 10:
230 230
                         $fValues = str_replace(',', "', '", str_replace(' ', '', $fieldValue));
231
-                        $type    = $fieldTypeName . '(\'' . $fValues . '\')'; // Used with comma separator
231
+                        $type    = $fieldTypeName.'(\''.$fValues.'\')'; // Used with comma separator
232 232
                         $default = "DEFAULT '{$fieldDefault}'";
233 233
                         break;
234 234
                     case 11:
235
-                        $type = $fieldTypeName . '(' . $fieldValue . ')';
235
+                        $type = $fieldTypeName.'('.$fieldValue.')';
236 236
                         if (empty($fieldDefault)) {
237 237
                             $default = "DEFAULT '[email protected]'";
238 238
                         } else {
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
                         }
241 241
                         break;
242 242
                     case 12:
243
-                        $type = $fieldTypeName . '(' . $fieldValue . ')';
243
+                        $type = $fieldTypeName.'('.$fieldValue.')';
244 244
                         if (empty($fieldDefault)) {
245 245
                             $default = "DEFAULT 'http:\\'";
246 246
                         } else {
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
                         break;
250 250
                     case 13:
251 251
                     case 14:
252
-                        $type    = $fieldTypeName . '(' . $fieldValue . ')';
252
+                        $type    = $fieldTypeName.'('.$fieldValue.')';
253 253
                         $default = "DEFAULT '{$fieldDefault}'";
254 254
                         break;
255 255
                     case 15:
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
                     case 20:
264 264
                     case 21:
265 265
                     case 22:
266
-                        $type    = $fieldTypeName . '(' . $fieldValue . ')';
266
+                        $type    = $fieldTypeName.'('.$fieldValue.')';
267 267
                         $default = "DEFAULT '{$fieldDefault}'";
268 268
                         break;
269 269
                     case 23:
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
                         }
276 276
                         break;
277 277
                     default:
278
-                        $type    = $fieldTypeName . '(' . $fieldValue . ')';
278
+                        $type    = $fieldTypeName.'('.$fieldValue.')';
279 279
                         $default = "DEFAULT '{$fieldDefault}'";
280 280
                         break;
281 281
                 }
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
         // ================= COMMA ================= //
321 321
         for ($i = 0; $i < $j; ++$i) {
322 322
             if ($i != $j - 1) {
323
-                $row[] = $comma[$i] . ',';
323
+                $row[] = $comma[$i].',';
324 324
             } else {
325 325
                 $row[] = $comma[$i];
326 326
             }
@@ -434,9 +434,9 @@  discard block
 block discarded – undo
434 434
         // Comma issue
435 435
         for ($i = 1; $i <= $index; ++$i) {
436 436
             if ($i != $index - 1) {
437
-                $ret = $this->getComma(isset($comma[$i]), ',') . "\n";
437
+                $ret = $this->getComma(isset($comma[$i]), ',')."\n";
438 438
             } else {
439
-                $ret = $this->getComma(isset($comma[$i])) . "\n";
439
+                $ret = $this->getComma(isset($comma[$i]))."\n";
440 440
             }
441 441
         }
442 442
 
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
         $moduleName    = mb_strtolower($module->getVar('mod_name'));
458 458
         $moduleDirname = mb_strtolower($module->getVar('mod_dirname'));
459 459
         $content       = $this->getHeaderSqlComments($moduleName);
460
-        $content       .= $this->getDatabaseTables($module);
460
+        $content .= $this->getDatabaseTables($module);
461 461
 
462 462
         $this->create($moduleDirname, 'sql', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
463 463
 
Please login to merge, or discard this patch.
class/Files/User/UserSearch.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
         }
106 106
         if (1 == $table->getVar('table_category')) {
107 107
             $ccFieldPid = $this->getCamelCase($fieldPid, false, true);
108
-            $ret        .= $this->xoopscode->getXoopsCodeXoopsRequest($ccFieldPid, (string)$fieldPid, '0', 'Int');
108
+            $ret .= $this->xoopscode->getXoopsCodeXoopsRequest($ccFieldPid, (string)$fieldPid, '0', 'Int');
109 109
         }
110 110
         $ccFieldId = $this->getCamelCase($fieldId, false, true);
111 111
         $ret       .= $this->xoopscode->getXoopsCodeXoopsRequest($ccFieldId, (string)$fieldId, '0', 'Int');
Please login to merge, or discard this patch.
class/Files/User/UserXoopsCode.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     {
77 77
         $pCodeAddMeta = Tdmcreate\Files\CreatePhpCode::getInstance();
78 78
         $stuTableName = mb_strtoupper($tableName);
79
-        $stripTags    = $pCodeAddMeta->getPhpCodeStripTags('', $language . $stuTableName, true);
79
+        $stripTags    = $pCodeAddMeta->getPhpCodeStripTags('', $language.$stuTableName, true);
80 80
 
81 81
         return "{$t}\$GLOBALS['xoTheme']->addMeta( 'meta', '{$type}', {$stripTags});\n";
82 82
     }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         $stuModuleDirname = mb_strtoupper($moduleDirname);
144 144
         $ret              = $pCodeHeaderFile->getPhpCodeCommentLine('Breadcrumbs');
145 145
         $ret              .= $pCodeHeaderFile->getPhpCodeArray('xoBreadcrumbs', null, false, '');
146
-        $titleLink        = ["'title'" => $language . 'TITLE', "'link'" => "{$stuModuleDirname}_URL . '/'"];
146
+        $titleLink        = ["'title'" => $language.'TITLE', "'link'" => "{$stuModuleDirname}_URL . '/'"];
147 147
         $ret              .= $pCodeHeaderFile->getPhpCodeArray('xoBreadcrumbs[]', $titleLink, false, '');
148 148
 
149 149
         return $ret;
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     public function getUserModVersion($eleArray, $descriptions, $name = null, $index = null, $num = false, $t = '')
180 180
     {
181 181
         $ret = '';
182
-        $mv  = $t . '$modversion';
182
+        $mv  = $t.'$modversion';
183 183
         if (!is_array($descriptions)) {
184 184
             $descs = [$descriptions];
185 185
         } else {
@@ -189,13 +189,13 @@  discard block
 block discarded – undo
189 189
             $one = (null === $name) ? $key : $name;
190 190
             $two = (null === $index) ? $key : $index;
191 191
             if (1 === $eleArray) {
192
-                $ret .= $mv . "['{$one}'] = {$desc};\n";
192
+                $ret .= $mv."['{$one}'] = {$desc};\n";
193 193
             } elseif (2 === $eleArray) {
194
-                $ret .= $mv . "['{$one}'][{$two}] = {$desc};\n";
194
+                $ret .= $mv."['{$one}'][{$two}] = {$desc};\n";
195 195
             } elseif (3 === $eleArray) {
196
-                $ret .= $mv . "['{$one}'][{$two}]['{$key}'] = {$desc};\n";
196
+                $ret .= $mv."['{$one}'][{$two}]['{$key}'] = {$desc};\n";
197 197
             } elseif (4 === $eleArray) {
198
-                $ret .= $mv . "['{$one}'][{$two}][{$num}]['{$key}'] = {$desc};\n";
198
+                $ret .= $mv."['{$one}'][{$two}][{$num}]['{$key}'] = {$desc};\n";
199 199
             }
200 200
         }
201 201
 
Please login to merge, or discard this patch.