Completed
Push — 1.11.x ( 7ffd51...902ebd )
by José
50:21 queued 21:28
created
main/lp/aicc.class.php 4 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -359,7 +359,7 @@
 block discarded – undo
359 359
         $current_dir = api_replace_dangerous_char(trim($current_dir)); // Current dir we are in, inside scorm/
360 360
         if ($this->debug > 0) { error_log('New LP - aicc::import_package() - Current_dir = '.$current_dir, 0); }
361 361
 
362
-         //$uploaded_filename = $_FILES['userFile']['name'];
362
+            //$uploaded_filename = $_FILES['userFile']['name'];
363 363
         // Get the name of the zip file without the extension.
364 364
         if ($this->debug > 0) { error_log('New LP - aicc::import_package() - Received zip file name: '.$zip_file_path, 0); }
365 365
         $file_info = pathinfo($zip_file_name);
Please login to merge, or discard this patch.
Doc Comments   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
     /**
225 225
      * Import the aicc object (as a result from the parse_config_files function) into the database structure
226 226
      * @param    string $course_code
227
-     * @return    bool    Returns -1 on error
227
+     * @return    false|null    Returns -1 on error
228 228
      */
229 229
     public function import_aicc($course_code)
230 230
     {
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
     /**
642 642
      * Sets the Author LP in the database
643 643
      * @param    string $author
644
-     * @return true
644
+     * @return boolean
645 645
      */
646 646
     public function set_author($author = '')
647 647
     {
@@ -811,7 +811,8 @@  discard block
 block discarded – undo
811 811
      * Static function to parse AICC ini files.
812 812
      * Based on work by sinedeo at gmail dot com published on php.net (parse_ini_file()).
813 813
      * @param	string	File path
814
-     * @return	array	Structured array
814
+     * @param string $f
815
+     * @return	string	Structured array
815 816
      */
816 817
     public function parse_ini_file_quotes_safe($f)
817 818
     {
@@ -864,7 +865,7 @@  discard block
 block discarded – undo
864 865
      * @param		string	INI File string
865 866
      * @param		array	List of names of sections that should be considered
866 867
      * as containing only hard string data (no variables), provided in lower case
867
-     * @return	array	Structured array
868
+     * @return	string	Structured array
868 869
      */
869 870
     public function parse_ini_string_quotes_safe($s, $pure_strings = array())
870 871
     {
@@ -928,6 +929,7 @@  discard block
 block discarded – undo
928 929
      * @param	string	CSV delimiter
929 930
      * @param	string	CSV enclosure
930 931
      * @param	boolean	Might one field name happen more than once on the same line? (then split by comma in the values)
932
+     * @param string $f
931 933
      * @return array	Simple structured array
932 934
      */
933 935
     public function parse_csv_file($f, $delim = ',', $enclosure = '"', $multiples = false)
Please login to merge, or discard this patch.
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -532,7 +532,9 @@  discard block
 block discarded – undo
532 532
                     if ($file != '.' && $file != '..') {
533 533
                         $filetype = 'file';
534 534
 
535
-                        if (is_dir($course_sys_dir.$new_dir.$file)) $filetype = 'folder';
535
+                        if (is_dir($course_sys_dir.$new_dir.$file)) {
536
+                            $filetype = 'folder';
537
+                        }
536 538
 
537 539
                         // TODO: RENAMING FILES CAN BE VERY DANGEROUS AICC-WISE, avoid that as much as possible!
538 540
                         //$safe_file = api_replace_dangerous_char($file, 'strict');
@@ -844,7 +846,8 @@  discard block
 block discarded – undo
844 846
                         $v = @substr($v, 1, @strlen($v) - 2);
845 847
                     }
846 848
                     if ($sec) {
847
-                        if (api_strtolower($sec) == 'course_description') { // A special case.
849
+                        if (api_strtolower($sec) == 'course_description') {
850
+// A special case.
848 851
                             $r[api_strtolower($sec)] = $k;
849 852
                         } else {
850 853
                             $r[api_strtolower($sec)][api_strtolower($k)] = $v;
@@ -906,7 +909,8 @@  discard block
 block discarded – undo
906 909
                         if ($pure_data) {
907 910
                             $r[api_strtolower($sec)] .= $f[$i];
908 911
                         } else {
909
-                            if (api_strtolower($sec) == 'course_description') { // A special case.
912
+                            if (api_strtolower($sec) == 'course_description') {
913
+// A special case.
910 914
                                 $r[api_strtolower($sec)] = $k;
911 915
                             } else {
912 916
                                 $r[api_strtolower($sec)][api_strtolower($k)] = $v;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
         $lp_id = Database::insert_id();
265 265
 
266 266
         if ($lp_id) {
267
-            $sql = "UPDATE $new_lp SET id = iid  WHERE iid = $lp_id";
267
+            $sql = "update $new_lp SET id = iid  WHERE iid = $lp_id";
268 268
             Database::query($sql);
269 269
 
270 270
             $this->lp_id = $lp_id;
@@ -318,13 +318,13 @@  discard block
 block discarded – undo
318 318
             $item_id = Database::insert_id();
319 319
 
320 320
             if ($item_id) {
321
-                $sql = "UPDATE $new_lp_item SET id = iid WHERE iid = $lp_id";
321
+                $sql = "update $new_lp_item SET id = iid WHERE iid = $lp_id";
322 322
                 Database::query($sql);
323 323
             }
324 324
 
325 325
             // Now update previous item to change next_item_id.
326 326
             if ($previous != 0) {
327
-                $upd = "UPDATE $new_lp_item SET next_item_id = $item_id WHERE c_id = $course_id AND id = $previous";
327
+                $upd = "update $new_lp_item SET next_item_id = $item_id WHERE c_id = $course_id AND id = $previous";
328 328
                 Database::query($upd);
329 329
                 // Update the previous item id.
330 330
             }
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
         $lp = $this->get_id();
590 590
         if ($lp != 0) {
591 591
             $tbl_lp = Database::get_course_table(TABLE_LP_MAIN);
592
-            $sql = "UPDATE $tbl_lp SET content_local = '$proxy' WHERE c_id = ".$course_id." id = ".$lp;
592
+            $sql = "update $tbl_lp SET content_local = '$proxy' WHERE c_id = ".$course_id." id = ".$lp;
593 593
             Database::query($sql);
594 594
             return true;
595 595
         } else {
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
         $lp = $this->get_id();
610 610
         if ($lp != 0) {
611 611
             $tbl_lp = Database::get_course_table(TABLE_LP_MAIN);
612
-            $sql = "UPDATE $tbl_lp SET theme = '$theme' WHERE c_id = ".$course_id." id = ".$lp;
612
+            $sql = "update $tbl_lp SET theme = '$theme' WHERE c_id = ".$course_id." id = ".$lp;
613 613
             $res = Database::query($sql);
614 614
             return true;
615 615
         } else {
@@ -629,7 +629,7 @@  discard block
 block discarded – undo
629 629
         $lp = $this->get_id();
630 630
         if ($lp != 0) {
631 631
             $tbl_lp = Database::get_course_table(TABLE_LP_MAIN);
632
-            $sql = "UPDATE $tbl_lp SET preview_image = '$preview_image' 
632
+            $sql = "update $tbl_lp SET preview_image = '$preview_image' 
633 633
                     WHERE c_id = ".$course_id." id = ".$lp;
634 634
             Database::query($sql);
635 635
             return true;
@@ -650,7 +650,7 @@  discard block
 block discarded – undo
650 650
         $lp = $this->get_id();
651 651
         if ($lp != 0) {
652 652
             $tbl_lp = Database::get_course_table(TABLE_LP_MAIN);
653
-            $sql = "UPDATE $tbl_lp SET author = '$author' 
653
+            $sql = "update $tbl_lp SET author = '$author' 
654 654
                     WHERE c_id = ".$course_id." id = ".$lp;
655 655
             Database::query($sql);
656 656
             return true;
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
         $lp = $this->get_id();
672 672
         if ($lp != 0) {
673 673
             $tbl_lp = Database::get_course_table(TABLE_LP_MAIN);
674
-            $sql = "UPDATE $tbl_lp SET content_maker = '$maker' 
674
+            $sql = "update $tbl_lp SET content_maker = '$maker' 
675 675
                     WHERE c_id = ".$course_id." id = ".$lp;
676 676
             Database::query($sql);
677 677
             return true;
Please login to merge, or discard this patch.
main/user/subscribe_user.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -480,7 +480,7 @@
 block discarded – undo
480 480
             }
481 481
             $sql .= " AND access_url_id = $url_access_id";
482 482
         } else {
483
-             // adding a teacher NOT through a session
483
+                // adding a teacher NOT through a session
484 484
             $sql = "SELECT $select_fields
485 485
                     FROM $user_table u
486 486
                     LEFT JOIN $course_user_table cu
Please login to merge, or discard this patch.
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
     if (isset($_REQUEST['type']) && $_REQUEST['type'] == COURSEMANAGER) {
451 451
         // adding a teacher through a session
452 452
         if (!empty($sessionId)) {
453
-            $sql = "SELECT $select_fields
453
+            $sql = "select $select_fields
454 454
                     FROM $user_table u
455 455
                     LEFT JOIN $tbl_session_rel_course_user cu
456 456
                     ON
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
             $sql .= " AND access_url_id = $url_access_id";
482 482
         } else {
483 483
              // adding a teacher NOT through a session
484
-            $sql = "SELECT $select_fields
484
+            $sql = "select $select_fields
485 485
                     FROM $user_table u
486 486
                     LEFT JOIN $course_user_table cu
487 487
                     ON u.user_id = cu.user_id AND c_id = '".$courseId."'";
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
             // adding a teacher NOT trough a session on a portal with multiple URLs
506 506
             if (api_is_multiple_url_enabled()) {
507 507
                 if ($url_access_id != -1) {
508
-                    $sql = "SELECT $select_fields
508
+                    $sql = "select $select_fields
509 509
                             FROM $user_table u
510 510
                             LEFT JOIN $course_user_table cu
511 511
                             ON u.user_id = cu.user_id and c_id='".$courseId."'
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
     } else {
536 536
         // adding a student
537 537
         if (!empty($sessionId)) {
538
-            $sql = "SELECT $select_fields
538
+            $sql = "select $select_fields
539 539
                     FROM $user_table u
540 540
                     LEFT JOIN $tbl_session_rel_course_user cu
541 541
                     ON
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
                 $sql .= "AND access_url_id = $url_access_id";
572 572
             }
573 573
         } else {
574
-            $sql = "SELECT $select_fields
574
+            $sql = "select $select_fields
575 575
                     FROM $user_table u
576 576
                     LEFT JOIN $course_user_table cu
577 577
                     ON
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
             //showing only the courses of the current Chamilo access_url_id
597 597
             if (api_is_multiple_url_enabled()) {
598 598
                 if ($url_access_id != -1) {
599
-                    $sql = "SELECT $select_fields
599
+                    $sql = "select $select_fields
600 600
                         FROM $user_table u
601 601
                         LEFT JOIN $course_user_table cu
602 602
                         ON u.user_id = cu.user_id AND c_id='".$courseId."'
Please login to merge, or discard this patch.
main/gradebook/lib/be/evaluation.class.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,6 +120,9 @@  discard block
 block discarded – undo
120 120
         return $this->created_at;
121 121
     }
122 122
 
123
+    /**
124
+     * @return string
125
+     */
123 126
     public function get_weight()
124 127
     {
125 128
         return $this->weight;
@@ -271,7 +274,7 @@  discard block
 block discarded – undo
271 274
     }
272 275
 
273 276
     /**
274
-     * @param array $result
277
+     * @param Doctrine\DBAL\Driver\Statement $result
275 278
      * @return array
276 279
      */
277 280
     private static function create_evaluation_objects_from_sql_result($result)
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -813,7 +813,7 @@
 block discarded – undo
813 813
     public function lock($locked)
814 814
     {
815 815
         $table_evaluation = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
816
-        $sql = "UPDATE $table_evaluation 
816
+        $sql = "update $table_evaluation 
817 817
                 SET locked = '".intval($locked)."' 
818 818
                 WHERE id='".intval($this->id)."'";
819 819
         Database::query($sql);
Please login to merge, or discard this patch.
main/inc/lib/extra_field_option.lib.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      * Delete all the options of a specific field
116 116
      * @param int $field_id
117 117
      *
118
-     * @return void
118
+     * @return Statement
119 119
      * @assert (-1) === false
120 120
      */
121 121
     public function delete_all_options_by_field_id($field_id)
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
      * Gets an array of options for a specific field
413 413
      * @param int $field_id The field ID
414 414
      * @param bool $add_id_in_array Whether to add the row ID in the result
415
-     * @param null $ordered_by Extra ordering query bit
415
+     * @param null|string $ordered_by Extra ordering query bit
416 416
      * @return array The options if they exists. Otherwise return false
417 417
      */
418 418
     public function get_field_options_by_field($field_id, $add_id_in_array = false, $ordered_by = null)
@@ -784,8 +784,8 @@  discard block
 block discarded – undo
784 784
     }
785 785
 
786 786
     /**
787
-     * @param $defaultDisplayText
788
-     * @return mixed|string
787
+     * @param string $defaultDisplayText
788
+     * @return string
789 789
      */
790 790
     public static function getLanguageVariable($defaultDisplayText)
791 791
     {
Please login to merge, or discard this patch.
main/user/resume_session.php 2 patches
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -97,24 +97,24 @@
 block discarded – undo
97 97
                 $nbr_affected_rows = Database::affected_rows($result);
98 98
 
99 99
                 Database::query("DELETE FROM $tbl_session_rel_course_rel_user WHERE session_id='$id_session' AND c_id IN($idChecked)");
100
-                Database::query("UPDATE $tbl_session SET nbr_courses=nbr_courses-$nbr_affected_rows WHERE id='$id_session'");
100
+                Database::query("update $tbl_session SET nbr_courses=nbr_courses-$nbr_affected_rows WHERE id='$id_session'");
101 101
             }
102 102
 
103 103
             if (!empty($_GET['class'])) {
104 104
                 $result = Database::query("DELETE FROM $tbl_session_rel_class WHERE session_id='$id_session' AND class_id=".intval($_GET['class']));
105 105
                 $nbr_affected_rows = Database::affected_rows($result);
106
-                Database::query("UPDATE $tbl_session SET nbr_classes=nbr_classes-$nbr_affected_rows WHERE id='$id_session'");
106
+                Database::query("update $tbl_session SET nbr_classes=nbr_classes-$nbr_affected_rows WHERE id='$id_session'");
107 107
             }
108 108
 
109 109
             if (!empty($_GET['user'])) {
110 110
                 $result = Database::query("DELETE FROM $tbl_session_rel_user WHERE relation_type<>".SESSION_RELATION_TYPE_RRHH." AND session_id ='$id_session' AND user_id=".intval($_GET['user']));
111 111
                 $nbr_affected_rows = Database::affected_rows($result);
112
-                Database::query("UPDATE $tbl_session SET nbr_users=nbr_users-$nbr_affected_rows WHERE id='$id_session'");
112
+                Database::query("update $tbl_session SET nbr_users=nbr_users-$nbr_affected_rows WHERE id='$id_session'");
113 113
 
114 114
                 $result = Database::query("DELETE FROM $tbl_session_rel_course_rel_user WHERE session_id ='$id_session' AND user_id=".intval($_GET['user']));
115 115
                 $nbr_affected_rows = Database::affected_rows($result);
116 116
 
117
-                Database::query("UPDATE $tbl_session_rel_course SET nbr_users=nbr_users-$nbr_affected_rows WHERE session_id ='$id_session'");
117
+                Database::query("update $tbl_session_rel_course SET nbr_users=nbr_users-$nbr_affected_rows WHERE session_id ='$id_session'");
118 118
             }
119 119
             break;
120 120
     }
Please login to merge, or discard this patch.
Braces   +7 added lines, -1 removed lines patch added patch discarded remove patch
@@ -189,12 +189,18 @@
 block discarded – undo
189 189
             <?php echo api_ucfirst(get_lang('SessionVisibility')) ?> :
190 190
         </td>
191 191
         <td>
192
-            <?php if ($session['visibility'] == 1) echo get_lang('ReadOnly'); elseif ($session['visibility'] == 2) echo get_lang('Visible'); elseif ($session['visibility'] == 3) echo api_ucfirst(get_lang('Invisible'))  ?>
192
+            <?php if ($session['visibility'] == 1) {
193
+    echo get_lang('ReadOnly');
194
+} elseif ($session['visibility'] == 2) {
195
+    echo get_lang('Visible');
196
+} elseif ($session['visibility'] == 3) {
197
+    echo api_ucfirst(get_lang('Invisible'))  ?>
193 198
         </td>
194 199
     </tr>
195 200
     <?php
196 201
 
197 202
     $multiple_url_is_on = api_get_multiple_access_url();
203
+}
198 204
     if ($multiple_url_is_on) {
199 205
         echo '<tr><td>';
200 206
         echo 'URL';
Please login to merge, or discard this patch.
main/session/add_many_session_to_category.php 2 patches
Braces   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -195,10 +195,11 @@  discard block
 block discarded – undo
195 195
         <?php
196 196
         if (!empty($rows_session_category)) {
197 197
             foreach ($rows_session_category as $category) {
198
-                if ($category['id'] == $categoryId)
199
-                        echo '<option value="'.$category['id'].'" selected>'.$category['name'].'</option>';
200
-                    else
201
-                        echo '<option value="'.$category['id'].'">'.$category['name'].'</option>';
198
+                if ($category['id'] == $categoryId) {
199
+                                        echo '<option value="'.$category['id'].'" selected>'.$category['name'].'</option>';
200
+                } else {
201
+                                            echo '<option value="'.$category['id'].'">'.$category['name'].'</option>';
202
+                    }
202 203
             }
203 204
         }
204 205
             ?>
@@ -222,7 +223,10 @@  discard block
 block discarded – undo
222 223
     <?php
223 224
     foreach ($rows_session as $enreg) {
224 225
     ?>
225
-        <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'], ENT_QUOTES).'"'; if (in_array($enreg['id'], $CourseList)) echo 'selected="selected"'; ?>><?php echo $enreg['name']; ?></option>
226
+        <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'], ENT_QUOTES).'"'; if (in_array($enreg['id'], $CourseList)) {
227
+    echo 'selected="selected"';
228
+}
229
+?>><?php echo $enreg['name']; ?></option>
226 230
     <?php } ?>
227 231
     </select></div>
228 232
 <?php unset($nosessionCourses); ?>
@@ -244,7 +248,10 @@  discard block
 block discarded – undo
244 248
   <select id='destination' name="SessionCategoryList[]" multiple="multiple" size="20" style="width:320px;">
245 249
     <?php
246 250
     foreach ($rows_category_session as $enreg) { ?>
247
-        <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'], ENT_QUOTES).'"'; if (in_array($enreg['id'], $CourseList)) echo 'selected="selected"'; ?>><?php echo $enreg['name']; ?></option>
251
+        <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'], ENT_QUOTES).'"'; if (in_array($enreg['id'], $CourseList)) {
252
+    echo 'selected="selected"';
253
+}
254
+?>><?php echo $enreg['name']; ?></option>
248 255
     <?php } ?>
249 256
   </select></td>
250 257
 </tr>
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,13 +92,13 @@
 block discarded – undo
92 92
 
93 93
     if ($categoryId != 0 && count($sessionCategoryList) > 0) {
94 94
         // Removing all
95
-        $sql = "UPDATE $tbl_session SET session_category_id = NULL WHERE session_category_id = $categoryId";
95
+        $sql = "update $tbl_session SET session_category_id = NULL WHERE session_category_id = $categoryId";
96 96
         Database::query($sql);
97 97
         // Adding new
98 98
         $sessionCategoryList = array_map('intval', $sessionCategoryList);
99 99
         $session_id = join(',', $sessionCategoryList);
100 100
 
101
-        $sql = "UPDATE $tbl_session SET session_category_id = $categoryId WHERE id in ($session_id) ";
101
+        $sql = "update $tbl_session SET session_category_id = $categoryId WHERE id in ($session_id) ";
102 102
         Database::query($sql);
103 103
         header('Location: add_many_session_to_category.php?id_category='.$categoryId.'&msg=ok');
104 104
         exit;
Please login to merge, or discard this patch.
plugin/search_course/lib/register_course_widget.class.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     /**
58 58
      * Handle the subscribe action.
59 59
      *
60
-     * @return bool
60
+     * @return null|boolean
61 61
      */
62 62
     function action_subscribe_user()
63 63
     {
Please login to merge, or discard this patch.
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -62,26 +62,22 @@  discard block
 block discarded – undo
62 62
     function action_subscribe_user()
63 63
     {
64 64
         $action = self::get('action');
65
-        if ($action != self::ACTION_SUBSCRIBE)
66
-        {
65
+        if ($action != self::ACTION_SUBSCRIBE) {
67 66
             return false;
68 67
         }
69 68
 
70 69
         $course_code = self::post(self::PARAM_SUBSCRIBE);
71
-        if (empty($course_code))
72
-        {
70
+        if (empty($course_code)) {
73 71
             return false;
74 72
         }
75 73
 
76 74
         $registration_code = self::post(self::PARAM_PASSCODE);
77 75
 
78
-        if ($this->subscribe_user($course_code, $registration_code))
79
-        {
76
+        if ($this->subscribe_user($course_code, $registration_code)) {
80 77
             echo Display::return_message(get_lang('EnrollToCourseSuccessful'), 'confirmation');
81 78
             return;
82 79
         }
83
-        if (!empty($registration_code))
84
-        {
80
+        if (!empty($registration_code)) {
85 81
             echo Display::return_message(get_lang('CourseRegistrationCodeIncorrect'), 'error');
86 82
         }
87 83
         $this->display_form($course_code);
@@ -101,13 +97,11 @@  discard block
 block discarded – undo
101 97
     {
102 98
         $course = api_get_course_info($course_code);
103 99
         $course_regisration_code = $course['registration_code'];
104
-        if (!empty($course_regisration_code) && $registration_code != $course_regisration_code)
105
-        {
100
+        if (!empty($course_regisration_code) && $registration_code != $course_regisration_code) {
106 101
             return false;
107 102
         }
108 103
 
109
-        if (empty($user_id))
110
-        {
104
+        if (empty($user_id)) {
111 105
             global $_user;
112 106
             $user_id = $_user['user_id'];
113 107
         }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
             <input type="hidden" name="subscribe" value="$course_code" />
142 142
             <input type="text" name="course_registration_code" value="$registration_code" />
143 143
             <input type="Submit" name="submit_course_registration_code" value="OK" alt="$submit_registration_code_label" /></form>
144
-EOT;
144
+eot;
145 145
         echo $result;
146 146
     }
147 147
 }
Please login to merge, or discard this patch.
main/inc/lib/table_sort.class.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
      * @param string $direction The direction to sort (SORT_ASC (default) orSORT_DESC)
82 82
      * @param array $column_show The columns that we will show in the table i.e: $column_show = array('1','0','1') we will show the 1st and the 3th column.
83 83
      * @param array $column_order Changes how the columns will be sorted ie. $column_order = array('0','3','2','3') The column [1] will be sorted like the column [3]
84
-     * @param constant $type How should data be sorted (SORT_REGULAR, SORT_NUMERIC, SORT_STRING, SORT_DATE, SORT_IMAGE)
84
+     * @param integer $type How should data be sorted (SORT_REGULAR, SORT_NUMERIC, SORT_STRING, SORT_DATE, SORT_IMAGE)
85 85
      * @return array The sorted dataset
86 86
      * @author [email protected]
87 87
      */
Please login to merge, or discard this patch.
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -16,15 +16,15 @@
 block discarded – undo
16 16
 class TableSort
17 17
 {
18 18
     /**
19
-    * Sorts 2-dimensional table.
20
-    * @param array $data The data to be sorted.
21
-    * @param int $column The column on which the data should be sorted (default = 0)
22
-    * @param int $direction The direction to sort (SORT_ASC (default) or SORT_DESC)
23
-    * @param int $type How should data be sorted (SORT_REGULAR, SORT_NUMERIC,
24
-    * SORT_STRING,SORT_DATE,SORT_IMAGE)
25
-    * @return array The sorted dataset
26
-    * @author [email protected]
27
-    */
19
+     * Sorts 2-dimensional table.
20
+     * @param array $data The data to be sorted.
21
+     * @param int $column The column on which the data should be sorted (default = 0)
22
+     * @param int $direction The direction to sort (SORT_ASC (default) or SORT_DESC)
23
+     * @param int $type How should data be sorted (SORT_REGULAR, SORT_NUMERIC,
24
+     * SORT_STRING,SORT_DATE,SORT_IMAGE)
25
+     * @return array The sorted dataset
26
+     * @author [email protected]
27
+     */
28 28
     public static function sort_table(
29 29
         $data,
30 30
         $column = 0,
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/Utils/ChamiloApi.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
     /**
134 134
      * Like strip_tags(), but leaves an additional space and removes only the given tags
135 135
      * @param string $string
136
-     * @param array $tags Tags to be removed
136
+     * @param string[] $tags Tags to be removed
137 137
      * @return  string The original string without the given tags
138 138
      */
139 139
     public static function stripGivenTags($string, $tags)
Please login to merge, or discard this patch.