Completed
Pull Request — master (#65)
by Gino
04:16
created
class/files/user/UserXoopsVersion.php 2 patches
Doc Comments   +31 added lines, -19 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      * @param $module
91 91
      * @param $table
92 92
      * @param $tables
93
-     * @param $filename
93
+     * @param string $filename
94 94
      */
95 95
     public function write($module, $table, $tables, $filename)
96 96
     {
@@ -139,6 +139,10 @@  discard block
 block discarded – undo
139 139
      *
140 140
      * @return string
141 141
      */
142
+
143
+    /**
144
+     * @param string $language
145
+     */
142 146
     private function getXoopsVersionHeader($module, $language)
143 147
     {
144 148
         $date = date(_DBDATESTRING);
@@ -371,7 +375,7 @@  discard block
 block discarded – undo
371 375
     *  @param $language
372 376
     */
373 377
     /**
374
-     * @param $language
378
+     * @param string $language
375 379
      *
376 380
      * @return string
377 381
      */
@@ -407,7 +411,7 @@  discard block
 block discarded – undo
407 411
     */
408 412
     /**
409 413
      * @param $moduleDirname
410
-     * @param $language
414
+     * @param string $language
411 415
      *
412 416
      * @return string
413 417
      */
@@ -445,6 +449,7 @@  discard block
 block discarded – undo
445 449
     /**
446 450
      * @param $moduleDirname
447 451
      * @param $language
452
+     * @param string $stuTableSoleName
448 453
      *
449 454
      * @return string
450 455
      */
@@ -470,7 +475,7 @@  discard block
 block discarded – undo
470 475
     /**
471 476
      * @param $module
472 477
      * @param $table
473
-     * @param $language
478
+     * @param string $language
474 479
      *
475 480
      * @return string
476 481
      */
@@ -663,7 +668,7 @@  discard block
 block discarded – undo
663 668
     */
664 669
     /**
665 670
      * @param $moduleDirname
666
-     * @param $language
671
+     * @param string $language
667 672
      *
668 673
      * @return string
669 674
      */
@@ -754,10 +759,11 @@  discard block
 block discarded – undo
754 759
     */
755 760
     /**
756 761
      * @param $language
757
-     * @param $type
758
-     * @param $name
759
-     * @param $title
762
+     * @param string $type
763
+     * @param string $name
764
+     * @param string $title
760 765
      * @param $from
766
+     * @param integer $num
761 767
      *
762 768
      * @return string
763 769
      */
@@ -778,10 +784,12 @@  discard block
 block discarded – undo
778 784
     */
779 785
     /**
780 786
      * @param $language
781
-     * @param $type
782
-     * @param $name
783
-     * @param $title
787
+     * @param string $type
788
+     * @param string $name
789
+     * @param string $title
784 790
      * @param $from
791
+     * @param string $allow
792
+     * @param integer $num
785 793
      *
786 794
      * @return string
787 795
      */
@@ -802,12 +810,13 @@  discard block
 block discarded – undo
802 810
     */
803 811
     /**
804 812
      * @param $language
805
-     * @param $type
806
-     * @param $name
807
-     * @param $title
813
+     * @param string $type
814
+     * @param string $name
815
+     * @param string $title
808 816
      * @param $file
809 817
      * @param $item
810 818
      * @param $allow
819
+     * @param integer $num
811 820
      *
812 821
      * @return string
813 822
      */
@@ -828,12 +837,15 @@  discard block
 block discarded – undo
828 837
     */
829 838
     /**
830 839
      * @param $language
831
-     * @param $type
832
-     * @param $name
833
-     * @param $title
840
+     * @param string $type
841
+     * @param string $name
842
+     * @param string $title
834 843
      * @param $from
835 844
      * @param $item
836
-     * @param $mail
845
+     * @param string $mail
846
+     * @param string $category
847
+     * @param string $table
848
+     * @param integer $num
837 849
      *
838 850
      * @return string
839 851
      */
@@ -856,7 +868,7 @@  discard block
 block discarded – undo
856 868
     *  @param null
857 869
     */
858 870
     /**
859
-     * @return bool|string
871
+     * @return null|string
860 872
      */
861 873
     public function render()
862 874
     {
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -416,12 +416,12 @@  discard block
 block discarded – undo
416 416
         $ret = $this->getHeaderComment('Blocks');
417 417
         $ret .= $this->getSimpleString('$b = 1;');
418 418
         $tableCategory = array();
419
-		foreach (array_keys($tables) as $i) {
419
+        foreach (array_keys($tables) as $i) {
420 420
             $tableName = $tables[$i]->getVar('table_name');
421 421
             $tableFieldName = $tables[$i]->getVar('table_fieldname');
422
-			$tableSoleName = $tables[$i]->getVar('table_solename');
423
-			$stuTableSoleName = strtoupper($tableSoleName);
424
-			$tableCategory[] = $tables[$i]->getVar('table_category');
422
+            $tableSoleName = $tables[$i]->getVar('table_solename');
423
+            $stuTableSoleName = strtoupper($tableSoleName);
424
+            $tableCategory[] = $tables[$i]->getVar('table_category');
425 425
             if (in_array(1, $tableCategory)) {
426 426
                 $ret .= $this->getXoopsVersionTypeBlocks($moduleDirname, $tableName, $stuTableSoleName, $language, $tableFieldName);
427 427
             } else {
@@ -723,7 +723,7 @@  discard block
 block discarded – undo
723 723
         $num = 1;
724 724
         if (in_array(1, $tableCategory)) {           
725 725
             $ret .= $this->getXoopsVersionNotificationCodeComplete($language, 'event', 'new_category', 'global', 0, 'global', 'newcategory', 'global_newcategory_notify', $num); 
726
-			++$num;
726
+            ++$num;
727 727
         }
728 728
         $ret .= $this->getXoopsVersionNotificationCodeComplete($language, 'event', 'file_modify', 'global', 1, 'global', 'filemodify', 'global_filemodify_notify', $num);
729 729
         if (in_array(1, $tableBroken)) {
Please login to merge, or discard this patch.
class/files/TDMCreatePhpCode.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
         return "{$return} = {$condition} ? {$one} : {$two};";
206 206
     }
207 207
 	
208
-	/*
208
+    /*
209 209
     *  @public function getPhpCodeFunction
210 210
     *  @param $name
211 211
     *  @param $params
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
     public function getPhpCodePregFunzions($return, $exp = '', $str, $val, $type = 'match', $isParam = false)
530 530
     {
531 531
         $pregFunz = "preg_{$type}( '";
532
-		if ($isParam === false) {
532
+        if ($isParam === false) {
533 533
             $ret = "\${$return} = {$pregFunz}{$exp}', '{$str}', {$val});\n";
534 534
         } else {
535 535
             $ret = "{$pregFunz}{$exp}', '{$str}', {$val})";
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
     public function getPhpCodeStrType($left, $var, $str, $value, $type = 'replace', $isParam = false)
553 553
     {
554 554
         $strType = "str_{$type}( '";
555
-		if ($isParam === false) {
555
+        if ($isParam === false) {
556 556
             $ret = "\${$left} = {$strType}{$var}', '{$str}', {$value});\n";
557 557
         } else {
558 558
             $ret = "{$strType}{$var}', '{$str}', {$value})";
Please login to merge, or discard this patch.
class/files/language/LanguageModinfo.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -194,30 +194,30 @@
 block discarded – undo
194 194
     private function getLanguageBlocks($tables, $language)
195 195
     {
196 196
         $ret = $this->defines->getAboveDefines('Blocks');
197
-		foreach (array_keys($tables) as $i) {
197
+        foreach (array_keys($tables) as $i) {
198 198
             $tableName = $tables[$i]->getVar('table_name');
199 199
             $stuTableName = strtoupper($tableName);
200
-			$tableSoleName = $tables[$i]->getVar('table_solename');
201
-			$stuTableSoleName = strtoupper($tableSoleName);
200
+            $tableSoleName = $tables[$i]->getVar('table_solename');
201
+            $stuTableSoleName = strtoupper($tableSoleName);
202 202
             $ucfTableName = ucfirst($tableName);
203 203
             if (1 == $tables[$i]->getVar('table_blocks')) {
204 204
                 $ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK", "{$ucfTableName} block");
205 205
                 $ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_DESC", "{$ucfTableName} block description");
206
-				if ($tables[$i]->getVar('table_category') == 1) {
207
-					$ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_{$stuTableSoleName}", "{$ucfTableName} block");
208
-					$ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_{$stuTableSoleName}_DESC", "{$ucfTableName} block description");
209
-				} else {	
210
-					$ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_LAST", "{$ucfTableName} block last");
211
-					$ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_LAST_DESC", "{$ucfTableName} block last description");
212
-					$ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_NEW", "{$ucfTableName} block new");
213
-					$ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_NEW_DESC", "{$ucfTableName} block new description");
214
-					$ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_HITS", "{$ucfTableName} block hits");
215
-					$ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_HITS_DESC", "{$ucfTableName} block hits description");
216
-					$ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_TOP", "{$ucfTableName} block top");
217
-					$ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_TOP_DESC", "{$ucfTableName} block top description");
218
-					$ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_RANDOM", "{$ucfTableName} block random");
219
-					$ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_RANDOM_DESC", "{$ucfTableName} block random description");					
220
-				}
206
+                if ($tables[$i]->getVar('table_category') == 1) {
207
+                    $ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_{$stuTableSoleName}", "{$ucfTableName} block");
208
+                    $ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_{$stuTableSoleName}_DESC", "{$ucfTableName} block description");
209
+                } else {	
210
+                    $ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_LAST", "{$ucfTableName} block last");
211
+                    $ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_LAST_DESC", "{$ucfTableName} block last description");
212
+                    $ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_NEW", "{$ucfTableName} block new");
213
+                    $ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_NEW_DESC", "{$ucfTableName} block new description");
214
+                    $ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_HITS", "{$ucfTableName} block hits");
215
+                    $ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_HITS_DESC", "{$ucfTableName} block hits description");
216
+                    $ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_TOP", "{$ucfTableName} block top");
217
+                    $ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_TOP_DESC", "{$ucfTableName} block top description");
218
+                    $ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_RANDOM", "{$ucfTableName} block random");
219
+                    $ret .= $this->defines->getDefine($language, "{$stuTableName}_BLOCK_RANDOM_DESC", "{$ucfTableName} block random description");					
220
+                }
221 221
             }
222 222
         }
223 223
 
Please login to merge, or discard this patch.