Passed
Push — master ( 123922...c30da6 )
by Goffy
09:11 queued 04:26
created
class/Files/User/UserHeader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         if (is_array($tables)) {
97 97
             foreach (array_keys($tables) as $i) {
98 98
                 $tableName = $tables[$i]->getVar('table_name');
99
-                $ret       .= $xc->getXcHandlerLine($tableName);
99
+                $ret .= $xc->getXcHandlerLine($tableName);
100 100
             }
101 101
         }
102 102
         $ret .= $pc->getPhpCodeCommentLine('Permission');
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         $moduleDirname = $module->getVar('mod_dirname');
137 137
         $filename      = $this->getFileName();
138 138
         $content       = $this->getHeaderFilesComments($module);
139
-        $content       .= $this->getUserHeader($moduleDirname);
139
+        $content .= $this->getUserHeader($moduleDirname);
140 140
 
141 141
         $this->create($moduleDirname, '/', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
142 142
 
Please login to merge, or discard this patch.
class/Files/User/UserPages.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -121,21 +121,21 @@  discard block
 block discarded – undo
121 121
         $ret       .= $xc->getXcXoopsTplAssign('xoops_icons32_url', 'XOOPS_ICONS32_URL');
122 122
         $ret       .= $xc->getXcXoopsTplAssign("{$moduleDirname}_url", "{$stuModuleDirname}_URL");
123 123
         $ret       .= $pc->getPhpCodeBlankLine();
124
-		$critName  = 'cr' . $ucfTableName;
124
+		$critName = 'cr'.$ucfTableName;
125 125
         $ret       .= $xc->getXcCriteriaCompo($critName);
126
-        $crit      = $xc->getXcCriteria('', "'{$fieldId}'", "\${$ccFieldId}",'',true);
126
+        $crit      = $xc->getXcCriteria('', "'{$fieldId}'", "\${$ccFieldId}", '', true);
127 127
         $contIf    = $xc->getXcCriteriaAdd($critName, $crit, "\t");
128 128
         $ret       .= $pc->getPhpCodeConditions("\${$ccFieldId}", ' > ', '0', $contIf);
129
-        $ret       .= $xc->getXcHandlerCountClear($tableName . 'Count', $tableName, '$' . $critName);
130
-        $ret       .= $xc->getXcXoopsTplAssign($tableName . 'Count', "\${$tableName}Count");
129
+        $ret       .= $xc->getXcHandlerCountClear($tableName.'Count', $tableName, '$'.$critName);
130
+        $ret       .= $xc->getXcXoopsTplAssign($tableName.'Count', "\${$tableName}Count");
131 131
         $ret       .= $xc->getXcCriteriaSetStart($critName, '$start');
132 132
         $ret       .= $xc->getXcCriteriaSetLimit($critName, '$limit');
133
-        $ret       .= $xc->getXcHandlerAllClear($tableName . 'All', $tableName, '$' . $critName);
133
+        $ret       .= $xc->getXcHandlerAllClear($tableName.'All', $tableName, '$'.$critName);
134 134
         $ret       .= $pc->getPhpCodeArray('keywords', null, false, '');
135 135
         $condIf    = $pc->getPhpCodeArray($tableName, null, false, $t);
136 136
         $condIf    .= $pc->getPhpCodeCommentLine('Get All', $ucfTableName, $t);
137
-        $foreach   = $xc->getXcGetValues($tableName, $tableName . '[]', 'i', false, $t . "\t");
138
-        $foreach   .= $xc->getXcGetVar('keywords[]', "{$tableName}All[\$i]", $fieldMain, false, $t . "\t");
137
+        $foreach   = $xc->getXcGetValues($tableName, $tableName.'[]', 'i', false, $t."\t");
138
+        $foreach   .= $xc->getXcGetVar('keywords[]', "{$tableName}All[\$i]", $fieldMain, false, $t."\t");
139 139
         $condIf    .= $pc->getPhpCodeForeach("{$tableName}All", true, false, 'i', $foreach, $t);
140 140
         $condIf    .= $xc->getXcXoopsTplAssign($tableName, "\${$tableName}", true, $t);
141 141
         $condIf    .= $pc->getPhpCodeUnset($tableName, $t);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
                 $fieldMain = $fieldName; // fieldMain = fields parameters main field
211 211
             }
212 212
         }
213
-        $content       = $this->getHeaderFilesComments($module);
213
+        $content = $this->getHeaderFilesComments($module);
214 214
         $content       .= $this->getUserPagesHeader($moduleDirname, $tableName, $fieldId);
215 215
         $content       .= $this->getUserPages($moduleDirname, $tableName, $fieldId, $fieldMain);
216 216
         $content       .= $this->getUserPagesFooter($moduleDirname, $tableName, $language);
