Passed
Push — master ( 32c740...f58b8c )
by Michael
34s queued 14s
created
class/Files/Includes/IncludeNotifications.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@
 block discarded – undo
177 177
         $filename      = $this->getFileName();
178 178
         $moduleDirname = $module->getVar('mod_dirname');
179 179
         $content       = $this->getHeaderFilesComments($module, $filename);
180
-        $content       .= $this->getNotificationsFunction($moduleDirname);
180
+        $content .= $this->getNotificationsFunction($moduleDirname);
181 181
 
182 182
         $this->create($moduleDirname, 'include', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
183 183
 
Please login to merge, or discard this patch.
class/Files/Includes/IncludeInstall.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
         $tables        = $this->getTables();
244 244
         $filename      = $this->getFileName();
245 245
         $content       = $this->getHeaderFilesComments($module, $filename);
246
-        $content       .= $this->getInstallModuleFolder($moduleDirname);
246
+        $content .= $this->getInstallModuleFolder($moduleDirname);
247 247
         foreach (array_keys($tables) as $t) {
248 248
             $tableId      = $tables[$t]->getVar('table_id');
249 249
             $tableMid     = $tables[$t]->getVar('table_mid');
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
             $tableInstall = $tables[$t]->getVar('table_install');
252 252
             if (1 == $tableInstall) {
253 253
                 $content .= $this->getInstallTableFolder($moduleDirname, $tableName);
254
-                $fields  = $this->getTableFields($tableMid, $tableId);
254
+                $fields = $this->getTableFields($tableMid, $tableId);
255 255
                 foreach (array_keys($fields) as $f) {
256 256
                     $fieldElement = $fields[$f]->getVar('field_element');
257 257
                     // All fields elements selected
Please login to merge, or discard this patch.
class/Files/Includes/IncludeComments.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -77,12 +77,12 @@  discard block
 block discarded – undo
77 77
     public function renderCommentsIncludes($module, $filename)
78 78
     {
79 79
         $moduleDirname = $module->getVar('mod_dirname');
80
-        $content       = $this->getHeaderFilesComments($module, $filename . '.php');
81
-        $content       .= <<<EOT
80
+        $content       = $this->getHeaderFilesComments($module, $filename.'.php');
81
+        $content .= <<<EOT
82 82
 include_once __DIR__ . '/../../../mainfile.php';
83 83
 include_once XOOPS_ROOT_PATH.'/include/{$filename}.php';
84 84
 EOT;
85
-        $this->create($moduleDirname, 'include', $filename . '.php', $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
85
+        $this->create($moduleDirname, 'include', $filename.'.php', $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
86 86
 
87 87
         return $this->render();
88 88
     }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                 $fpmf = $fields[$f]->getVar('field_name');
106 106
             }
107 107
         }
108
-        $content = $this->getHeaderFilesComments($module, $filename . '.php');
108
+        $content = $this->getHeaderFilesComments($module, $filename.'.php');
109 109
         $content .= <<<EOT
110 110
 include __DIR__ . '/../../../mainfile.php';
111 111
 include_once XOOPS_ROOT_PATH.'/modules/{$moduleDirname}/class/{$tableName}.php';
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     include XOOPS_ROOT_PATH.'/include/{$filename}.php';
118 118
 }
119 119
 EOT;
120
-        $this->create($moduleDirname, 'include', $filename . '.php', $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
120
+        $this->create($moduleDirname, 'include', $filename.'.php', $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
121 121
 
122 122
         return $this->renderFile();
123 123
     }
Please login to merge, or discard this patch.
class/Files/Includes/IncludeCommentFunctions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
         $ucfTableName     = ucfirst($tableName);
85 85
         $filename         = $this->getFileName();
86 86
         $content          = $this->getHeaderFilesComments($module, $filename);
87
-        $content          .= <<<EOT
87
+        $content .= <<<EOT
88 88
 \n/**
89 89
  * CommentsUpdate
90 90
  *
Please login to merge, or discard this patch.
class/Files/Includes/IncludeSearch.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -83,12 +83,12 @@  discard block
 block discarded – undo
83 83
         $sql = '';
84 84
         if (isset($fieldSearch)) {
85 85
             $nb_fieldSearch = count($fieldSearch);
86
-            $sql            .= '(';
86
+            $sql .= '(';
87 87
             for ($i = 0; $i < $nb_fieldSearch; ++$i) {
88 88
                 if ($i != $nb_fieldSearch - 1) {
89
-                    $sql .= '' . $fieldSearch[$i] . ' LIKE %$queryarray[' . $options . ']% OR ';
89
+                    $sql .= ''.$fieldSearch[$i].' LIKE %$queryarray['.$options.']% OR ';
90 90
                 } else {
91
-                    $sql .= '' . $fieldSearch[$i] . ' LIKE %$queryarray[0]%';
91
+                    $sql .= ''.$fieldSearch[$i].' LIKE %$queryarray[0]%';
92 92
                 }
93 93
             }
94 94
             $sql .= ')';
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     {
146 146
         \$sql .= " AND (
147 147
 EOT;
148
-        $ret        .= $this->getSearchField($fieldSearch, 0) . '";';
148
+        $ret        .= $this->getSearchField($fieldSearch, 0).'";';
149 149
         $ret        .= <<<EOT
150 150
 
151 151
         for(\$i = 1; \$i < \$count; ++\$i)
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
         $filename      = $this->getFileName();
185 185
         $moduleDirname = $module->getVar('mod_dirname');
186 186
         $content       = $this->getHeaderFilesComments($module, $filename);
187
-        $content       .= $this->getSearchFunction($moduleDirname);
187
+        $content .= $this->getSearchFunction($moduleDirname);
188 188
 
189 189
         $this->tdmcfile->create($moduleDirname, 'include', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
190 190
 
Please login to merge, or discard this patch.
class/Files/CreatePhpCode.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function getPhpCodeCommentLine($comment = null, $var = null, $t = '')
57 57
     {
58
-        $value = !empty($var) ? ' ' . $var : '';
58
+        $value = !empty($var) ? ' '.$var : '';
59 59
         $ret   = "{$t}// {$comment}{$value}\n";
60 60
 
61 61
         return $ret;
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
      */
712 712
     public function getPhpCodeHtmlentities($entitiesVar, $entitiesQuote = false)
713 713
     {
714
-        $entitiesVar = (false !== $entitiesQuote) ? $entitiesVar . ', ' . $entitiesQuote : $entitiesVar;
714
+        $entitiesVar = (false !== $entitiesQuote) ? $entitiesVar.', '.$entitiesQuote : $entitiesVar;
715 715
         $entities    = "htmlentities({$entitiesVar})";
716 716
 
717 717
         return $entities;
@@ -725,7 +725,7 @@  discard block
 block discarded – undo
725 725
      */
726 726
     public function getPhpCodeHtmlspecialchars($specialVar, $specialQuote = false)
727 727
     {
728
-        $specialVar   = (false !== $specialQuote) ? $specialVar . ', ' . $specialQuote : $specialVar;
728
+        $specialVar   = (false !== $specialQuote) ? $specialVar.', '.$specialQuote : $specialVar;
729 729
         $specialchars = "htmlspecialchars({$specialVar})";
730 730
 
731 731
         return $specialchars;
Please login to merge, or discard this patch.
class/Form/FormTab.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -53,25 +53,25 @@
 block discarded – undo
53 53
         /* @var \XoopsFormElement $ele */
54 54
         foreach ($this->getElements() as $ele) {
55 55
             $ret         .= NWLINE;
56
-            $ret         .= '<tr>' . NWLINE;
57
-            $ret         .= '<td class="head" width="30%">' . NWLINE;
58
-            $required    = $ele->isRequired() ? '-required' : '';
59
-            $ret         .= '<div class="xoops-form-element-caption' . $required . '">' . NWLINE;
60
-            $ret         .= '<span class="caption-text">' . $ele->getCaption() . '</span>' . NWLINE;
61
-            $ret         .= '<span class="caption-marker">*</span>' . NWLINE;
62
-            $ret         .= '</div>' . NWLINE;
56
+            $ret         .= '<tr>'.NWLINE;
57
+            $ret         .= '<td class="head" width="30%">'.NWLINE;
58
+            $required = $ele->isRequired() ? '-required' : '';
59
+            $ret         .= '<div class="xoops-form-element-caption'.$required.'">'.NWLINE;
60
+            $ret         .= '<span class="caption-text">'.$ele->getCaption().'</span>'.NWLINE;
61
+            $ret         .= '<span class="caption-marker">*</span>'.NWLINE;
62
+            $ret         .= '</div>'.NWLINE;
63 63
             $description = $ele->getDescription();
64 64
             if ($description) {
65
-                $ret .= '<div style="font-weight: normal">' . NWLINE;
66
-                $ret .= $description . NWLINE;
67
-                $ret .= '</div>' . NWLINE;
65
+                $ret .= '<div style="font-weight: normal">'.NWLINE;
66
+                $ret .= $description.NWLINE;
67
+                $ret .= '</div>'.NWLINE;
68 68
             }
69
-            $ret .= '</td>' . NWLINE;
70
-            $ret .= '<td class="even">' . NWLINE;
71
-            $ret .= $ele->render() . NWLINE;
72
-            $ret .= '<span class="form-horizontal">' . $ele->getDescription() . '</span>';
73
-            $ret .= '</td>' . NWLINE;
74
-            $ret .= '</tr>' . NWLINE;
69
+            $ret .= '</td>'.NWLINE;
70
+            $ret .= '<td class="even">'.NWLINE;
71
+            $ret .= $ele->render().NWLINE;
72
+            $ret .= '<span class="form-horizontal">'.$ele->getDescription().'</span>';
73
+            $ret .= '</td>'.NWLINE;
74
+            $ret .= '</tr>'.NWLINE;
75 75
         }
76 76
 
77 77
         return $ret;
Please login to merge, or discard this patch.
class/Form/FormTabTray.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -65,17 +65,17 @@  discard block
 block discarded – undo
65 65
     {
66 66
         $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/jquery.js');
67 67
         $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js');
68
-        $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . '/modules/system/css/ui/' . $this->uiTheme . '/ui.all.css');
69
-        $GLOBALS['xoTheme']->addScript('', ['type' => 'text/javascript'], '$(function() { $("#tabs_' . $this->getName() . '").tabs(); });');
68
+        $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL.'/modules/system/css/ui/'.$this->uiTheme.'/ui.all.css');
69
+        $GLOBALS['xoTheme']->addScript('', ['type' => 'text/javascript'], '$(function() { $("#tabs_'.$this->getName().'").tabs(); });');
70 70
 
71
-        $ret = '<div id="tabs_' . $this->getName() . '">' . NWLINE;
72
-        $ret .= '<ul>' . NWLINE;
71
+        $ret = '<div id="tabs_'.$this->getName().'">'.NWLINE;
72
+        $ret .= '<ul>'.NWLINE;
73 73
         foreach ($this->getElements() as $ele) {
74 74
             if ($ele instanceof Tdmcreate\Form\FormTab) {
75
-                $ret .= '<li><a href="#tab_' . $ele->getName() . '"><span>' . $ele->getCaption() . '</span></a></li>' . NWLINE;
75
+                $ret .= '<li><a href="#tab_'.$ele->getName().'"><span>'.$ele->getCaption().'</span></a></li>'.NWLINE;
76 76
             }
77 77
         }
78
-        $ret .= '</ul>' . NWLINE;
78
+        $ret .= '</ul>'.NWLINE;
79 79
 
80 80
         $hidden = '';
81 81
         $extras = [];
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
             if (!$ele->isHidden()) {
86 86
                 if (!$ele instanceof Tdmcreate\Form\FormRaw) {
87 87
                     if ($ele instanceof Tdmcreate\Form\FormTab) {
88
-                        $ret .= '<div id="tab_' . $ele->getName() . '">' . NWLINE;
89
-                        $ret .= '<table class="outer" cellspacing="1">' . NWLINE;
88
+                        $ret .= '<div id="tab_'.$ele->getName().'">'.NWLINE;
89
+                        $ret .= '<table class="outer" cellspacing="1">'.NWLINE;
90 90
                         $ret .= $ele->render();
91
-                        $ret .= '</table>' . NWLINE;
92
-                        $ret .= '</div>' . NWLINE;
91
+                        $ret .= '</table>'.NWLINE;
92
+                        $ret .= '</div>'.NWLINE;
93 93
                     } else {
94 94
                         $extras[] = $ele;
95 95
                     }
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
             $ret .= NWLINE;
110 110
         }
111 111
 
112
-        $ret .= $hidden . NWLINE;
113
-        $ret .= '</div>' . NWLINE;
112
+        $ret .= $hidden.NWLINE;
113
+        $ret .= '</div>'.NWLINE;
114 114
 
115 115
         return $ret;
116 116
     }
Please login to merge, or discard this patch.
class/Common/FilesManagement.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
                     throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder));
36 36
                 }
37 37
 
38
-                file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>');
38
+                file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>');
39 39
             }
40 40
         } catch (\Exception $e) {
41 41
             echo 'Caught exception: ', $e->getMessage(), '<br>';
@@ -61,14 +61,14 @@  discard block
 block discarded – undo
61 61
         $dir = opendir($src);
62 62
         //        @mkdir($dst);
63 63
         if (!@mkdir($dst) && !is_dir($dst)) {
64
-            throw new \RuntimeException('The directory ' . $dst . ' could not be created.');
64
+            throw new \RuntimeException('The directory '.$dst.' could not be created.');
65 65
         }
66 66
         while (false !== ($file = readdir($dir))) {
67 67
             if (('.' !== $file) && ('..' !== $file)) {
68
-                if (is_dir($src . '/' . $file)) {
69
-                    self::recurseCopy($src . '/' . $file, $dst . '/' . $file);
68
+                if (is_dir($src.'/'.$file)) {
69
+                    self::recurseCopy($src.'/'.$file, $dst.'/'.$file);
70 70
                 } else {
71
-                    copy($src . '/' . $file, $dst . '/' . $file);
71
+                    copy($src.'/'.$file, $dst.'/'.$file);
72 72
                 }
73 73
             }
74 74
         }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
                 self::rrmdir($fObj->getPathname());
208 208
             }
209 209
         }
