Passed
Branch timgno (bce0cd)
by Gino
04:18
created
class/files/user/UserRss.php 2 patches
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 ($str !== false) {
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.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     /**
70 70
      * @param $module
71 71
      * @param $table
72
-     * @param $filename
72
+     * @param string $filename
73 73
      */
74 74
     public function write($module, $table, $filename)
75 75
     {
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     */
86 86
     /**
87 87
      * @param $moduleDirname
88
-     * @param $language
88
+     * @param string $language
89 89
      *
90 90
      * @return string
91 91
      */
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
     *  @param null
204 204
     */
205 205
     /**
206
-     * @return bool|string
206
+     * @return null|string
207 207
      */
208 208
     public function render()
209 209
     {
Please login to merge, or discard this patch.
class/files/user/UserXoopsVersion.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1022,7 +1022,7 @@
 block discarded – undo
1022 1022
      */
1023 1023
     private function getXoopsVersionNotificationCategory($language, $type, $name, $title, $from, $item, $allow)
1024 1024
     {
1025
-        $title = strtoupper($title);//{$from}
1025
+        $title = strtoupper($title); //{$from}
1026 1026
         $ret = "
1027 1027
 \$modversion['notification']['{$type}'][] = array(
1028 1028
     'name' => '{$name}',
Please login to merge, or discard this patch.
Doc Comments   +23 added lines, -20 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      * @param $module
74 74
      * @param $table
75 75
      * @param $tables
76
-     * @param $filename
76
+     * @param string $filename
77 77
      */
78 78
     public function write($module, $table, $tables, $filename)
79 79
     {
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     /**
135 135
      * @param $module
136 136
      * @param $table
137
-     * @param $language
137
+     * @param string $language
138 138
      *
139 139
      * @return string
140 140
      */
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
     *  @param $language
424 424
     */
425 425
     /**
426
-     * @param $language
426
+     * @param string $language
427 427
      *
428 428
      * @return string
429 429
      */
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
     */
468 468
     /**
469 469
      * @param $moduleDirname
470
-     * @param $language
470
+     * @param string $language
471 471
      *
472 472
      * @return string
473 473
      */
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
     /**
533 533
      * @param $module
534 534
      * @param $table
535
-     * @param $language
535
+     * @param string $language
536 536
      *
537 537
      * @return string
538 538
      */
@@ -815,7 +815,7 @@  discard block
 block discarded – undo
815 815
     */
816 816
     /**
817 817
      * @param $moduleDirname
818
-     * @param $language
818
+     * @param string $language
819 819
      * @param $filename
820 820
      *
821 821
      * @return string
@@ -891,9 +891,9 @@  discard block
 block discarded – undo
891 891
     */
892 892
     /**
893 893
      * @param $language
894
-     * @param $type
895
-     * @param $name
896
-     * @param $title
894
+     * @param string $type
895
+     * @param string $name
896
+     * @param string $title
897 897
      * @param $from
898 898
      *
899 899
      * @return string
@@ -917,10 +917,11 @@  discard block
 block discarded – undo
917 917
     */
918 918
     /**
919 919
      * @param $language
920
-     * @param $type
921
-     * @param $name
922
-     * @param $title
920
+     * @param string $type
921
+     * @param string $name
922
+     * @param string $title
923 923
      * @param $from
924
+     * @param string $allow
924 925
      *
925 926
      * @return string
926 927
      */
@@ -945,9 +946,9 @@  discard block
 block discarded – undo
945 946
     */
946 947
     /**
947 948
      * @param $language
948
-     * @param $type
949
-     * @param $name
950
-     * @param $title
949
+     * @param string $type
950
+     * @param string $name
951
+     * @param string $title
951 952
      * @param $from
952 953
      * @param $item
953 954
      * @param $allow
@@ -975,12 +976,14 @@  discard block
 block discarded – undo
975 976
     */
976 977
     /**
977 978
      * @param $language
978
-     * @param $type
979
-     * @param $name
980
-     * @param $title
979
+     * @param string $type
980
+     * @param string $name
981
+     * @param string $title
981 982
      * @param $from
982 983
      * @param $item
983
-     * @param $mail
984
+     * @param string $mail
985
+     * @param string $category
986
+     * @param string $table
984 987
      *
985 988
      * @return string
986 989
      */
@@ -1008,7 +1011,7 @@  discard block
 block discarded – undo
1008 1011
     *  @param null
1009 1012
     */
1010 1013
     /**
1011
-     * @return bool|string
1014
+     * @return null|string
1012 1015
      */
1013 1016
     public function render()
1014 1017
     {
Please login to merge, or discard this patch.
class/files/TDMCreateHtmlSmartyCodes.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
         return $ret;
97 97
     }
98 98
 
99
-     /*
99
+        /*
100 100
     *  @private function setAttributes
101 101
     *  @param array $attributes
102 102
     */
Please login to merge, or discard this patch.
class/files/TDMCreateFile.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
         if (strrpos($path, '\\')) {
266 266
             $str = strrpos($path, '\\');
267 267
             if ($str !== false) {
268
-                return substr($path, $str + 1, strlen($path));
268
+                return substr($path, $str+1, strlen($path));
269 269
             } else {
270 270
                 return substr($path, $str, strlen($path));
271 271
             }
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
         if (strpos($string, '_')) {
394 394
             $str = strpos($string, '_');
395 395
             if ($str !== false) {
396
-                $ret = substr($string, $str + 1, strlen($string));
396
+                $ret = substr($string, $str+1, strlen($string));
397 397
 
398 398
                 return $ret;
399 399
             }
Please login to merge, or discard this patch.
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      * @public function create
124 124
      *
125 125
      * @param $moduleDirname
126
-     * @param $subdir
126
+     * @param string $subdir
127 127
      * @param $fileName
128 128
      * @param $content
129 129
      * @param $created
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     *  @param string $subdir
190 190
     */
191 191
     /**
192
-     * @param $subdir
192
+     * @param string $subdir
193 193
      */
194 194
     private function setSubDir($subdir)
195 195
     {
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
     *  @param string $content
235 235
     */
236 236
     /**
237
-     * @param $content
237
+     * @param string $content
238 238
      */
239 239
     private function setContent($content)
240 240
     {
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
     *  @param string $mode
322 322
     */
323 323
     /**
324
-     * @param $mode
324
+     * @param string $mode
325 325
      */
326 326
     private function setMode($mode)
327 327
     {
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
      *  @param $string
437 437
      */
438 438
     /**
439
-     * @param $string
439
+     * @param string $string
440 440
      *
441 441
      * @return string
442 442
      */
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
      *  @param $string
451 451
      */
452 452
     /**
453
-     * @param $string
453
+     * @param string $string
454 454
      *
455 455
      * @return string
456 456
      */
Please login to merge, or discard this patch.
class/autoload.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
  */
28 28
 // Autoload Function
29 29
 ini_set('display_errors', 1);
30
-error_reporting(E_ALL | E_STRICT);
30
+error_reporting(E_ALL|E_STRICT);
31 31
 
32 32
 if (!function_exists('application_autoloader')) {
33 33
     function application_autoloader($class)
Please login to merge, or discard this patch.
include/functions.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -144,26 +144,26 @@
 block discarded – undo
144 144
 var hasSelected = false; var selectBox = myform.item[A][amount];for (i = 0; i < selectBox.options.length; i++ ) { if (selectBox.options[i].selected == true && selectBox.options[i].value != \'\') { hasSelected = true; break; } }if (!hasSelected) { window.alert("Please enter Donation Amount"); selectBox.focus(); return false; }return true;
145 145
 }
146 146
 //--></script>
147
-<!-- End Form Validation JavaScript //-->', );
147
+<!-- End Form Validation JavaScript //-->',);
148 148
     $paypalform = array(0 => '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">',
149 149
                                 1 => '<input name="cmd" value="_s-xclick" type="hidden">',
150 150
                                 2 => '<input name="hosted_button_id" value="%s" type="hidden">',
151 151
                                 3 => '<img alt="" src="https://www.paypal.com/fr_FR/i/scr/pixel.gif" height="1" border="0" width="1">',
152 152
                                 4 => '<input src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" name="submit" alt="PayPal - The safer, easier way to pay online!" border="0" type="image">',
153
-                                5 => '</form>', );
154
-    for ($key = 0;$key <= 4;++$key) {
153
+                                5 => '</form>',);
154
+    for ($key = 0; $key <= 4; ++$key) {
155 155
         switch ($key) {
156 156
             case 2:
157
-                $donationform[$key] = sprintf($donationform[$key], $GLOBALS['xoopsConfig']['sitename'].' - '.(strlen($GLOBALS['xoopsUser']->getVar('name')) > 0 ? $GLOBALS['xoopsUser']->getVar('name').' ['.$GLOBALS['xoopsUser']->getVar('uname').']' : $GLOBALS['xoopsUser']->getVar('uname')), $GLOBALS['xoopsUser']->getVar('email'), XOOPS_LICENSE_KEY, strtoupper($GLOBALS['xoopsModule']->getVar('dirname')),  strtoupper($GLOBALS['xoopsModule']->getVar('dirname')).' '.$GLOBALS['xoopsModule']->getVar('name'));
157
+                $donationform[$key] = sprintf($donationform[$key], $GLOBALS['xoopsConfig']['sitename'].' - '.(strlen($GLOBALS['xoopsUser']->getVar('name')) > 0 ? $GLOBALS['xoopsUser']->getVar('name').' ['.$GLOBALS['xoopsUser']->getVar('uname').']' : $GLOBALS['xoopsUser']->getVar('uname')), $GLOBALS['xoopsUser']->getVar('email'), XOOPS_LICENSE_KEY, strtoupper($GLOBALS['xoopsModule']->getVar('dirname')), strtoupper($GLOBALS['xoopsModule']->getVar('dirname')).' '.$GLOBALS['xoopsModule']->getVar('name'));
158 158
                 break;
159 159
         }
160 160
     }
161 161
     $aboutRes = '';
162 162
     $istart = strpos($about, ($paypalform[0]), 1);
163
-    $iend = strpos($about, ($paypalform[5]), $istart + 1) + strlen($paypalform[5]) - 1;
164
-    $aboutRes .= (substr($about, 0, $istart - 1));
163
+    $iend = strpos($about, ($paypalform[5]), $istart+1)+strlen($paypalform[5])-1;
164
+    $aboutRes .= (substr($about, 0, $istart-1));
165 165
     $aboutRes .= implode("\n", $donationform);
166
-    $aboutRes .= (substr($about, $iend + 1, strlen($about) - $iend - 1));
166
+    $aboutRes .= (substr($about, $iend+1, strlen($about)-$iend-1));
167 167
 
168 168
     return $aboutRes;
169 169
 }
Please login to merge, or discard this patch.
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -9,17 +9,17 @@
 block discarded – undo
9 9
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 10
  */
11 11
 /**
12
- * tdmcreate module.
13
- *
14
- * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
15
- * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
16
- *
17
- * @since           2.5.0
18
- *
19
- * @author          Txmod Xoops http://www.txmodxoops.org
20
- *
21
- * @version         $Id: functions.php 11084 2013-02-23 15:44:20Z timgno $
22
- */
12
+     * tdmcreate module.
13
+     *
14
+     * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
15
+     * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
16
+     *
17
+     * @since           2.5.0
18
+     *
19
+     * @author          Txmod Xoops http://www.txmodxoops.org
20
+     *
21
+     * @version         $Id: functions.php 11084 2013-02-23 15:44:20Z timgno $
22
+     */
23 23
 defined('XOOPS_ROOT_PATH') or die('Restricted access');
24 24
 
25 25
 /**
Please login to merge, or discard this patch.
include/common.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -9,17 +9,17 @@
 block discarded – undo
9 9
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 10
  */
11 11
 /**
12
- * tdmcreate module.
13
- *
14
- * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
15
- * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
16
- *
17
- * @since           2.5.0
18
- *
19
- * @author          Txmod Xoops http://www.txmodxoops.org
20
- *
21
- * @version         $Id: common.php 12258 2014-01-02 09:33:29Z timgno $
22
- */
12
+     * tdmcreate module.
13
+     *
14
+     * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
15
+     * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
16
+     *
17
+     * @since           2.5.0
18
+     *
19
+     * @author          Txmod Xoops http://www.txmodxoops.org
20
+     *
21
+     * @version         $Id: common.php 12258 2014-01-02 09:33:29Z timgno $
22
+     */
23 23
 defined('XOOPS_ROOT_PATH') or die('Restricted access');
24 24
 $dirname = $GLOBALS['xoopsModule']->getVar('dirname');
25 25
 // Root Frameworks icons 32x32 directory
Please login to merge, or discard this patch.
include/install.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -9,17 +9,17 @@
 block discarded – undo
9 9
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 10
  */
11 11
 /**
12
- * tdmcreate module.
13
- *
14
- * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
15
- * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
16
- *
17
- * @since           2.5.0
18
- *
19
- * @author          Txmod Xoops http://www.txmodxoops.org
20
- *
21
- * @version         $Id: install.php 11084 2013-02-23 15:44:20Z timgno $
22
- */
12
+     * tdmcreate module.
13
+     *
14
+     * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
15
+     * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
16
+     *
17
+     * @since           2.5.0
18
+     *
19
+     * @author          Txmod Xoops http://www.txmodxoops.org
20
+     *
21
+     * @version         $Id: install.php 11084 2013-02-23 15:44:20Z timgno $
22
+     */
23 23
 $indexFile = XOOPS_UPLOAD_PATH.'/index.html';
24 24
 $blankFile = XOOPS_UPLOAD_PATH.'/blank.gif';
25 25
 $emptyFile = XOOPS_ROOT_PATH.'/modules/tdmcreate/assets/images/logos/empty.png';
Please login to merge, or discard this patch.
admin/modules.php 2 patches
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -90,29 +90,29 @@  discard block
 block discarded – undo
90 90
         $moduleDirname = preg_replace('/[^a-zA-Z0-9]\s+/', '', strtolower($_POST['mod_dirname']));
91 91
         //Form module save
92 92
         $modulesObj->setVars(array(
93
-                                 'mod_name' => $_POST['mod_name'],
94
-                                 'mod_dirname' => $moduleDirname,
95
-                                 'mod_version' => $_POST['mod_version'],
96
-                                 'mod_since' => $_POST['mod_since'],
97
-                                 'mod_min_php' => $_POST['mod_min_php'],
98
-                                 'mod_min_xoops' => $_POST['mod_min_xoops'],
99
-                                 'mod_min_admin' => $_POST['mod_min_admin'],
100
-                                 'mod_min_mysql' => $_POST['mod_min_mysql'],
101
-                                 'mod_description' => $_POST['mod_description'],
102
-                                 'mod_author' => $_POST['mod_author'],
103
-                                 'mod_author_mail' => $_POST['mod_author_mail'],
104
-                                 'mod_author_website_url' => $_POST['mod_author_website_url'],
105
-                                 'mod_author_website_name' => $_POST['mod_author_website_name'],
106
-                                 'mod_credits' => $_POST['mod_credits'],
107
-                                 'mod_license' => $_POST['mod_license'],
108
-                                 'mod_release_info' => $_POST['mod_release_info'],
109
-                                 'mod_release_file' => $_POST['mod_release_file'],
110
-                                 'mod_manual' => $_POST['mod_manual'],
111
-                                 'mod_manual_file' => $_POST['mod_manual_file'], ));
93
+                                    'mod_name' => $_POST['mod_name'],
94
+                                    'mod_dirname' => $moduleDirname,
95
+                                    'mod_version' => $_POST['mod_version'],
96
+                                    'mod_since' => $_POST['mod_since'],
97
+                                    'mod_min_php' => $_POST['mod_min_php'],
98
+                                    'mod_min_xoops' => $_POST['mod_min_xoops'],
99
+                                    'mod_min_admin' => $_POST['mod_min_admin'],
100
+                                    'mod_min_mysql' => $_POST['mod_min_mysql'],
101
+                                    'mod_description' => $_POST['mod_description'],
102
+                                    'mod_author' => $_POST['mod_author'],
103
+                                    'mod_author_mail' => $_POST['mod_author_mail'],
104
+                                    'mod_author_website_url' => $_POST['mod_author_website_url'],
105
+                                    'mod_author_website_name' => $_POST['mod_author_website_name'],
106
+                                    'mod_credits' => $_POST['mod_credits'],
107
+                                    'mod_license' => $_POST['mod_license'],
108
+                                    'mod_release_info' => $_POST['mod_release_info'],
109
+                                    'mod_release_file' => $_POST['mod_release_file'],
110
+                                    'mod_manual' => $_POST['mod_manual'],
111
+                                    'mod_manual_file' => $_POST['mod_manual_file'], ));
112 112
         //Form mod_image
113 113
         include_once XOOPS_ROOT_PATH.'/class/uploader.php';
114 114
         $uploader = new XoopsMediaUploader(TDMC_UPLOAD_IMGMOD_PATH, $tdmcreate->getConfig('mimetypes'),
115
-                                           $tdmcreate->getConfig('maxsize'), null, null);
115
+                                            $tdmcreate->getConfig('maxsize'), null, null);
116 116
         if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
117 117
             $uploader->fetchMedia($_POST['xoops_upload_file'][0]);
118 118
             if (!$uploader->upload()) {
@@ -126,16 +126,16 @@  discard block
 block discarded – undo
126 126
         }
127 127
         //Form module save
128 128
         $modulesObj->setVars(array(
129
-                                 'mod_demo_site_url' => $_POST['mod_demo_site_url'],
130
-                                 'mod_demo_site_name' => $_POST['mod_demo_site_name'],
131
-                                 'mod_support_url' => $_POST['mod_support_url'],
132
-                                 'mod_support_name' => $_POST['mod_support_name'],
133
-                                 'mod_website_url' => $_POST['mod_website_url'],
134
-                                 'mod_website_name' => $_POST['mod_website_name'],
135
-                                 'mod_release' => $_POST['mod_release'],
136
-                                 'mod_status' => $_POST['mod_status'],
137
-                                 'mod_donations' => $_POST['mod_donations'],
138
-                                 'mod_subversion' => $_POST['mod_subversion'], )
129
+                                    'mod_demo_site_url' => $_POST['mod_demo_site_url'],
130
+                                    'mod_demo_site_name' => $_POST['mod_demo_site_name'],
131
+                                    'mod_support_url' => $_POST['mod_support_url'],
132
+                                    'mod_support_name' => $_POST['mod_support_name'],
133
+                                    'mod_website_url' => $_POST['mod_website_url'],
134
+                                    'mod_website_name' => $_POST['mod_website_name'],
135
+                                    'mod_release' => $_POST['mod_release'],
136
+                                    'mod_status' => $_POST['mod_status'],
137
+                                    'mod_donations' => $_POST['mod_donations'],
138
+                                    'mod_subversion' => $_POST['mod_subversion'], )
139 139
         );
140 140
         $moduleOption = XoopsRequest::getArray('module_option', array());
141 141
         $modulesObj->setVar('mod_admin', in_array('admin', $moduleOption));
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                                  'mod_release_info' => $_POST['mod_release_info'],
109 109
                                  'mod_release_file' => $_POST['mod_release_file'],
110 110
                                  'mod_manual' => $_POST['mod_manual'],
111
-                                 'mod_manual_file' => $_POST['mod_manual_file'], ));
111
+                                 'mod_manual_file' => $_POST['mod_manual_file'],));
112 112
         //Form mod_image
113 113
         include_once XOOPS_ROOT_PATH.'/class/uploader.php';
114 114
         $uploader = new XoopsMediaUploader(TDMC_UPLOAD_IMGMOD_PATH, $tdmcreate->getConfig('mimetypes'),
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
                                  'mod_release' => $_POST['mod_release'],
136 136
                                  'mod_status' => $_POST['mod_status'],
137 137
                                  'mod_donations' => $_POST['mod_donations'],
138
-                                 'mod_subversion' => $_POST['mod_subversion'], )
138
+                                 'mod_subversion' => $_POST['mod_subversion'],)
139 139
         );
140 140
         $moduleOption = XoopsRequest::getArray('module_option', array());
141 141
         $modulesObj->setVar('mod_admin', in_array('admin', $moduleOption));
Please login to merge, or discard this patch.