Completed
Push — master ( df9201...fc5d0d )
by Goffy
9s
created
class/files/templates/blocks/TemplatesBlocks.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
             $fieldName    = $fields[$f]->getVar('field_name');
82 82
             $stuFieldName = strtoupper($fieldName);
83 83
             $lang         = $hc->getSmartyConst($language, $stuFieldName);
84
-            $th .= $hc->getHtmlTableHead($lang, 'center') . PHP_EOL;
84
+            $th .= $hc->getHtmlTableHead($lang, 'center').PHP_EOL;
85 85
         }
86
-        $tr = $hc->getHtmlTableRow($th, 'head') . PHP_EOL;
86
+        $tr = $hc->getHtmlTableRow($th, 'head').PHP_EOL;
87 87
 
88
-        return $hc->getHtmlTableThead($tr) . PHP_EOL;
88
+        return $hc->getHtmlTableThead($tr).PHP_EOL;
89 89
     }
90 90
 
91 91
     /**
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         $td = '';
106 106
         if (1 == $tableAutoincrement) {
107 107
             $double = $hc->getSmartyDoubleVar($tableSoleName, 'id');
108
-            $td .= $hc->getHtmlTag('td', ['class' => 'center'], $double) . PHP_EOL;
108
+            $td .= $hc->getHtmlTag('td', ['class' => 'center'], $double).PHP_EOL;
109 109
         }
110 110
         $fields = $this->getTableFields($tableMid, $tableId);
111 111
         foreach (array_keys($fields) as $f) {
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                         // Old code was <span style="background-color: #<{\$list.{$rpFieldName}}>;">...
124 124
                         $double = $hc->getSmartyDoubleVar($tableSoleName, $rpFieldName);
125 125
                         $span   = $hc->getHtmlTag('span', [], $double);
126
-                        $td .= $hc->getHtmlTag('td', ['class' => 'center'], $span) . PHP_EOL;
126
+                        $td .= $hc->getHtmlTag('td', ['class' => 'center'], $span).PHP_EOL;
127 127
                         /*$ret .= <<<EOT
128 128
                     <td class="center"><span style="background-color: #<{\$list.{$rpFieldName}}>;">&nbsp;&nbsp;&nbsp;&nbsp;</span></td>\n
129 129
 EOT;*/
@@ -132,18 +132,18 @@  discard block
 block discarded – undo
132 132
                         $src = $hc->getSmartyNoSimbol('xoModuleIcons32');
133 133
                         $src .= $hc->getSmartyDoubleVar($tableSoleName, $rpFieldName);
134 134
                         $img = $hc->getHtmlTag('img', ['src' => $src, 'alt' => $tableName], '', false);
135
-                        $td .= $hc->getHtmlTag('td', ['class' => 'center'], $img) . PHP_EOL;
135
+                        $td .= $hc->getHtmlTag('td', ['class' => 'center'], $img).PHP_EOL;
136 136
                         break;
137 137
                     case 13:
138
-                        $single = $hc->getSmartySingleVar($moduleDirname . '_upload_url');
138
+                        $single = $hc->getSmartySingleVar($moduleDirname.'_upload_url');
139 139
                         $double = $hc->getSmartyDoubleVar($tableSoleName, $rpFieldName);
140
-                        $img    = $hc->getHtmlTag('img', ['src' => $single . "/images/{$tableName}/" . $double, 'alt' => $tableName], '', false);
141
-                        $td .= $hc->getHtmlTag('td', ['class' => 'center'], $img) . PHP_EOL;
140
+                        $img    = $hc->getHtmlTag('img', ['src' => $single."/images/{$tableName}/".$double, 'alt' => $tableName], '', false);
141
+                        $td .= $hc->getHtmlTag('td', ['class' => 'center'], $img).PHP_EOL;
142 142
                         break;
143 143
                     default:
144 144
                         if (0 != $f) {
145 145
                             $double = $hc->getSmartyDoubleVar($tableSoleName, $rpFieldName);
146
-                            $td .= $hc->getHtmlTag('td', ['class' => 'center'], $double) . PHP_EOL;
146
+                            $td .= $hc->getHtmlTag('td', ['class' => 'center'], $double).PHP_EOL;
147 147
                         }
148 148
                         break;
149 149
                 }
@@ -153,19 +153,19 @@  discard block
 block discarded – undo
153 153
         $double = $hc->getSmartyDoubleVar($tableSoleName, 'id');
154 154
         $src    = $hc->getSmartyNoSimbol('xoModuleIcons32 edit.png');
155 155
         $img    = $hc->getHtmlTag('img', ['src' => $src, 'alt' => $tableName], '', false);
156
-        $anchor = $hc->getHtmlTag('a', ['href' => $tableName . ".php?op=edit&amp;{$fieldId}=" . $double, 'title' => $lang], $img) . PHP_EOL;
156
+        $anchor = $hc->getHtmlTag('a', ['href' => $tableName.".php?op=edit&amp;{$fieldId}=".$double, 'title' => $lang], $img).PHP_EOL;
157 157
         $lang   = $hc->getSmartyConst('', '_DELETE');
158 158
         $double = $hc->getSmartyDoubleVar($tableSoleName, 'id');
159 159
         $src    = $hc->getSmartyNoSimbol('xoModuleIcons32 delete.png');
160
-        $img    = $hc->getHtmlTag('img', ['src' => $src . $double, 'alt' => $tableName], '', false);
161
-        $anchor .= $hc->getHtmlTag('a', ['href' => $tableName . ".php?op=delete&amp;{$fieldId}=" . $double, 'title' => $lang], $img) . PHP_EOL;
162
-        $td .= $hc->getHtmlTag('td', ['class' => 'center'], "\n" . $anchor) . PHP_EOL;
160
+        $img    = $hc->getHtmlTag('img', ['src' => $src.$double, 'alt' => $tableName], '', false);
161
+        $anchor .= $hc->getHtmlTag('a', ['href' => $tableName.".php?op=delete&amp;{$fieldId}=".$double, 'title' => $lang], $img).PHP_EOL;
162
+        $td .= $hc->getHtmlTag('td', ['class' => 'center'], "\n".$anchor).PHP_EOL;
163 163
         $cycle   = $hc->getSmartyNoSimbol('cycle values="odd, even"');
164
-        $tr      = $hc->getHtmlTag('tr', ['class' => $cycle], $td) . PHP_EOL;
165
-        $foreach = $hc->getSmartyForeach($tableSoleName, $tableName . '_list', $tr) . PHP_EOL;
166
-        $tbody   = $hc->getHtmlTag('tbody', [], $foreach) . PHP_EOL;
164
+        $tr      = $hc->getHtmlTag('tr', ['class' => $cycle], $td).PHP_EOL;
165
+        $foreach = $hc->getSmartyForeach($tableSoleName, $tableName.'_list', $tr).PHP_EOL;
166
+        $tbody   = $hc->getHtmlTag('tbody', [], $foreach).PHP_EOL;
167 167
 
168
-        return $hc->getSmartyConditions($tableName . '_count', '', '', $tbody) . PHP_EOL;
168
+        return $hc->getSmartyConditions($tableName.'_count', '', '', $tbody).PHP_EOL;
169 169
     }
170 170
 