210
-        $iterator = null;   // clear iterator Obj to close file/directory
210
+        $iterator = null; // clear iterator Obj to close file/directory
211 211
         return rmdir($src); // remove the directory & return results
212 212
     }
213 213
 
@@ -240,14 +240,14 @@  discard block
 block discarded – undo
240 240
         $iterator = new \DirectoryIterator($src);
241 241
         foreach ($iterator as $fObj) {
242 242
             if ($fObj->isFile()) {
243
-                rename($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
243
+                rename($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
244 244
             } elseif (!$fObj->isDot() && $fObj->isDir()) {
245 245
                 // Try recursively on directory
246
-                self::rmove($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
246
+                self::rmove($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
247 247
                 //                rmdir($fObj->getPath()); // now delete the directory
248 248
             }
249 249
         }
250
-        $iterator = null;   // clear iterator Obj to close file/directory
250
+        $iterator = null; // clear iterator Obj to close file/directory
251 251
         return rmdir($src); // remove the directory & return results
252 252
     }
253 253
 
@@ -283,9 +283,9 @@  discard block
 block discarded – undo
283 283
         $iterator = new \DirectoryIterator($src);
284 284
         foreach ($iterator as $fObj) {
285 285
             if ($fObj->isFile()) {
286
-                copy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
286
+                copy($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
287 287
             } elseif (!$fObj->isDot() && $fObj->isDir()) {
288
-                self::rcopy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
288
+                self::rcopy($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
289 289
             }
290 290
         }
291 291
 
Please login to merge, or discard this patch.