Passed
Push — 1.10.x ( 2674ce...55c17b )
by Angel Fernando Quiroz
365:02 queued 317:33
created
main/dropbox/dropbox_functions.inc.php 1 patch
Doc Comments   +8 added lines, -7 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
 /**
24 24
 * This function is a wrapper function for the multiple actions feature.
25
-* @return   Mixed   If there is a problem, return a string message, otherwise nothing
25
+* @return   string|null   If there is a problem, return a string message, otherwise nothing
26 26
 * @author   Patrick Cool <[email protected]>, Ghent University
27 27
 * @version  march 2006
28 28
 */
@@ -209,9 +209,9 @@  discard block
 block discarded – undo
209 209
 *
210 210
 * @param $id the id of the file we are moving
211 211
 * @param $target the id of the folder we are moving to
212
-* @param $part are we moving a received file or a sent file?
212
+* @param string $part are we moving a received file or a sent file?
213 213
 *
214
-* @return language string
214
+* @return string string
215 215
 *
216 216
 * @author Patrick Cool <[email protected]>, Ghent University
217 217
 * @version march 2006
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 * @param $id the unique id of the file
291 291
 * @param $part are we dealing with a sent or with a received file?
292 292
 *
293
-* @return html code
293
+* @return string code
294 294
 *
295 295
 * @author Patrick Cool <[email protected]>, Ghent University
296 296
 * @version march 2006
@@ -786,6 +786,7 @@  discard block
 block discarded – undo
786 786
 }
787 787
 
788 788
 /**
789
+* @param string $user_id
789 790
 * @return boolean indicating if user with user_id=$user_id is a course member
790 791
 * @todo check if this function is still necessary. There might be a library function for this.
791 792
 */
@@ -1147,7 +1148,7 @@  discard block
 block discarded – undo
1147 1148
 /**
1148 1149
 * This function returns the html code to display the feedback messages on a given dropbox file
1149 1150
 * @param $feedback_array an array that contains all the feedback messages about the given document.
1150
-* @return html code
1151
+* @return string code
1151 1152
 * @todo add the form for adding new comment (if the other party has not deleted it yet).
1152 1153
 *
1153 1154
 * @author Patrick Cool <[email protected]>, Ghent University
@@ -1164,7 +1165,7 @@  discard block
 block discarded – undo
1164 1165
 
1165 1166
 /**
1166 1167
 * this function returns the code for the form for adding a new feedback message to a dropbox file.
1167
-* @return html code
1168
+* @return string code
1168 1169
 *
1169 1170
 * @author Patrick Cool <[email protected]>, Ghent University
1170 1171
 * @version march 2006
@@ -1225,7 +1226,7 @@  discard block
 block discarded – undo
1225 1226
 }
1226 1227
 
1227 1228
 /**
1228
-* @return a language string (depending on the success or failure.
1229
+* @return string language string (depending on the success or failure.
1229 1230
 *
1230 1231
 * @author Patrick Cool <[email protected]>, Ghent University
1231 1232
 * @version march 2006
Please login to merge, or discard this patch.
main/coursecopy/classes/CourseRestorer.class.php 1 patch
Doc Comments   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
     /**
86 86
      * CourseRestorer constructor.
87
-     * @param array $course
87
+     * @param Course $course
88 88
      */
89 89
     public function __construct($course)
