Completed
Push — master ( b33f74...df9201 )
by Goffy
10s
created
class/files/TDMCreatePhpCode.php 2 patches
Doc Comments   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
     /**
108 108
     *  @public function getPhpCodeGlobals
109
-    *  @param $var
109
+    *  @param string $var
110 110
     *  @param $value
111 111
     *
112 112
     *  @return string
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
     /**
126 126
     *  @public function getPhpCodeGlobalsVariables
127
-    *  @param $var
127
+    *  @param string $var
128 128
     *  @param $type
129 129
     *
130 130
     *  @return string
@@ -161,10 +161,10 @@  discard block
 block discarded – undo
161 161
 
162 162
     /**
163 163
      * @public function getPhpCodeRemoveCarriageReturn
164
-     * @param        $string
164
+     * @param        string $string
165 165
      *
166
-     * @param string $n
167
-     * @param string $t
166
+     * @param string string
167
+     * @param string string
168 168
      * @return string
169 169
      */
170 170
     public function getPhpCodeRemoveCarriageReturn($string, $n = "\n", $t = "\r")
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
     /**
187 187
      * @public function getPhpCodeIncludeDir
188 188
      * @param        $directory
189
-     * @param        $filename
189
+     * @param        string $filename
190 190
      * @param bool   $once
191 191
      * @param bool   $isPath
192 192
      *
@@ -234,8 +234,8 @@  discard block
 block discarded – undo
234 234
     /**
235 235
     *  @public function getPhpCodeClass
236 236
     *  @param $name
237
-    *  @param $content
238
-    *  @param $extends
237
+    *  @param string $content
238
+    *  @param string $extends
239 239
     *  @param $type
240 240
     *
241 241
     *  @return string
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
     /**
256 256
     *  @public function getPhpCodeClass
257 257
     *  @param $type
258
-    *  @param $name
258
+    *  @param string $name
259 259
     *  @param $assign
260 260
     *  @param $t - Indentation
261 261
     *
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
      * @param        $name
272 272
      * @param        $params
273 273
      * @param        $content
274
-     * @param        $method
274
+     * @param        string $method
275 275
      * @param bool   $isRef
276 276
      * @param string $t - Indentation
277 277
      * @return string
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
      * @param string $operator
295 295
      * @param string $type
296 296
      * @param string $contentIf
297
-     * @param mixed  $contentElse
297
+     * @param string|false  $contentElse
298 298
      * @param $t - Indentation
299 299
      *
300 300
      * @return string
@@ -388,8 +388,8 @@  discard block
 block discarded – undo
388 388
     /**
389 389
      *  @public function getPhpCodeSwitch
390 390
      *
391
-     *  @param $op
392
-     *  @param $content
391
+     *  @param string $op
392
+     *  @param string $content
393 393
      *  @param $t
394 394
      *
395 395
      *  @return string
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
 
445 445
     /**
446 446
     *  @public function getPhpCodeIsset
447
-    *  @param $var
447
+    *  @param string $var
448 448
     *  @return string
449 449
     */
450 450
     public function getPhpCodeIsset($var)
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
 
466 466
     /**
467 467
     *  @public function getPhpCodeIsDir
468
-    *  @param $var
468
+    *  @param string $var
469 469
     *  @return string
470 470
     */
471 471
     public function getPhpCodeIsDir($var)
@@ -475,8 +475,8 @@  discard block
 block discarded – undo
475 475
 
476 476
     /**
477 477
     *  @public function getPhpCodeImplode
478
-    *  @param $left
479
-    *  @param $right
478
+    *  @param string $left
479
+    *  @param string $right
480 480
     *  @return string
481 481
     */
482 482
     public function getPhpCodeImplode($left, $right)
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
 
522 522
     /**
523 523
      * @public function getPhpCodeCopy
524
-     * @param        $file
524
+     * @param        string $file
525 525
      * @param string $newfile
526 526
      * @param string $t
527 527
      * @return string
@@ -569,9 +569,9 @@  discard block
 block discarded – undo
569 569
     /**
570 570
      * @public function getPhpCodeArrayType
571 571
      * @param        $var
572
-     * @param        $type
572
+     * @param        string $type
573 573
      * @param        $left
574
-     * @param        $right
574
+     * @param        string $right
575 575
      * @param bool   $isParam
576 576
      *
577 577
      * @param string $t
@@ -632,10 +632,10 @@  discard block
 block discarded – undo
632 632
 
633 633
     /**
634 634
      * @public function getPhpCodePregFunzions
635
-     * @param        $var
636
-     * @param        $exp
637
-     * @param        $str
638
-     * @param        $val
635
+     * @param        string $var
636
+     * @param        string $exp
637
+     * @param        string $str
638
+     * @param        string $val
639 639
      * @param string $type
640 640
      * @param bool   $isParam
641 641
      *
Please login to merge, or discard this patch.
Indentation   +102 added lines, -102 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 class TDMCreatePhpCode
29 29
 {
30 30
     /**
31
-    *  @static function getInstance
32
-    *  @param null
31
+     *  @static function getInstance
32
+     *  @param null
33 33
      * @return TDMCreatePhpCode
34 34
      */