Please login to merge, or discard this patch.
class/Files/User/UserSubmit.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $ret .= $xc->getXcEqualsOperator('$navigation', "{$language}SUBMIT_PROPOSER", '', $t);
121 121
         $ret .= $xc->getXcXoopsTplAssign('navigation', '$navigation', true, $t);
122 122
         $ret .= $pc->getPhpCodeCommentLine('Title of page', null, $t);
123
-        $ret .= $xc->getXcEqualsOperator('$title', "{$language}SUBMIT_PROPOSER . ' - '", '', $t );
123
+        $ret .= $xc->getXcEqualsOperator('$title', "{$language}SUBMIT_PROPOSER . ' - '", '', $t);
124 124
         $ret .= $xc->getXcEqualsOperator('$title', "\$GLOBALS['xoopsModule']->name()", '.', $t);
125 125
         $ret .= $xc->getXcXoopsTplAssign('xoops_pagetitle', '$title', true, $t);
126 126
         $ret .= $pc->getPhpCodeCommentLine('Description', null, $t);
@@ -153,14 +153,14 @@  discard block
 block discarded – undo
153 153
         $xoopsSecurityCheck = $xc->getXcXoopsSecurityCheck();
154 154
         $securityError      = $xc->getXcXoopsSecurityErrors();
155 155
         $implode            = $pc->getPhpCodeImplode(',', $securityError);
156
-        $redirectError      = $xc->getXcRedirectHeader($tableName, '', '3', $implode, true, $t . "\t");
157
-        $ret                .= $pc->getPhpCodeConditions('!' . $xoopsSecurityCheck, '', '', $redirectError, false, $t);
156
+        $redirectError      = $xc->getXcRedirectHeader($tableName, '', '3', $implode, true, $t."\t");
157
+        $ret                .= $pc->getPhpCodeConditions('!'.$xoopsSecurityCheck, '', '', $redirectError, false, $t);
158 158
         $ret                .= $xc->getXcHandlerCreateObj($tableName, $t);
159 159
         if (in_array(1, $tableSubmit)) {
160 160
             $ret .= $xc->getXcSaveElements($moduleDirname, $tableName, $tableSoleName, $fields, $t);
161 161
         }
162
-        $ret       .= $pc->getPhpCodeCommentLine('Insert Data', null, $t);
163
-        $insert    = $xc->getXcHandlerInsert($tableName, $tableName, 'Obj', 'Handler');
162
+        $ret .= $pc->getPhpCodeCommentLine('Insert Data', null, $t);
163
+        $insert = $xc->getXcHandlerInsert($tableName, $tableName, 'Obj', 'Handler');
164 164
         $countUploader = 0;
165 165
         $fieldId          = '';
166 166
         $ccFieldId        = '';
@@ -178,21 +178,21 @@  discard block
 block discarded – undo
178 178
         if (1 == $tablePermissions) {
179 179
             $ucfTableName  = ucfirst($tableName);
180 180
             $ucfFieldId    = $this->getCamelCase($fieldId, true);
181
-            $contentInsert .= $xc->getXcEqualsOperator("\$new{$ucfFieldId}", "\${$tableName}Obj->getNewInsertedId{$ucfTableName}()", null, $t . "\t");
182
-            $contentInsert .= $pc->getPhpCodeTernaryOperator('permId', "isset(\$_REQUEST['{$fieldId}'])", "\${$ccFieldId}", "\$new{$ucfFieldId}", $t . "\t");
183
-            $contentInsert .= $xc->getXcXoopsHandler('groupperm', $t . "\t");
184
-            $contentInsert .= $xc->getXcEqualsOperator('$mid', "\$GLOBALS['xoopsModule']->getVar('mid')", null, $t . "\t");
185
-            $contentInsert .= $this->getPermissionsSave($moduleDirname, 'view_' . $tableName);
186
-            $contentInsert .= $this->getPermissionsSave($moduleDirname, 'submit_' . $tableName);
187
-            $contentInsert .= $this->getPermissionsSave($moduleDirname, 'approve_' . $tableName);
181
+            $contentInsert .= $xc->getXcEqualsOperator("\$new{$ucfFieldId}", "\${$tableName}Obj->getNewInsertedId{$ucfTableName}()", null, $t."\t");
182
+            $contentInsert .= $pc->getPhpCodeTernaryOperator('permId', "isset(\$_REQUEST['{$fieldId}'])", "\${$ccFieldId}", "\$new{$ucfFieldId}", $t."\t");
183
+            $contentInsert .= $xc->getXcXoopsHandler('groupperm', $t."\t");
184
+            $contentInsert .= $xc->getXcEqualsOperator('$mid', "\$GLOBALS['xoopsModule']->getVar('mid')", null, $t."\t");
185
+            $contentInsert .= $this->getPermissionsSave($moduleDirname, 'view_'.$tableName);
186
+            $contentInsert .= $this->getPermissionsSave($moduleDirname, 'submit_'.$tableName);
187
+            $contentInsert .= $this->getPermissionsSave($moduleDirname, 'approve_'.$tableName);
188 188
         }