171 171
     /**
@@ -175,10 +175,10 @@  discard block
 block discarded – undo
175 175
     private function getTemplatesBlocksTableTfoot()
176 176
     {
177 177
         $hc = TDMCreateHtmlSmartyCodes::getInstance();
178
-        $td = $hc->getHtmlTag('td', [], '&nbsp;') . PHP_EOL;
179
-        $tr = $hc->getHtmlTag('tr', [], $td) . PHP_EOL;
178
+        $td = $hc->getHtmlTag('td', [], '&nbsp;').PHP_EOL;
179
+        $tr = $hc->getHtmlTag('tr', [], $td).PHP_EOL;
180 180
 
181
-        return $hc->getHtmlTag('tfoot', [], $tr) . PHP_EOL;
181
+        return $hc->getHtmlTag('tfoot', [], $tr).PHP_EOL;
182 182
     }
183 183
 
184 184
     /**
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
         $tbody .= $this->getTemplatesBlocksTableTfoot();
201 201
         $single = $hc->getSmartySingleVar('table_type');
202 202
 
203
-        return $hc->getHtmlTable($tbody, 'table table-' . $single) . PHP_EOL;
203
+        return $hc->getHtmlTable($tbody, 'table table-'.$single).PHP_EOL;
204 204
     }
205 205
 
206 206
     /**
Please login to merge, or discard this patch.
class/files/TDMCreateArchitecture.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
             $this->makeDirAndCopyFile('blocks', $indexFile, 'index.html');
96 96
         }
97 97
         $language = ('english' !== $GLOBALS['xoopsConfig']['language']) ? $GLOBALS['xoopsConfig']['language'] : 'english';
98
-        $copyFiles = ['class' => $indexFile, 'include' => $indexFile, 'language' => $indexFile, 'assets' => $indexFile, 'assets/css' => $indexFile, 'assets/css/admin' => $indexFile, 'assets/icons' => $indexFile, 'assets/icons/16' => $indexFile, 'assets/icons/32' => $indexFile, 'docs' => $indexFile, 'assets/images' => $indexFile, 'assets/js' => $indexFile, 'language/' . $language => $indexFile, 'language/' . $language . '/help' => $indexFile, 'preloads' => $indexFile];
98
+        $copyFiles = ['class' => $indexFile, 'include' => $indexFile, 'language' => $indexFile, 'assets' => $indexFile, 'assets/css' => $indexFile, 'assets/css/admin' => $indexFile, 'assets/icons' => $indexFile, 'assets/icons/16' => $indexFile, 'assets/icons/32' => $indexFile, 'docs' => $indexFile, 'assets/images' => $indexFile, 'assets/js' => $indexFile, 'language/'.$language => $indexFile, 'language/'.$language.'/help' => $indexFile, 'preloads' => $indexFile];
99 99
         foreach ($copyFiles as $k => $v) {
100 100
             // Creation of folders and index.html file
101 101
             $this->makeDirAndCopyFile($k, $v, 'index.html');
Please login to merge, or discard this patch.
class/files/TDMCreateFile.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
         if (strrpos($path, '\\')) {
236 236
             $str = strrpos($path, '\\');
237 237
             if (false !== $str) {
238
-                return substr($path, $str + 1, strlen($path));
238
+                return substr($path, $str+1, strlen($path));
239 239
             } else {
240 240
                 return substr($path, $str, strlen($path));
241 241
             }
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
         if (strpos($string, '_')) {
344 344
             $str = strpos($string, '_');
345 345
             if (false !== $str) {
346
-                $ret = substr($string, $str + 1, strlen($string));
346
+                $ret = substr($string, $str+1, strlen($string));
347 347
 
348 348
                 return $ret;
349 349
             }
Please login to merge, or discard this patch.
class/files/sql/SqlFile.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
         }
309 309
         // ================= COMMA ================= //
310 310
         for ($i = 0; $i < $j; ++$i) {
311
-            if ($i != $j - 1) {
311
+            if ($i != $j-1) {
312 312
                 $row[] = $comma[$i].',';
313 313
             } else {
314 314
                 $row[] = $comma[$i];
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
         $ret = null;
423 423
         // Comma issue
424 424
         for ($i = 1; $i <= $index; ++$i) {
425
-            if ($i != $index - 1) {
425
+            if ($i != $index-1) {
426 426
                 $ret = $this->getComma(isset($comma[$i]), ',')."\n";
427 427
             } else {
428 428
                 $ret = $this->getComma(isset($comma[$i]))."\n";
Please login to merge, or discard this patch.
class/files/user/UserRss.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
             if (strpos($fieldName, '_')) {
100 100
                 $str = strpos($fieldName, '_');
101 101
                 if (false !== $str) {
102
-                    $rpFieldName = substr($fieldName, $str + 1, strlen($fieldName));
102
+                    $rpFieldName = substr($fieldName, $str+1, strlen($fieldName));
103 103
                 }
104 104
             }
105 105
             $lpFieldName = substr($fieldName, 0, strpos($fieldName, '_'));
Please login to merge, or discard this patch.
class/files/user/UserPrint.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
             if (strpos($fieldName, '_')) {
101 101
                 $str = strpos($fieldName, '_');
102 102
                 if (false !== $str) {
103
-                    $rpFieldName = substr($fieldName, $str + 1, strlen($fieldName));
103
+                    $rpFieldName = substr($fieldName, $str+1, strlen($fieldName));
104 104
                 }
105 105
             }
106 106
             if ((0 == $f) && (1 == $this->table->getVar('table_autoincrement'))) {
Please login to merge, or discard this patch.
class/files/user/UserXoopsCode.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
         $stuModuleDirname = strtoupper($moduleDirname);
139 139
         $ret = $pCodeHeaderFile->getPhpCodeCommentLine('Breadcrumbs');
140 140
         $ret .= $pCodeHeaderFile->getPhpCodeArray('xoBreadcrumbs', null, false, '');
141
-        $titleLink = ["'title'" => $language . 'TITLE', "'link'" => "{$stuModuleDirname}_URL . '/'"];
141
+        $titleLink = ["'title'" => $language.'TITLE', "'link'" => "{$stuModuleDirname}_URL . '/'"];
142 142
         $ret .= $pCodeHeaderFile->getPhpCodeArray('xoBreadcrumbs[]', $titleLink, false, '');
143 143
 
144 144
         return $ret;
Please login to merge, or discard this patch.
class/files/TDMCreatePhpCode.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
     */