35 35
     public static function getInstance()
@@ -81,36 +81,36 @@  discard block
 block discarded – undo
81 81
     }
82 82
 
83 83
     /**
84
-    *  @public function getPhpCodeDefine
85
-    *  @param $left
86
-    *  @param $right
87
-    *
88
-    *  @return string
89
-    */
84
+     *  @public function getPhpCodeDefine
85
+     *  @param $left
86
+     *  @param $right
87
+     *
88
+     *  @return string
89
+     */
90 90
     public function getPhpCodeDefine($left, $right)
91 91
     {
92 92
         return "define('{$left}', {$right});\n";
93 93
     }
94 94
 
95 95
     /**
96
-    *  @public function getPhpCodeDefine
97
-    *  @param $left
98
-    *  @param $right
99
-    *
100
-    *  @return string
101
-    */
96
+     *  @public function getPhpCodeDefine
97
+     *  @param $left
98
+     *  @param $right
99
+     *
100
+     *  @return string
101
+     */
102 102
     public function getPhpCodeDefined($left = 'XOOPS_ROOT_PATH', $right = 'Restricted access')
103 103
     {
104 104
         return "defined('{$left}') || die('{$right}');\n";
105 105
     }
106 106
 
107 107
     /**
108
-    *  @public function getPhpCodeGlobals
109
-    *  @param $var
110
-    *  @param $value
111
-    *
112
-    *  @return string
113
-    */
108
+     *  @public function getPhpCodeGlobals
109
+     *  @param $var
110
+     *  @param $value
111
+     *
112
+     *  @return string
113
+     */
114 114
     public function getPhpCodeGlobals($var, $value = '')