189 189
 
190 190
         if ($countUploader > 0) {
191
-            $errIf     = $xc->getXcRedirectHeader("'{$tableName}.php?op=edit&{$fieldId}=' . \${$ccFieldId}", '', '5', '$uploaderErrors', false, $t . "\t\t");
192
-            $errElse   = $xc->getXcRedirectHeader($tableName, '?op=list', '2', "{$language}FORM_OK", true, $t . "\t\t");
193
-            $confirmOk = $pc->getPhpCodeConditions("''", ' !== ', '$uploaderErrors', $errIf, $errElse, $t . "\t");
191
+            $errIf     = $xc->getXcRedirectHeader("'{$tableName}.php?op=edit&{$fieldId}=' . \${$ccFieldId}", '', '5', '$uploaderErrors', false, $t."\t\t");
192
+            $errElse   = $xc->getXcRedirectHeader($tableName, '?op=list', '2', "{$language}FORM_OK", true, $t."\t\t");
193
+            $confirmOk = $pc->getPhpCodeConditions("''", ' !== ', '$uploaderErrors', $errIf, $errElse, $t."\t");
194 194
         } else {
195
-            $confirmOk = $xc->getXcRedirectHeader('index', '', '2', "{$language}FORM_OK", true, $t . "\t");
195
+            $confirmOk = $xc->getXcRedirectHeader('index', '', '2', "{$language}FORM_OK", true, $t."\t");
196 196
         }
197 197
         $contentInsert .= $confirmOk;
198 198
         $ret .= $pc->getPhpCodeConditions($insert, '', '', $contentInsert, false, $t);
@@ -239,8 +239,8 @@  discard block
 block discarded – undo
239 239
         $xc     = Tdmcreate\Files\CreateXoopsCode::getInstance();
240 240
         $fields = $this->getTableFields($tableMid, $tableId);
241 241
         $cases  = [
242
-            'form' => [$this->getUserSubmitForm($tableName, $language, $t . "\t")],
243
-            'save' => [$this->getUserSubmitSave($moduleDirname, $fields, $tableName, $tableSoleName, $tableSubmit, $tablePermissions, $language, $t . "\t")],
242
+            'form' => [$this->getUserSubmitForm($tableName, $language, $t."\t")],
243
+            'save' => [$this->getUserSubmitSave($moduleDirname, $fields, $tableName, $tableSoleName, $tableSubmit, $tablePermissions, $language, $t."\t")],
244 244
         ];
245 245
 
246 246
         return $xc->getXcSwitch('op', $cases, true, false);
Please login to merge, or discard this patch.
class/Files/User/UserListTag.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
         $filename      = $this->getFileName();
97 97
         $moduleDirname = $module->getVar('mod_dirname');
98 98
         $content       = $this->getHeaderFilesComments($module);
99
-        $content       .= $this->getUserListTag();
99
+        $content .= $this->getUserListTag();
100 100
 