707 707
     public function getPhpCodeHtmlentities($entitiesVar, $entitiesQuote = false)
708 708
     {
709
-        $entitiesVar = (false !== $entitiesQuote) ? $entitiesVar . ', ' . $entitiesQuote : $entitiesVar;
709
+        $entitiesVar = (false !== $entitiesQuote) ? $entitiesVar.', '.$entitiesQuote : $entitiesVar;
710 710
         $entities = "htmlentities({$entitiesVar})";
711 711
 
712 712
         return $entities;
@@ -720,7 +720,7 @@  discard block
 block discarded – undo
720 720
     */
721 721
     public function getPhpCodeHtmlspecialchars($specialVar, $specialQuote = false)
722 722
     {
723
-        $specialVar = (false !== $specialQuote) ? $specialVar . ', ' . $specialQuote : $specialVar;
723
+        $specialVar = (false !== $specialQuote) ? $specialVar.', '.$specialQuote : $specialVar;
724 724
         $specialchars = "htmlspecialchars({$specialVar})";
725 725
 
726 726
         return $specialchars;
Please login to merge, or discard this patch.
class/files/classes/ClassXoopsCode.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,8 +71,8 @@
 block discarded – undo
71 71
      */
72 72
     public function getClassCriteria($var, $param1, $param2 = '', $param3 = '', $isParam = false, $t = '')
73 73
     {
74
-        $params = ('' != $param2) ? ', ' . $param2 : '';
75
-        $params .= ('' != $param3) ? ', ' . $param3 : '';
74
+        $params = ('' != $param2) ? ', '.$param2 : '';
75
+        $params .= ('' != $param3) ? ', '.$param3 : '';
76 76
 
77 77
         if (false === $isParam) {
78 78
             $ret = "{$t}\${$var} = new Criteria( {$param1}{$params} );\n";
Please login to merge, or discard this patch.