115 115
     {
116 116
         if ('' != $value) {
@@ -123,12 +123,12 @@  discard block
 block discarded – undo
123 123
     }
124 124
 
125 125
     /**
126
-    *  @public function getPhpCodeGlobalsVariables
127
-    *  @param $var
128
-    *  @param $type
129
-    *
130
-    *  @return string
131
-    */
126
+     *  @public function getPhpCodeGlobalsVariables
127
+     *  @param $var
128
+     *  @param $type
129
+     *
130
+     *  @return string
131
+     */
132 132
     public function getPhpCodeGlobalsVariables($var = null, $type = 'REQUEST')
133 133
     {
134 134
         $type = strtoupper($type);
@@ -173,11 +173,11 @@  discard block
 block discarded – undo
173 173
     }
174 174
 
175 175
     /**
176
-    *  @public function getPhpCodeFileExists
177
-    *  @param $filename
178
-    *
179
-    *  @return string
180
-    */
176
+     *  @public function getPhpCodeFileExists
177
+     *  @param $filename
178
+     *
179
+     *  @return string
180
+     */
181 181
     public function getPhpCodeFileExists($filename)
182 182
     {
183 183
         return "file_exists({$filename})";
@@ -217,29 +217,29 @@  discard block
 block discarded – undo
217 217
     }
218 218
 
219 219
     /**
220
-    *  @public function getPhpCodeTernaryOperator
221
-    *  @param $return
222
-    *  @param $condition
223
-    *  @param $one
224
-    *  @param $two
225
-    *  @param $t - Indentation
226
-    *
227
-    *  @return string
228
-    */
220
+     *  @public function getPhpCodeTernaryOperator
221
+     *  @param $return
222
+     *  @param $condition
223
+     *  @param $one
224
+     *  @param $two
225
+     *  @param $t - Indentation
226
+     *
227
+     *  @return string
228
+     */
229 229
     public function getPhpCodeTernaryOperator($return, $condition, $one, $two, $t = '')
230 230
     {
231 231
         return "{$t}\${$return} = {$condition} ? {$one} : {$two};\n";
232 232
     }
233 233
 
234 234
     /**
235
-    *  @public function getPhpCodeClass
236
-    *  @param $name
237
-    *  @param $content
238
-    *  @param $extends
239
-    *  @param $type
240
-    *
241
-    *  @return string
242
-    */
235
+     *  @public function getPhpCodeClass
236
+     *  @param $name
237
+     *  @param $content
238
+     *  @param $extends
239
+     *  @param $type
240
+     *
241
+     *  @return string
242
+     */
243 243
     public function getPhpCodeClass($name = null, $content = null, $extends = null, $type = null)
244 244
     {
245 245
         $typ = (null != $type) ? "{$type} " : '';
@@ -253,14 +253,14 @@  discard block
 block discarded – undo
253 253
     }
254 254
 
255 255
     /**
256
-    *  @public function getPhpCodeClass
257
-    *  @param $type
258
-    *  @param $name
259
-    *  @param $assign
260
-    *  @param $t - Indentation
261
-    *
262
-    *  @return string
263
-    */
256
+     *  @public function getPhpCodeClass
257
+     *  @param $type
258
+     *  @param $name
259
+     *  @param $assign
260
+     *  @param $t - Indentation
261
+     *
262
+     *  @return string
263
+     */
264 264
     public function getPhpCodeVariableClass($type = 'private', $name = null, $assign = 'null', $t = '')
265 265
     {
266 266
         return "{$t}{$type} \${$name} = {$assign};\n";
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
     public function getPhpCodeSwitch($op = null, $content = null, $t = '')
398 398
     {
399 399
         //$ret = "{$t}switch(\${$op}) {\n"; test goffy
400
-		$ret = "switch(\${$op}) {\n";
400
+        $ret = "switch(\${$op}) {\n";
401 401
         $ret .= "{$content}";
402 402
         $ret .= "}\n";
403 403
 
@@ -444,10 +444,10 @@  discard block
 block discarded – undo
444 444
     }
445 445
 
446 446
     /**
447
-    *  @public function getPhpCodeIsset
448
-    *  @param $var
449
-    *  @return string
450
-    */
447
+     *  @public function getPhpCodeIsset
448
+     *  @param $var
449
+     *  @return string
450
+     */
451 451
     public function getPhpCodeIsset($var)
452 452
     {
453 453
         return "isset(\${$var})";
@@ -465,32 +465,32 @@  discard block
 block discarded – undo
465 465
     }
466 466
 
467 467
     /**
468
-    *  @public function getPhpCodeIsDir
469
-    *  @param $var
470
-    *  @return string
471
-    */
468
+     *  @public function getPhpCodeIsDir
469
+     *  @param $var
470
+     *  @return string
471
+     */
472 472
     public function getPhpCodeIsDir($var)
473 473
     {
474 474
         return "is_dir({$var})";
475 475
     }
476 476
 
477 477
     /**
478
-    *  @public function getPhpCodeImplode
479
-    *  @param $left
480
-    *  @param $right
481
-    *  @return string
482
-    */
478
+     *  @public function getPhpCodeImplode
479
+     *  @param $left
480
+     *  @param $right
481
+     *  @return string
482
+     */
483 483
     public function getPhpCodeImplode($left, $right)
484 484
     {
485 485
         return "implode('{$left}', {$right})";
486 486
     }
487 487
 
488 488
     /**
489
-    *  @public function getPhpCodeExplode
490
-    *  @param $left
491
-    *  @param $right
492
-    *  @return string
493
-    */
489
+     *  @public function getPhpCodeExplode
490
+     *  @param $left
491
+     *  @param $right
492
+     *  @return string
493
+     */
494 494
     public function getPhpCodeExplode($left, $right)
495 495
     {
496 496
         return "explode('{$left}', {$right})";
@@ -591,41 +591,41 @@  discard block
 block discarded – undo
591 591
     }
592 592
 
593 593
     /**
594
-    *  @public function getPhpCodeSprintf
595
-    *  @param $left
596
-    *  @param $right
597
-    *  @return string
598
-    */
594
+     *  @public function getPhpCodeSprintf
595
+     *  @param $left
596
+     *  @param $right
597
+     *  @return string
598
+     */
599 599
     public function getPhpCodeSprintf($left, $right)
600 600
     {
601 601
         return "sprintf({$left}, {$right})";
602 602
     }
603 603
 
604 604
     /**
605
-    *  @public function getPhpCodeEmpty
606
-    *  @param $var
607
-    *  @return string
608
-    */
605
+     *  @public function getPhpCodeEmpty
606
+     *  @param $var
607
+     *  @return string
608
+     */
609 609
     public function getPhpCodeEmpty($var)
610 610
     {
611 611
         return "empty({$var})";
612 612
     }
613 613
 
614 614
     /**
615
-    *  @public function getPhpCodeHeader
616
-    *  @param $var
617
-    *  @return string
618
-    */
615
+     *  @public function getPhpCodeHeader
616
+     *  @param $var
617
+     *  @return string
618
+     */
619 619
     public function getPhpCodeHeader($var)
620 620
     {
621 621
         return "header({$var})";
622 622
     }
623 623
 
624 624
     /**
625
-    *  @public function getPhpCodeRawurlencode
626
-    *  @param $var
627
-    *  @return string
628
-    */
625
+     *  @public function getPhpCodeRawurlencode
626
+     *  @param $var
627
+     *  @return string
628
+     */
629 629
     public function getPhpCodeRawurlencode($var)
630 630
     {
631 631
         return "rawurlencode({$var})";
@@ -700,11 +700,11 @@  discard block
 block discarded – undo
700 700
     }
701 701
 
702 702
     /**
703
-    *  @public function getPhpCodeHtmlentities
704
-    *  @param $entitiesVar
705
-    *  @param $entitiesQuote
706
-    *  @return string
707
-    */
703
+     *  @public function getPhpCodeHtmlentities
704
+     *  @param $entitiesVar
705
+     *  @param $entitiesQuote
706
+     *  @return string
707
+     */
708 708
     public function getPhpCodeHtmlentities($entitiesVar, $entitiesQuote = false)
709 709
     {
710 710
         $entitiesVar = (false !== $entitiesQuote) ? $entitiesVar . ', ' . $entitiesQuote : $entitiesVar;
@@ -714,11 +714,11 @@  discard block
 block discarded – undo
714 714
     }
715 715
 
716 716
     /**
717
-    *  @public function getPhpCodeHtmlspecialchars
718
-    *  @param $specialVar
719
-    *  @param $specialQuote
720
-    *  @return string
721
-    */
717
+     *  @public function getPhpCodeHtmlspecialchars
718
+     *  @param $specialVar
719
+     *  @param $specialQuote
720
+     *  @return string
721
+     */
722 722
     public function getPhpCodeHtmlspecialchars($specialVar, $specialQuote = false)
723 723
     {
724 724
         $specialVar = (false !== $specialQuote) ? $specialVar . ', ' . $specialQuote : $specialVar;
Please login to merge, or discard this patch.
class/logoGenerator.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
      * @param $logoIcon
50 50
      * @param $moduleName
51 51
      *
52
-     * @return bool|string
52
+     * @return false|string
53 53
      */
54 54
     public static function createLogo($logoIcon, $moduleName)
55 55
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 //include_once XOOPS_ROOT_PATH . '/modules/TDMCreate/include/common.php';
26 26
 
27 27
 if (function_exists($_GET['f'])) { // get function name and parameter  $_GET['f']($_GET["p"]);
28
-    include_once __DIR__ . '/logoGenerator.php';
28
+    include_once __DIR__.'/logoGenerator.php';
29 29
     $ret = logoGenerator::createLogo($_GET['iconName'], $_GET['caption']);
30 30
     phpFunction($ret);
31 31
 } else {
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
         // Write text
85 85
         $textColor = imagecolorallocate($imageModule, 0, 0, 0);
86
-        $spaceToBorder = (92 - strlen($moduleName) * 7.5) / 2;
86
+        $spaceToBorder = (92-strlen($moduleName) * 7.5) / 2;
87 87
         imagefttext($imageModule, 8.5, 0, $spaceToBorder, 45, $textColor, $font, $moduleName, []);
88 88
 
89 89
         imagecopy($imageModule, $imageIcon, 29, 2, 0, 0, 32, 32);
Please login to merge, or discard this patch.
class/files/language/LanguageAdmin.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -151,7 +151,9 @@
 block discarded – undo
151 151
             $fields = $this->getTableFields($tableMid, $tableId);
152 152
             $fieldInForm = 0;
153 153
             foreach (array_keys($fields) as $f) {
154
-                if ($fieldInForm < $fields[$f]->getVar('field_inform')) $fieldInForm = $fields[$f]->getVar('field_inform');
154
+                if ($fieldInForm < $fields[$f]->getVar('field_inform')) {
155
+                    $fieldInForm = $fields[$f]->getVar('field_inform');
156
+                }
155 157
             }
156 158
             if (1 == $fieldInForm) {
157 159
                 $ret .= $this->defines->getAboveDefines("{$ucfTableSoleName} add/edit");
Please login to merge, or discard this patch.