90 90
     {
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * @param int	    $session_id
134 134
 	 * @param bool	    $update_course_settings Course settings are going to be restore?
135 135
      * @param bool      $respect_base_content
136
-     * @return bool
136
+     * @return false|null
137 137
 	 */
138 138
     public function restore(
139 139
         $destination_course_code = '',
@@ -1154,6 +1154,7 @@  discard block
 block discarded – undo
1154 1154
 
1155 1155
 	/**
1156 1156
 	 * Restore a forum-topic
1157
+	 * @param false|string $forum_id
1157 1158
 	 */
1158 1159
     public function restore_topic($thread_id, $forum_id, $sessionId = 0)
1159 1160
     {
@@ -1210,6 +1211,7 @@  discard block
 block discarded – undo
1210 1211
 	/**
1211 1212
 	 * Restore a forum-post
1212 1213
 	 * @TODO Restore tree-structure of posts. For example: attachments to posts.
1214
+	 * @param false|string $topic_id
1213 1215
 	 */
1214 1216
     public function restore_post($id, $topic_id, $forum_id, $sessionId = 0)
1215 1217
     {
@@ -2307,6 +2309,7 @@  discard block
 block discarded – undo
2307 2309
 
2308 2310
 	/**
2309 2311
 	 * Check availability of a survey code
2312
+	 * @param string $survey_code
2310 2313
 	 */
2311 2314
     public function is_survey_code_available($survey_code)
2312 2315
     {
@@ -2321,6 +2324,7 @@  discard block
 block discarded – undo
2321 2324
 
2322 2325
 	/**
2323 2326
 	 * Restore survey-questions
2327
+	 * @param string $survey_id
2324 2328
 	 */
2325 2329
     public function restore_survey_question($id, $survey_id)
2326 2330
     {
@@ -2777,6 +2781,8 @@  discard block
 block discarded – undo
2777 2781
     * @param string The path origin
2778 2782
     * @param string The path destination
2779 2783
     * @param boolean Option Overwrite
2784
+    * @param string $source
2785
+    * @param string $dest
2780 2786
     * @return void()
2781 2787
     * @deprecated
2782 2788
     */
Please login to merge, or discard this patch.
main/admin/user_list.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -288,7 +288,7 @@
 block discarded – undo
288 288
  * This function defines globals.
289 289
  * @param  int $userId
290 290
  *
291
- * @return bool    False on failure, redirection on success
291
+ * @return false|null    False on failure, redirection on success
292 292
  * @author Evie Embrechts
293 293
  * @author Yannick Warnier <[email protected]>
294 294
 */
Please login to merge, or discard this patch.
main/inc/lib/career.lib.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 
85 85
     /**
86 86
      * Available driver list.
87
-     * @return array
87
+     * @return string[]
88 88
      */
89 89
     private function getDefaultDriverList()
90 90
     {
Please login to merge, or discard this patch.
main/auth/shibboleth/app/view/shibboleth_display.class.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -27,6 +27,9 @@  discard block
 block discarded – undo
27 27
         return $result;
28 28
     }
29 29
 
30
+    /**
31
+     * @param string $message
32
+     */
30 33
     public function error_page($message)
31 34
     {
32 35
         $page_title = get_lang('ShibbolethLogin');
@@ -37,6 +40,9 @@  discard block
 block discarded – undo
37 40
         die;
38 41
     }
39 42
     
43
+    /**
44
+     * @param string $message
45
+     */
40 46
     public function message_page($message, $title = '')
41 47
     {
42 48
         $title = $title ? $title : get_lang('ShibbolethLogin');
Please login to merge, or discard this patch.
main/inc/lib/message.lib.php 1 patch
Doc Comments   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -639,6 +639,8 @@  discard block
 block discarded – undo
639 639
      * @param  int	message id
640 640
      * @param  int	message user id (receiver user id or sender user id)
641 641
      * @param  int	group id (optional)
642
+     * @param integer $message_id
643
+     * @param integer $message_uid
642 644
      * @return void
643 645
      */
644 646
     public static function delete_message_attachment_file($message_id, $message_uid, $group_id = 0)
@@ -683,7 +685,7 @@  discard block
 block discarded – undo
683 685
      * update messages by user id and message id
684 686
      * @param  int		$user_id
685 687
      * @param  int		$message_id
686
-     * @return resource
688
+     * @return false|null
687 689
      */
688 690
     public static function update_message($user_id, $message_id)
689 691
     {
@@ -703,7 +705,7 @@  discard block
 block discarded – undo
703 705
      * @param int $user_id
704 706
      * @param int $message_id
705 707
      * @param string $type
706
-     * @return bool
708
+     * @return false|null
707 709
      */
708 710
     public static function update_message_status($user_id, $message_id,$type)
709 711
     {
@@ -740,6 +742,7 @@  discard block
 block discarded – undo
740 742
     /**
741 743
      * get messages by group id
742 744
      * @param  int		group id
745
+     * @param integer $group_id
743 746
      * @return array
744 747
      */
745 748
     public static function get_messages_by_group($group_id)
@@ -1477,7 +1480,7 @@  discard block
 block discarded – undo
1477 1480
      * Sort date by desc from a multi-dimensional array
1478 1481
      * @param array $array1  first array to compare
1479 1482
      * @param array $array2  second array to compare
1480
-     * @return bool
1483
+     * @return integer
1481 1484
      */
1482 1485
     public function order_desc_date($array1, $array2)
1483 1486
     {
@@ -1555,7 +1558,6 @@  discard block
 block discarded – undo
1555 1558
     /**
1556 1559
      * @param $id
1557 1560
      * @param array $params
1558
-     * @param string $display
1559 1561
      * @return string
1560 1562
      */
1561 1563
     public static function generate_invitation_form($id, $params = array())
@@ -1644,7 +1646,7 @@  discard block
 block discarded – undo
1644 1646
 
1645 1647
     /**
1646 1648
      * @param string $keyword
1647
-     * @return null|string
1649
+     * @return string
1648 1650
      */
1649 1651
     public static function outbox_display($keyword = '')
1650 1652
     {
Please login to merge, or discard this patch.
main/inc/lib/exercise_show_functions.lib.php 1 patch
Doc Comments   +37 added lines patch added patch discarded remove patch
@@ -24,6 +24,10 @@  discard block
 block discarded – undo
24 24
 	 * @param int       Question ID
25 25
      * @param int $resultsDisabled
26 26
      * @param string $originalStudentAnswer
27
+     * @param integer $feedbackType
28
+     * @param string $answer
29
+     * @param integer $id
30
+     * @param integer $questionId
27 31
 	 * @return void
28 32
 	 */
29 33
 	public static function display_fill_in_blanks_answer($feedbackType, $answer, $id, $questionId, $resultsDisabled, $originalStudentAnswer = '')
@@ -62,6 +66,10 @@  discard block
 block discarded – undo
62 66
      * @param string    Answer text
63 67
      * @param int       Exercise ID
64 68
      * @param int       Question ID
69
+     * @param integer $feedback_type
70
+     * @param string $answer
71
+     * @param integer $id
72
+     * @param integer $questionId
65 73
      * @return void
66 74
      */
67 75
     static function display_calculated_answer($feedback_type, $answer, $id, $questionId)
@@ -95,6 +103,9 @@  discard block
 block discarded – undo
95 103
 	 * @param string    Answer text
96 104
 	 * @param int       Exercise ID
97 105
 	 * @param int       Question ID
106
+	 * @param integer $feedback_type
107
+	 * @param integer $exe_id
108
+	 * @param integer $questionId
98 109
 	 * @return void
99 110
 	 */
100 111
 	static function display_free_answer($feedback_type, $answer, $exe_id, $questionId, $questionScore = null)
@@ -117,6 +128,12 @@  discard block
 block discarded – undo
117 128
         }
118 129
 	}
119 130
 
131
+	/**
132
+	 * @param integer $feedback_type
133
+	 * @param integer $id
134
+	 * @param integer $questionId
135
+	 * @param Nanogong $nano
136
+	 */
120 137
 	static function display_oral_expression_answer($feedback_type, $answer, $id, $questionId, $nano = null)
121 138
     {
122 139
         if (isset($nano)) {
@@ -234,6 +251,12 @@  discard block
 block discarded – undo
234 251
 	 * @param integer Exercise ID
235 252
 	 * @param integer Question ID
236 253
 	 * @param boolean Whether to show the answer comment or not
254
+	 * @param integer $answerType
255
+	 * @param string $answer
256
+	 * @param string $answerComment
257
+	 * @param integer $answerCorrect
258
+	 * @param integer $id
259
+	 * @param integer $questionId
237 260
 	 * @return void
238 261
 	 */
239 262
 	static function display_unique_or_multiple_answer(
@@ -318,6 +341,13 @@  discard block
 block discarded – undo
318 341
      * @param integer Exercise ID
319 342
      * @param integer Question ID
320 343
      * @param boolean Whether to show the answer comment or not
344
+     * @param integer $feedback_type
345
+     * @param integer $answerType
346
+     * @param string $answer
347
+     * @param string $answerComment
348
+     * @param integer $answerCorrect
349
+     * @param integer $id
350
+     * @param integer $questionId
321 351
      * @return void
322 352
      */
323 353
     static function display_multiple_answer_true_false(
@@ -408,6 +438,13 @@  discard block
 block discarded – undo
408 438
      * @param integer Exercise ID
409 439
      * @param integer Question ID
410 440
      * @param boolean Whether to show the answer comment or not
441
+     * @param integer $feedback_type
442
+     * @param integer $answerType
443
+     * @param string $answer
444
+     * @param string $answerComment
445
+     * @param integer $answerCorrect
446
+     * @param integer $id
447
+     * @param integer $questionId
411 448
      * @return void
412 449
      */
413 450
     static function display_multiple_answer_combination_true_false(
Please login to merge, or discard this patch.
main/inc/lib/agenda.lib.php 1 patch
Doc Comments   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
      * @param string $color
566 566
      * @param bool $addAnnouncement
567 567
      *
568
-     * @return bool
568
+     * @return null|false
569 569
      */
570 570
     public function editEvent(
571 571
         $id,
@@ -1308,6 +1308,7 @@  discard block
 block discarded – undo
1308 1308
      *
1309 1309
      * @param int $eventId
1310 1310
      * @param int $courseId
1311
+     * @param integer $sessionId
1311 1312
      * @paraù int $sessionId
1312 1313
      *
1313 1314
      * @return array
@@ -2469,6 +2470,7 @@  discard block
 block discarded – undo
2469 2470
      * Adds x weeks to a UNIX timestamp
2470 2471
      * @param   int     The timestamp
2471 2472
      * @param   int     The number of weeks to add
2473
+     * @param integer $timestamp
2472 2474
      * @return  int     The new timestamp
2473 2475
      */
2474 2476
     function addWeek($timestamp, $num = 1)
@@ -2480,6 +2482,7 @@  discard block
 block discarded – undo
2480 2482
      * Adds x months to a UNIX timestamp
2481 2483
      * @param   int     The timestamp
2482 2484
      * @param   int     The number of years to add
2485
+     * @param integer $timestamp
2483 2486
      * @return  int     The new timestamp
2484 2487
      */
2485 2488
     function addMonth($timestamp, $num = 1)
@@ -2498,6 +2501,7 @@  discard block
 block discarded – undo
2498 2501
      * Adds x years to a UNIX timestamp
2499 2502
      * @param   int     The timestamp
2500 2503
      * @param   int     The number of years to add
2504
+     * @param integer $timestamp
2501 2505
      * @return  int     The new timestamp
2502 2506
      */
2503 2507
     function addYear($timestamp, $num = 1)
@@ -2697,7 +2701,7 @@  discard block
 block discarded – undo
2697 2701
     /**
2698 2702
      * @param array $courseInfo
2699 2703
      * @param $file
2700
-     * @return array|bool|string
2704
+     * @return false|string
2701 2705
      */
2702 2706
     public function importEventFile($courseInfo, $file)
2703 2707
     {
@@ -2810,7 +2814,7 @@  discard block
 block discarded – undo
2810 2814
 
2811 2815
     /**
2812 2816
      * Parse filter turns USER:12 to ['users' => [12])] or G:1 ['groups' => [1]]
2813
-     * @param $filter
2817
+     * @param integer $filter
2814 2818
      * @return array
2815 2819
      */
2816 2820
     public function parseAgendaFilter($filter)
@@ -3324,6 +3328,7 @@  discard block
 block discarded – undo
3324 3328
      * @param	int		user ID of the user
3325 3329
      * @param	string	Optional start date in datetime format (if no start date is given, uses today)
3326 3330
      * @param	string	Optional end date in datetime format (if no date is given, uses one year from now)
3331
+     * @param integer $user_id
3327 3332
      * @return	array	Array of events ordered by start date, in
3328 3333
      * [0]('datestart','dateend','title'),[1]('datestart','dateend','title','link','coursetitle') format,
3329 3334
      * where datestart and dateend are in yyyyMMddhhmmss format.
Please login to merge, or discard this patch.
main/inc/lib/api.lib.php 1 patch
Doc Comments   +50 added lines, -23 removed lines patch added patch discarded remove patch
@@ -575,7 +575,6 @@  discard block
 block discarded – undo
575 575
  * Also, this function provides conversion between path types, in this case the input path points inside the Chamilo area too.
576 576
  *
577 577
  * See $_configuration['course_folder'] in the configuration.php to alter the WEB_COURSE_PATH and SYS_COURSE_PATH parameters.
578
- * @param string $type              The requested path type (a defined constant), see the examples.
579 578
  * @param string $path (optional)   A path which type is to be converted. Also, it may be a defined constant for a path.
580 579
  * This parameter has meaning when $type parameter has one of the following values: TO_WEB, TO_SYS, TO_REL. Otherwise it is ignored.
581 580
  * @return string                   The requested path or the converted path.
@@ -1070,7 +1069,7 @@  discard block
 block discarded – undo
1070 1069
  * Checks the RFC 3986 syntax of a given URL.
1071 1070
  * @param string $url       The URL to be checked.
1072 1071
  * @param bool $absolute    Whether the URL is absolute (beginning with a scheme such as "http:").
1073
- * @return bool             Returns the URL if it is valid, FALSE otherwise.
1072
+ * @return string|false             Returns the URL if it is valid, FALSE otherwise.
1074 1073
  * This function is an adaptation from the function valid_url(), Drupal CMS.
1075 1074
  * @link http://drupal.org
1076 1075
  * Note: The built-in function filter_var($urs, FILTER_VALIDATE_URL) has a bug for some versions of PHP.
@@ -1649,6 +1648,7 @@  discard block
 block discarded – undo
1649 1648
  * Gets a course setting from the current course_setting table. Try always using integer values.
1650 1649
  * @param string    The name of the setting we want from the table
1651 1650
  * @param string    Optional: course code
1651
+ * @param string $setting_name
1652 1652
  * @return mixed    The value of that setting in that table. Return -1 if not found.
1653 1653
  */
1654 1654
 function api_get_course_setting($setting_name, $course_code = null)
@@ -1956,7 +1956,7 @@  discard block
 block discarded – undo
1956 1956
 /**
1957 1957
  * Checks a password to see wether it is OK to use.
1958 1958
  * @param string $password
1959
- * @return true if the password is acceptable, false otherwise
1959
+ * @return boolean if the password is acceptable, false otherwise
1960 1960
  * Notes about what a password "OK to use" is:
1961 1961
  * 1. The password should be at least 5 characters long.
1962 1962
  * 2. Only English letters (uppercase or lowercase, it doesn't matter) and digits are allowed.
@@ -2128,7 +2128,7 @@  discard block
 block discarded – undo
2128 2128
      * @author Hugues Peeters <[email protected]>
2129 2129
      * @param  string $failure_type - the type of failure
2130 2130
      * @global array  $api_failureList
2131
-     * @return bolean false to stay consistent with the main script
2131
+     * @return boolean false to stay consistent with the main script
2132 2132
      */
2133 2133
     static function set_failure($failure_type) {
2134 2134
         global $api_failureList;
@@ -3495,7 +3495,7 @@  discard block
 block discarded – undo
3495 3495
 /**
3496 3496
  * Gets a UNIX timestamp from a database (MySQL) datetime format string
3497 3497
  * @param $last_post_datetime standard output date in a sql query
3498
- * @return unix timestamp
3498
+ * @return integer timestamp
3499 3499
  * @author Toon Van Hoecke <[email protected]>
3500 3500
  * @version October 2003
3501 3501
  * @desc convert sql date to unix timestamp
@@ -3528,6 +3528,9 @@  discard block
 block discarded – undo
3528 3528
  * @param string    Tool (learnpath, document, etc)
3529 3529
  * @param int       The item ID in the given tool
3530 3530
  * @param int       The session ID (optional)
3531
+ * @param string $tool
3532
+ * @param integer $user_id
3533
+ * @param string $type
3531 3534
  * @return int      -1 on error, 0 if invisible, 1 if visible
3532 3535
  */
3533 3536
 function api_get_item_visibility(
@@ -3596,7 +3599,7 @@  discard block
 block discarded – undo
3596 3599
  * @param int $userId
3597 3600
  * @param int $groupId
3598 3601
  * @param int $sessionId
3599
- * @return void
3602
+ * @return false|null
3600 3603
  */
3601 3604
 function api_item_property_delete(
3602 3605
     $courseInfo,
@@ -3651,7 +3654,7 @@  discard block
 block discarded – undo
3651 3654
  * @param array $_course array with course properties
3652 3655
  * @param string $tool tool id, linked to 'rubrique' of the course tool_list (Warning: language sensitive !!)
3653 3656
  * @param int $item_id id of the item itself, linked to key of every tool ('id', ...), "*" = all items of the tool
3654
- * @param string $lastedit_type add or update action
3657
+ * @param string $last_edit_type add or update action
3655 3658
  * (1) message to be translated (in trad4all) : e.g. DocumentAdded, DocumentUpdated;
3656 3659
  * (2) "delete"
3657 3660
  * (3) "visible"
@@ -3934,6 +3937,8 @@  discard block
 block discarded – undo
3934 3937
  * @param string    tool name, linked to 'rubrique' of the course tool_list (Warning: language sensitive !!)
3935 3938
  * @param int       id of the item itself, linked to key of every tool ('id', ...), "*" = all items of the tool
3936 3939
  * @param int $session_id
3940
+ * @param string $tool
3941
+ * @param string $course_code
3937 3942
  * @return array All fields from c_item_property (all rows found) or empty array
3938 3943
  */
3939 3944
 function api_get_item_property_by_tool($tool, $course_code, $session_id = null)
@@ -4196,7 +4201,7 @@  discard block
 block discarded – undo
4196 4201
  * Displays a form (drop down menu) so the user can select his/her preferred language.
4197 4202
  * The form works with or without javascript
4198 4203
  * @param  boolean Hide form if only one language available (defaults to false = show the box anyway)
4199
- * @return void Display the box directly
4204
+ * @return null|string Display the box directly
4200 4205
  */
4201 4206
 function api_display_language_form($hide_if_no_choice = false)
4202 4207
 {
@@ -4476,6 +4481,7 @@  discard block
 block discarded – undo
4476 4481
  * and also when a user subscribes to courses (the new course is added at the end of the main category
4477 4482
  * @author Patrick Cool <[email protected]>, Ghent University
4478 4483
  * @param int $user_course_category: the id of the user_course_category
4484
+ * @param integer $user_id
4479 4485
  * @return int the value of the highest sort of the user_course_category
4480 4486
  */
4481 4487
 function api_max_sort_value($user_course_category, $user_id)
@@ -4684,6 +4690,8 @@  discard block
 block discarded – undo
4684 4690
  * @param the dest folder
4685 4691
  * @param an array of excluded file_name (without extension)
4686 4692
  * @param copied_files the returned array of copied files
4693
+ * @param string $source
4694
+ * @param string $dest
4687 4695
  */
4688 4696
 function copyr($source, $dest, $exclude = array(), $copied_files = array()) {
4689 4697
     if (empty($dest)) { return false; }
@@ -4723,6 +4731,11 @@  discard block
 block discarded – undo
4723 4731
 }
4724 4732
 
4725 4733
 // TODO: Using DIRECTORY_SEPARATOR is not recommended, this is an obsolete approach. Documentation header to be added here.
4734
+/**
4735
+ * @param string $pathname
4736
+ * @param string $base_path_document
4737
+ * @param integer $session_id
4738
+ */
4726 4739
 function copy_folder_course_session(
4727 4740
     $pathname,
4728 4741
     $base_path_document,
@@ -4808,6 +4821,9 @@  discard block
 block discarded – undo
4808 4821
 }
4809 4822
 
4810 4823
 // TODO: chmodr() is a better name. Some corrections are needed. Documentation header to be added here.
4824
+/**
4825
+ * @param string $path
4826
+ */
4811 4827
 function api_chmod_R($path, $filemode) {
4812 4828
     if (!is_dir($path)) {
4813 4829
         return chmod($path, $filemode);
@@ -4890,7 +4906,7 @@  discard block
 block discarded – undo
4890 4906
  *   version = VERSION
4891 4907
  * @endverbatim
4892 4908
  * </code>
4893
- * @param $filename
4909
+ * @param string $filename
4894 4910
  *   The file we are parsing. Accepts file with relative or absolute path.
4895 4911
  * @return
4896 4912
  *   The info array.
@@ -4982,7 +4998,7 @@  discard block
 block discarded – undo
4982 4998
 /**
4983 4999
  * Checks whether status given in parameter exists in the platform
4984 5000
  * @param mixed the status (can be either int either string)
4985
- * @return true if the status exists, else returns false
5001
+ * @return boolean if the status exists, else returns false
4986 5002
  */
4987 5003
 function api_status_exists($status_asked) {
4988 5004
     global $_status_list;
@@ -5004,7 +5020,7 @@  discard block
 block discarded – undo
5004 5020
 
5005 5021
 /**
5006 5022
  * Gets the status langvars list
5007
- * @return array the list of status with their translations
5023
+ * @return string[] the list of status with their translations
5008 5024
  */
5009 5025
 function api_get_status_langvars() {
5010 5026
     return array(
@@ -5080,6 +5096,7 @@  discard block
 block discarded – undo
5080 5096
  * @param string    The sub-variable if any (in most cases, this will remain null)
5081 5097
  * @param string    The category if any (in most cases, this will remain null)
5082 5098
  * @param int       The access_url for which this parameter is valid
5099
+ * @param string $cat
5083 5100
  */
5084 5101
 function api_set_setting($var, $value, $subvar = null, $cat = null, $access_url = 1)
5085 5102
 {
@@ -5177,6 +5194,8 @@  discard block
 block discarded – undo
5177 5194
  * @param string    Value
5178 5195
  * @param int       Access URL. Optional. Defaults to 1
5179 5196
  * @param array     Optional array of filters on field type
5197
+ * @param string $category
5198
+ * @param string $value
5180 5199
  */
5181 5200
 function api_set_settings_category($category, $value = null, $access_url = 1, $fieldtype = array())
5182 5201
 {
@@ -5420,6 +5439,10 @@  discard block
 block discarded – undo
5420 5439
  * @param string    The subkey text
5421 5440
  * @param int       The access_url for which this parameter is valid
5422 5441
  * @param int       The changeability of this setting for non-master urls
5442
+ * @param string $val
5443
+ * @param string $var
5444
+ * @param string $sk
5445
+ * @param string $c
5423 5446
  * @return boolean  true on success, false on failure
5424 5447
  */
5425 5448
 function api_add_setting($val, $var, $sk = null, $type = 'textfield', $c = null, $title = '', $com = '', $sc = null, $skt = null, $a = 1, $v = 0) {
@@ -5685,6 +5708,7 @@  discard block
 block discarded – undo
5685 5708
  * @param String the tool of the element
5686 5709
  * @param int the element id in database
5687 5710
  * @param int the session_id to compare with element session id
5711
+ * @param string $tool
5688 5712
  * @return boolean true if the element is in the session, false else
5689 5713
  */
5690 5714
 function api_is_element_in_the_session($tool, $element_id, $session_id = null) {
@@ -5730,8 +5754,6 @@  discard block
 block discarded – undo
5730 5754
  * Replaces "forbidden" characters in a filename string.
5731 5755
  *
5732 5756
  * @param string $filename
5733
- * @param int $length
5734
- * @param bool $file_name
5735 5757
  *
5736 5758
  * @return string
5737 5759
  */
@@ -5967,6 +5989,7 @@  discard block
 block discarded – undo
5967 5989
  * @link http://php.net/manual/en/function.getimagesize.php
5968 5990
  * @link http://www.dokeos.com/forum/viewtopic.php?t=12345
5969 5991
  * @link http://www.dokeos.com/forum/viewtopic.php?t=16355
5992
+ * @return integer
5970 5993
  */
5971 5994
 function api_getimagesize($path) {
5972 5995
     $image = new Image($path);
@@ -6127,6 +6150,7 @@  discard block
 block discarded – undo
6127 6150
  * with his user id and the access_url_id=1
6128 6151
  *
6129 6152
  * @author Julio Montoya
6153
+ * @param integer $user_id
6130 6154
  */
6131 6155
 function api_is_global_platform_admin($user_id = null)
6132 6156
 {
@@ -6188,7 +6212,7 @@  discard block
 block discarded – undo
6188 6212
  * @param int $admin_id_to_check
6189 6213
  * @param int  $my_user_id
6190 6214
  * @param bool $allow_session_admin
6191
- * @return bool
6215
+ * @return boolean|null
6192 6216
  */
6193 6217
 function api_protect_super_admin($admin_id_to_check, $my_user_id = null, $allow_session_admin = false)
6194 6218
 {
@@ -6430,6 +6454,7 @@  discard block
 block discarded – undo
6430 6454
 
6431 6455
 /**
6432 6456
  * Returns the <link> HTML tag
6457
+ * @param string $file
6433 6458
  */
6434 6459
 function api_get_css($file, $media = 'screen') {
6435 6460
     return '<link href="'.$file.'" rel="stylesheet" media="'.$media.'" type="text/css" />'."\n";
@@ -6567,7 +6592,8 @@  discard block
 block discarded – undo
6567 6592
  * This function relies on api_get_course_info()
6568 6593
  * @param   string  The course code - optional (takes it from session if not given)
6569 6594
  * @param   int     The session id  - optional (takes it from session if not given)
6570
- * @return  mixed   The URL of the course or null if something does not work
6595
+ * @param integer $session_id
6596
+ * @return  string|null   The URL of the course or null if something does not work
6571 6597
  * @author  Julio Montoya <[email protected]>
6572 6598
  */
6573 6599
 function api_get_course_url($course_code = null, $session_id = null)
@@ -6682,7 +6708,7 @@  discard block
 block discarded – undo
6682 6708
  * @param int       LINK_EXERCISE, LINK_STUDENTPUBLICATION, LINK_LEARNPATH LINK_FORUM_THREAD, LINK_ATTENDANCE
6683 6709
  * see gradebook/lib/be/linkfactory
6684 6710
  * @param string    course code
6685
- * @return boolean
6711
+ * @return false|null
6686 6712
  */
6687 6713
 function api_block_course_item_locked_by_gradebook($item_id, $link_type, $course_code = null) {
6688 6714
     if (api_is_platform_admin()) {
@@ -6723,7 +6749,7 @@  discard block
 block discarded – undo
6723 6749
 /**
6724 6750
  * Returns an array of global configuration settings which should be ignored
6725 6751
  * when printing the configuration settings screens
6726
- * @return array Array of strings, each identifying one of the excluded settings
6752
+ * @return string[] Array of strings, each identifying one of the excluded settings
6727 6753
  */
6728 6754
 function api_get_locked_settings() {
6729 6755
     return array(
@@ -6766,7 +6792,7 @@  discard block
 block discarded – undo
6766 6792
  * false if he isn't. If the user ID is given and is an integer, then the same
6767 6793
  * ID is simply returned
6768 6794
  * @param  integer User ID
6769
- * @return mixed Integer User ID is logged in, or false otherwise
6795
+ * @return boolean Integer User ID is logged in, or false otherwise
6770 6796
  */
6771 6797
 function api_user_is_login($user_id = null) {
6772 6798
     $user_id = empty($user_id) ? api_get_user_id() : intval($user_id);
@@ -6801,6 +6827,7 @@  discard block
 block discarded – undo
6801 6827
  * Checks whether an IP is included inside an IP range
6802 6828
  * @param string IP address
6803 6829
  * @param string IP range
6830
+ * @param string $ip
6804 6831
  * @return bool True if IP is in the range, false otherwise
6805 6832
  * @author claudiu at cnixs dot com  on http://www.php.net/manual/fr/ref.network.php#55230
6806 6833
  * @author Yannick Warnier for improvements and managment of multiple ranges
@@ -7184,6 +7211,7 @@  discard block
 block discarded – undo
7184 7211
 /**
7185 7212
  * Tries to set memory limit, if authorized and new limit is higher than current
7186 7213
  * @param string New memory limit
7214
+ * @param string $mem
7187 7215
  * @return bool True on success, false on failure or current is higher than suggested
7188 7216
  * @assert (null) === false
7189 7217
  * @assert (-1) === false
@@ -7240,7 +7268,6 @@  discard block
 block discarded – undo
7240 7268
 
7241 7269
 /**
7242 7270
  * Finds all the information about a user from username instead of user id
7243
- * @param string $username
7244 7271
  *
7245 7272
  * @return array $user_info user_id, lastname, firstname, username, email, ...
7246 7273
  * @author Yannick Warnier <[email protected]>
@@ -7262,7 +7289,6 @@  discard block
 block discarded – undo
7262 7289
 
7263 7290
 /**
7264 7291
  *
7265
- * @param string $inputId the jquery id example: #password
7266 7292
  *
7267 7293
  * @return string
7268 7294
  */
@@ -7387,6 +7413,7 @@  discard block
 block discarded – undo
7387 7413
 /**
7388 7414
  * Remove tags from HTML anf return the $in_number_char first non-HTML char
7389 7415
  * Postfix the text with "..." if it has been truncated.
7416
+ * @param integer $in_number_char
7390 7417
  * @return string
7391 7418
  * @author hubert borderiou
7392 7419
  */
@@ -7431,7 +7458,7 @@  discard block
 block discarded – undo
7431 7458
 /**
7432 7459
  * @param string $tool
7433 7460
  * @param string $setting
7434
- * @param mixed $defaultValue
7461
+ * @param integer $defaultValue
7435 7462
  * @return string
7436 7463
  */
7437 7464
 function api_get_default_tool_setting($tool, $setting, $defaultValue)
@@ -7556,7 +7583,7 @@  discard block
 block discarded – undo
7556 7583
 }
7557 7584
 
7558 7585
 /**
7559
- * @return true if course_code for direct course access after login is set
7586
+ * @return boolean if course_code for direct course access after login is set
7560 7587
  */
7561 7588
 function exist_firstpage_parameter()
7562 7589
 {
@@ -7848,7 +7875,7 @@  discard block
 block discarded – undo
7848 7875
  * @param array     data file (path and filename)
7849 7876
  * @param array     data to attach a file (optional)
7850 7877
  * @param bool      True for attaching a embedded file inside content html (optional)
7851
- * @return          returns true if mail was sent
7878
+ * @return          integer true if mail was sent
7852 7879
  * @see             class.phpmailer.php
7853 7880
  */
7854 7881
 function api_mail_html(
Please login to merge, or discard this patch.