101 101
         $this->create($moduleDirname, '/', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
102 102
 
Please login to merge, or discard this patch.
class/Files/User/UserFooter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
         $moduleDirname = $module->getVar('mod_dirname');
104 104
         $filename      = $this->getFileName();
105 105
         $content       = $this->getHeaderFilesComments($module);
106
-        $content       .= $this->getUserFooter($moduleDirname);
106
+        $content .= $this->getUserFooter($moduleDirname);
107 107
 
108 108
         $this->create($moduleDirname, '/', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
109 109
 
Please login to merge, or discard this patch.
class/Files/User/UserViewTag.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
         $filename      = $this->getFileName();
97 97
         $moduleDirname = $module->getVar('mod_dirname');
98 98
         $content       = $this->getHeaderFilesComments($module);
99
-        $content       .= $this->getUserViewTag();
99
+        $content .= $this->getUserViewTag();
100 100
 
101 101
         $this->create($moduleDirname, '/', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
102 102
 
Please login to merge, or discard this patch.
class/Files/User/UserPrint.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
     public function __construct()
54 54
     {
55 55
         parent::__construct();
56
-        $this->xc      = Tdmcreate\Files\CreateXoopsCode::getInstance();
56
+        $this->xc = Tdmcreate\Files\CreateXoopsCode::getInstance();
57 57
         $this->pc = Tdmcreate\Files\CreatePhpCode::getInstance();
58
-        $this->uxc      = UserXoopsCode::getInstance();
58
+        $this->uxc = UserXoopsCode::getInstance();
59 59
     }
60 60
 
61 61
     /**
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             $redirectHeader .= $this->getSimpleString('exit();');
152 152
             $ret            .= $this->pc->getPhpCodeConditions("\${$tableName}Handler->getVar('{$fieldName}') != 0 && \${$tableName}Handler->getVar('{$fieldName}') < time()", '', '', $redirectHeader);
153 153
         }
154
-        $ret            .= $this->xc->getXcHandlerGet($tableName, $ccFieldId, '', $tableName . 'Handler',false);
154
+        $ret            .= $this->xc->getXcHandlerGet($tableName, $ccFieldId, '', $tableName.'Handler', false);
155 155
         $gperm          = $this->xc->getXcCheckRight('!$grouppermHandler', "{$moduleDirname}_view", "\${$ccFieldId}->getVar('{$fieldId}')", '$groups', "\$GLOBALS['xoopsModule']->getVar('mid')", true);
156 156
         $ret            .= $this->pc->getPhpCodeCommentLine('Verify permissions');
157 157
         $noPerm         = $this->xc->getXcRedirectHeader("{$stuModuleDirname}_URL . '/index.php'", '', '3', '_NOPERM', false, "\t");
@@ -162,9 +162,9 @@  discard block
 block discarded – undo
162 162
         $ret            .= $this->pc->getPhpCodeForeach($tableSoleName, false, 'k', 'v', $contentForeach);
163 163
         $ret            .= $this->xc->getXcXoopsTplAssign('xoops_sitename', "\$GLOBALS['xoopsConfig']['sitename']");
164 164
         $getVar         = $this->xc->getXcGetVar('', $tableSoleName, $fieldMain, true);
165
-        $stripTags      = $this->pc->getPhpCodeStripTags('', $getVar . ' - ' . "{$language}PRINT" . ' - ' . "\$GLOBALS['xoopsModule']->name()", true);
165
+        $stripTags      = $this->pc->getPhpCodeStripTags('', $getVar.' - '."{$language}PRINT".' - '."\$GLOBALS['xoopsModule']->name()", true);
166 166
         $ret            .= $this->xc->getXcXoopsTplAssign('xoops_pagetitle', $stripTags);
167
-        $ret            .= $this->xc->getXcXoopsTplDisplay($tableName . '_print.tpl', '', false);
167
+        $ret            .= $this->xc->getXcXoopsTplDisplay($tableName.'_print.tpl', '', false);
168 168
 
169 169
         return $ret;
170 170
     }
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         $moduleDirname = $module->getVar('mod_dirname');
182 182
         $language      = $this->getLanguage($moduleDirname, 'MA');
183 183
         $content       = $this->getHeaderFilesComments($module);
184
-        $content       .= $this->getUserPrint($moduleDirname, $language);
184
+        $content .= $this->getUserPrint($moduleDirname, $language);
185 185
 
186 186
         $this->create($moduleDirname, '/', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
187 187
 
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
@@ -212,7 +212,7 @@
 block discarded – undo
212 212
         $moduleDirname = $module->getVar('mod_dirname');
213 213
         $language      = $this->getLanguage($moduleDirname, 'MA');
214 214
         $content       = $this->getHeaderFilesComments($module);
215
-        $content       .= $this->getUserRss($moduleDirname);
215
+        $content .= $this->getUserRss($moduleDirname);
216 216
         $this->create($moduleDirname, '/', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
217 217
 
218 218
         return $this->renderFile();
Please login to merge, or discard this patch.
class/Files/admin/AdminFooter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -88,9 +88,9 @@
 block discarded – undo
88 88
         $moduleDirname = $module->getVar('mod_dirname');
89 89
         $content       = $this->getHeaderFilesComments($module);
90 90
         $isset         = $this->pc->getPhpCodeIsset('templateMain');
91
-        $display       = "\t" . $this->xc->getXcXoopsTplAssign('maintainedby', "\$helper->getConfig('maintainedby')");
92
-        $display       .= "\t" . $this->pc->getPhpCodeRemoveCarriageReturn($this->xc->getXcXoopsTplDisplay(), '', "\r");
93
-        $content       .= $this->pc->getPhpCodeConditions($isset, '', '', $display, false, '') . PHP_EOL;
91
+        $display       = "\t".$this->xc->getXcXoopsTplAssign('maintainedby', "\$helper->getConfig('maintainedby')");
92
+        $display       .= "\t".$this->pc->getPhpCodeRemoveCarriageReturn($this->xc->getXcXoopsTplDisplay(), '', "\r");
93
+        $content       .= $this->pc->getPhpCodeConditions($isset, '', '', $display, false, '').PHP_EOL;
94 94
         $content       .= $this->xc->getXcXoopsCPFooter();
95 95
 
96 96
         $this->create($moduleDirname, 'admin', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
Please login to merge, or discard this patch.