Completed
Push — master ( f173a6...4a27fe )
by Angel Fernando Quiroz
37:49 queued 04:39
created
main/lp/openoffice_document.class.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -186,9 +186,9 @@
 block discarded – undo
186 186
 
187 187
     /**
188 188
      * Get images files from remote host (with webservices)
189
-     * @param   array $file current ppt file details
189
+     * @param   string $file current ppt file details
190 190
      * @param   string  $size The expected final size of the rendered slides
191
-     * @return  array images files
191
+     * @return  string images files
192 192
      */
193 193
     private function _get_remote_ppt2lp_files($file, $size = null)
194 194
     {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         // Create the directory
54 54
         $result = $this->generate_lp_folder($_course, $this->file_name);
55 55
 
56
-         // Create the directory
56
+            // Create the directory
57 57
         $this->base_work_dir = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
58 58
         ///learning_path/ppt_dirname directory
59 59
         $this->created_dir = $result['dir'];
Please login to merge, or discard this patch.
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -103,7 +103,8 @@  discard block
 block discarded – undo
103 103
             //var_dump( $this->base_work_dir.$this->created_dir.$this->file_path);
104 104
             $perm = api_get_setting('permissions_for_new_files');
105 105
 
106
-            if (IS_WINDOWS_OS) { // IS_WINDOWS_OS has been defined in main_api.lib.php
106
+            if (IS_WINDOWS_OS) {
107
+// IS_WINDOWS_OS has been defined in main_api.lib.php
107 108
                 $converter_path = str_replace('/', '\\', api_get_path(SYS_PATH).'main/inc/lib/ppt2png');
108 109
                 $class_path = $converter_path.';'.$converter_path.'/jodconverter-2.2.2.jar;'.$converter_path.'/jodconverter-cli-2.2.2.jar';
109 110
                 //$cmd = 'java -cp "'.$class_path.'" DokeosConverter';
@@ -130,7 +131,8 @@  discard block
 block discarded – undo
130 131
             $return = 0;
131 132
             $shell = exec($cmd, $files, $return);
132 133
 
133
-            if ($return != 0) { // If the java application returns an error code.
134
+            if ($return != 0) {
135
+// If the java application returns an error code.
134 136
                 switch ($return) {
135 137
                     case 1:
136 138
                         // Can't connect to openoffice.
@@ -285,7 +287,8 @@  discard block
 block discarded – undo
285 287
         }
286 288
 
287 289
         if ($ppt2lpHost == 'localhost') {
288
-            if (IS_WINDOWS_OS) { // IS_WINDOWS_OS has been defined in main_api.lib.php
290
+            if (IS_WINDOWS_OS) {
291
+// IS_WINDOWS_OS has been defined in main_api.lib.php
289 292
                 $converterPath = str_replace('/', '\\', api_get_path(SYS_PATH).'main/inc/lib/ppt2png');
290 293
                 $classPath = $converterPath.';'.$converterPath.'/jodconverter-2.2.2.jar;'.$converterPath.'/jodconverter-cli-2.2.2.jar';
291 294
                 $cmd = 'java -Dfile.encoding=UTF-8 -jar "'.$classPath.'/jodconverter-2.2.2.jar"';
@@ -312,7 +315,8 @@  discard block
 block discarded – undo
312 315
             @chown($this->base_work_dir.'/'.$this->created_dir, 'www-data');
313 316
             @chmod($this->base_work_dir.'/'.$this->created_dir, $permissionFile);
314 317
 
315
-            if ($return != 0) { // If the java application returns an error code.
318
+            if ($return != 0) {
319
+// If the java application returns an error code.
316 320
                 switch ($return) {
317 321
                     case 1:
318 322
                         // Can't connect to openoffice.
Please login to merge, or discard this patch.
main/exercise/hotpotatoes_exercise_report.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 }
45 45
 
46 46
 if (!$is_allowedToEdit) {
47
-   // api_not_allowed();
47
+    // api_not_allowed();
48 48
 }
49 49
 
50 50
 if (!empty($_REQUEST['path'])) {
@@ -189,8 +189,8 @@  discard block
 block discarded – undo
189 189
         get_lang('Actions')
190 190
     );
191 191
 
192
-  // Column config
193
-  // @todo fix search firstname/lastname that doesn't work. rmove search for the moment
192
+    // Column config
193
+    // @todo fix search firstname/lastname that doesn't work. rmove search for the moment
194 194
     $column_model = array(
195 195
         array('name' => 'firstname', 'index' => 'firstname', 'width' => '50', 'align' => 'left', 'search' => 'false'),
196 196
         array(
Please login to merge, or discard this patch.
main/lp/learnpathItem.class.php 3 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1869,7 +1869,7 @@  discard block
 block discarded – undo
1869 1869
 
1870 1870
     /**
1871 1871
      * Get the extra terms (tags) that identify this item
1872
-     * @return mixed
1872
+     * @return string
1873 1873
      */
1874 1874
     public function get_terms()
1875 1875
     {
@@ -2069,7 +2069,7 @@  discard block
 block discarded – undo
2069 2069
 
2070 2070
     /**
2071 2071
      * Opens/launches the item. Initialises runtime values.
2072
-     * @return    boolean    True on success, false on failure.
2072
+     * @return    boolean|null    True on success, false on failure.
2073 2073
      */
2074 2074
     public function open($allow_new_attempt = false)
2075 2075
     {
@@ -3504,7 +3504,7 @@  discard block
 block discarded – undo
3504 3504
 
3505 3505
     /**
3506 3506
      * Checks if the current status is part of the list of status given
3507
-     * @param  array  $list  An array of status to check for.
3507
+     * @param  string[]  $list  An array of status to check for.
3508 3508
      * If the current status is one of the strings, return true
3509 3509
      *
3510 3510
      * @return boolean True if the status was one of the given strings,
@@ -3681,7 +3681,7 @@  discard block
 block discarded – undo
3681 3681
     /**
3682 3682
      * Write objectives to DB. This method is separate from write_to_db() because otherwise
3683 3683
      * objectives are lost as a side effect to AJAX and session concurrent access
3684
-     * @return    boolean        True or false on error
3684
+     * @return    boolean|null        True or false on error
3685 3685
      */
3686 3686
     public function write_objectives_to_db()
3687 3687
     {
@@ -4322,7 +4322,7 @@  discard block
 block discarded – undo
4322 4322
      * Removes the relation between the current item and an audio file. The file
4323 4323
      * is only removed from the lp_item table, but remains in the document table
4324 4324
      * and directory
4325
-     * @return bool
4325
+     * @return false|null
4326 4326
      */
4327 4327
     public function remove_audio()
4328 4328
     {
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -752,7 +752,8 @@  discard block
 block discarded – undo
752 752
     public function get_lesson_mode()
753 753
     {
754 754
         $mode = 'normal';
755
-        if ($this->get_prevent_reinit() != 0) { // If prevent_reinit == 0
755
+        if ($this->get_prevent_reinit() != 0) {
756
+// If prevent_reinit == 0
756 757
             $my_status = $this->get_status();
757 758
             if ($my_status != $this->possible_status[0]
758 759
                     && $my_status != $this->possible_status[1]) {
@@ -2044,11 +2045,13 @@  discard block
 block discarded – undo
2044 2045
         $restart = 1;
2045 2046
         $mystatus = $this->get_status(true);
2046 2047
         if ($this->get_prevent_reinit() > 0
2047
-        ) { // If prevent_reinit == 1 (or more)
2048
+        ) {
2049
+// If prevent_reinit == 1 (or more)
2048 2050
             // If status is not attempted or incomplete, authorize retaking (of the same) anyway. Otherwise:
2049 2051
             if ($mystatus != $this->possible_status[0] && $mystatus != $this->possible_status[1]) {
2050 2052
                 $restart = -1;
2051
-            } else { //status incompleted or not attempted
2053
+            } else {
2054
+//status incompleted or not attempted
2052 2055
                 $restart = 0;
2053 2056
             }
2054 2057
         } else {
@@ -2989,7 +2992,8 @@  discard block
 block discarded – undo
2989 2992
                     // Do nothing, just let the local attributes be used.
2990 2993
                 }
2991 2994
             }
2992
-        } else { // If not SCO, such messages should not be expected.
2995
+        } else {
2996
+// If not SCO, such messages should not be expected.
2993 2997
             $type = strtolower($this->type);
2994 2998
             switch ($type) {
2995 2999
                 case 'asset':
@@ -3429,8 +3433,7 @@  discard block
 block discarded – undo
3429 3433
         }
3430 3434
         if ($scorm_time == '0'
3431 3435
                 and ($this->type != 'sco')
3432
-                and $this->current_start_time != 0)
3433
-        {
3436
+                and $this->current_start_time != 0) {
3434 3437
             $my_time = time() - $this->current_start_time;
3435 3438
             if ($my_time > 0) {
3436 3439
                 $this->update_time($my_time);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -3386,7 +3386,7 @@  discard block
 block discarded – undo
3386 3386
 
3387 3387
         // TODO: Validate csv string.
3388 3388
         $terms = Database::escape_string(api_htmlentities($new_terms_string, ENT_QUOTES, $charset));
3389
-        $sql = "UPDATE $lp_item
3389
+        $sql = "update $lp_item
3390 3390
                 SET terms = '$terms'
3391 3391
                 WHERE
3392 3392
                     c_id = $course_id AND
@@ -3653,7 +3653,7 @@  discard block
 block discarded – undo
3653 3653
         if ($this->seriousgame_mode != 1 ||
3654 3654
             !in_array($row['status'], $case_completed)
3655 3655
         ) {
3656
-            $sql = "UPDATE $item_view_table
3656
+            $sql = "update $item_view_table
3657 3657
                       SET total_time = '$total_time'
3658 3658
                     WHERE 
3659 3659
                         c_id = $course_id AND 
@@ -3733,7 +3733,7 @@  discard block
 block discarded – undo
3733 3733
                         // Update (or don't).
3734 3734
                         $iva_row = Database::fetch_array($iva_res);
3735 3735
                         $iva_id = $iva_row[0];
3736
-                        $ivau_sql = "UPDATE $iva_table ".
3736
+                        $ivau_sql = "update $iva_table ".
3737 3737
                             "SET objective_id = '".Database::escape_string($objective[0])."',".
3738 3738
                             "status = '".Database::escape_string($objective[1])."',".
3739 3739
                             "score_raw = '".Database::escape_string($objective[2])."',".
@@ -3756,7 +3756,7 @@  discard block
 block discarded – undo
3756 3756
 
3757 3757
                         $insertId = Database::insert($iva_table, $params);
3758 3758
 
3759
-                        $sql = "UPDATE $iva_table SET id = iid WHERE iid = $insertId";
3759
+                        $sql = "update $iva_table SET id = iid WHERE iid = $insertId";
3760 3760
                         Database::query($sql);
3761 3761
                     }
3762 3762
                 }
@@ -3862,7 +3862,7 @@  discard block
 block discarded – undo
3862 3862
                 $this->db_item_view_id = Database::insert($item_view_table, $params);
3863 3863
 
3864 3864
                 if ($this->db_item_view_id) {
3865
-                    $sql = "UPDATE $item_view_table SET id = iid
3865
+                    $sql = "update $item_view_table SET id = iid
3866 3866
                             WHERE iid = ".$this->db_item_view_id;
3867 3867
                     Database::query($sql);
3868 3868
                     $inserted = true;
@@ -3911,7 +3911,7 @@  discard block
 block discarded – undo
3911 3911
                 $this->db_item_view_id = Database::insert($item_view_table, $params);
3912 3912
 
3913 3913
                 if ($this->db_item_view_id) {
3914
-                    $sql = "UPDATE $item_view_table SET id = iid
3914
+                    $sql = "update $item_view_table SET id = iid
3915 3915
                             WHERE iid = ".$this->db_item_view_id;
3916 3916
                     Database::query($sql);
3917 3917
                 }
@@ -4058,7 +4058,7 @@  discard block
 block discarded – undo
4058 4058
                         //IF scorm scorm_update_time has already updated total_time in db
4059 4059
                         //" . //start_time = ".$this->get_current_start_time().", " . //scorm_init_time does it
4060 4060
                         ////" max_time_allowed = '".$this->get_max_time_allowed()."'," .
4061
-                        $sql = "UPDATE $item_view_table SET
4061
+                        $sql = "update $item_view_table SET
4062 4062
                                     score = ".$this->get_score().",
4063 4063
                                     $my_status
4064 4064
                                     max_score = '".$this->get_max()."',
@@ -4072,7 +4072,7 @@  discard block
 block discarded – undo
4072 4072
 
4073 4073
                     } else {
4074 4074
                         //" max_time_allowed = '".$this->get_max_time_allowed()."'," .
4075
-                        $sql = "UPDATE $item_view_table SET
4075
+                        $sql = "update $item_view_table SET
4076 4076
                                     $total_time
4077 4077
                                     start_time = ".$this->get_current_start_time().",
4078 4078
                                     score = " . $this->get_score().",
@@ -4198,7 +4198,7 @@  discard block
 block discarded – undo
4198 4198
 
4199 4199
                             $insertId = Database::insert($iva_table, $params);
4200 4200
                             if ($insertId) {
4201
-                                $sql = "UPDATE $iva_table SET id = iid
4201
+                                $sql = "update $iva_table SET id = iid
4202 4202
                                         WHERE iid = $insertId";
4203 4203
                                 Database::query($sql);
4204 4204
                             }
@@ -4284,7 +4284,7 @@  discard block
 block discarded – undo
4284 4284
 
4285 4285
             // Store the mp3 file in the lp_item table.
4286 4286
             $tbl_lp_item = Database::get_course_table(TABLE_LP_ITEM);
4287
-            $sql = "UPDATE $tbl_lp_item SET
4287
+            $sql = "update $tbl_lp_item SET
4288 4288
                         audio = '".Database::escape_string($file_path)."'
4289 4289
                     WHERE
4290 4290
                         c_id = {$course_info['real_id']} AND
@@ -4312,7 +4312,7 @@  discard block
 block discarded – undo
4312 4312
             $file_path = basename($document_data['path']);
4313 4313
             // Store the mp3 file in the lp_item table.
4314 4314
             $tbl_lp_item = Database::get_course_table(TABLE_LP_ITEM);
4315
-            $sql = "UPDATE $tbl_lp_item SET
4315
+            $sql = "update $tbl_lp_item SET
4316 4316
                         audio = '".Database::escape_string($file_path)."'
4317 4317
                     WHERE
4318 4318
                         c_id = {$course_info['real_id']} AND
@@ -4335,7 +4335,7 @@  discard block
 block discarded – undo
4335 4335
         if (empty($this->db_id)) {
4336 4336
             return false;
4337 4337
         }
4338
-        $sql = "UPDATE $tbl_lp_item SET
4338
+        $sql = "update $tbl_lp_item SET
4339 4339
                 audio = ''
4340 4340
                 WHERE c_id = $course_id AND id IN (".$this->db_id.")";
4341 4341
         Database::query($sql);
Please login to merge, or discard this patch.
main/lp/lp_edit.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -178,8 +178,8 @@
 block discarded – undo
178 178
 );
179 179
 $display_date = 'none';
180 180
 if (!empty($expired_on)) {
181
-	$display_date = 'block';
182
-	$defaults['activate_end_date_check'] = 1;
181
+    $display_date = 'block';
182
+    $defaults['activate_end_date_check'] = 1;
183 183
 }
184 184
 
185 185
 $form->addElement('html', '<div id="end_date_div" style="display:'.$display_date.';">');
Please login to merge, or discard this patch.
app/SymfonyRequirements.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -238,7 +238,7 @@
 block discarded – undo
238 238
      * Adds an optional recommendation in form of a php.ini configuration.
239 239
      *
240 240
      * @param string        $cfgName           The configuration name used for ini_get()
241
-     * @param bool|callback $evaluation        Either a boolean indicating whether the configuration should evaluate to true or false,
241
+     * @param string|false $evaluation        Either a boolean indicating whether the configuration should evaluate to true or false,
242 242
      *                                         or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
243 243
      * @param bool          $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
244 244
      *                                         This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Entity/SkillRelSkill.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -52,6 +52,7 @@
 block discarded – undo
52 52
     /**
53 53
      * Set id
54 54
      *
55
+     * @param integer $id
55 56
      * @return integer
56 57
      */
57 58
     public function setId($id)
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/EventListener/LogoutSuccessHandler.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     /**
25 25
      * @param UrlGeneratorInterface $urlGenerator
26 26
      * @param AuthorizationChecker $checker
27
-     * @param Storage $storage
27
+     * @param TokenStorage $storage
28 28
      */
29 29
     public function __construct(
30 30
         UrlGeneratorInterface $urlGenerator,
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
                 LIMIT 0,1";
63 63
         $row = Database::query($sql);
64 64
         $loginId = null;
65
-        if (Database::num_rows($row)>0) {
65
+        if (Database::num_rows($row) > 0) {
66 66
             $loginId = Database::result($row, 0, "login_id");
67 67
         }
68 68
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
         $online_table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ONLINE);
79 79
 
80
-        $query = "DELETE FROM " . $online_table . " WHERE login_user_id = $userId";
80
+        $query = "DELETE FROM ".$online_table." WHERE login_user_id = $userId";
81 81
         Database::query($query);
82 82
 
83 83
         /*require_once api_get_path(SYS_PATH) . 'main/chat/chat_functions.lib.php';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
         $loginAs = $this->checker->isGranted('ROLE_PREVIOUS_ADMIN');
70 70
         if (!$loginAs) {
71 71
             $current_date = api_get_utc_datetime();
72
-            $sql = "UPDATE $tbl_track_login
72
+            $sql = "update $tbl_track_login
73 73
                     SET logout_date='".$current_date."'
74 74
         		    WHERE login_id='$loginId'";
75 75
             Database::query($sql);
Please login to merge, or discard this patch.
src/Chamilo/ContactBundle/Entity/Category.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,9 +43,9 @@
 block discarded – undo
43 43
         return $this->proxyCurrentLocaleTranslation($method, $arguments);
44 44
     }
45 45
 
46
-     /**
47
-     * @return string
48
-     */
46
+        /**
47
+         * @return string
48
+         */
49 49
     public function __toString()
50 50
     {
51 51
         return (string) $this->getName();
Please login to merge, or discard this patch.
main/gradebook/lib/fe/dataform.class.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -8,19 +8,19 @@
 block discarded – undo
8 8
  */
9 9
 class DataForm extends FormValidator
10 10
 {
11
-	const TYPE_IMPORT = 1;
12
-	const TYPE_EXPORT = 2;
13
-	const TYPE_EXPORT_PDF = 3;
11
+    const TYPE_IMPORT = 1;
12
+    const TYPE_EXPORT = 2;
13
+    const TYPE_EXPORT_PDF = 3;
14 14
 
15
-	/**
16
-	 * Builds a form containing form items based on a given parameter
17
-	 * @param int form_type 1=import, 2=export
18
-	 * @param obj cat_obj the category object
19
-	 * @param obj res_obj the result object
20
-	 * @param string form name
21
-	 * @param method
22
-	 * @param action
23
-	 */
15
+    /**
16
+     * Builds a form containing form items based on a given parameter
17
+     * @param int form_type 1=import, 2=export
18
+     * @param obj cat_obj the category object
19
+     * @param obj res_obj the result object
20
+     * @param string form name
21
+     * @param method
22
+     * @param action
23
+     */
24 24
     public function __construct($form_type, $form_name, $method = 'post', $action = null, $target = '', $locked_status)
25 25
     {
26 26
         parent:: __construct($form_name, $method, $action, $target);
Please login to merge, or discard this patch.