Passed
Push — 1.10.x ( 1f0c91...36635d )
by Angel Fernando Quiroz
43:44
created
main/webservices/access_url.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -20,6 +20,9 @@
 block discarded – undo
20 20
 
21 21
 define('WS_ERROR_SECRET_KEY', 1);
22 22
 
23
+/**
24
+ * @param integer $code
25
+ */
23 26
 function return_error($code) {
24 27
     $fault = null;
25 28
     switch ($code) {
Please login to merge, or discard this patch.
main/webservices/cm_webservice_course.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -453,6 +453,7 @@
 block discarded – undo
453 453
 	 * @param string Session id field name
454 454
 	 * @param string Session id value
455 455
 	 * @param int State (1 to subscribe, 0 to unsubscribe)
456
+	 * @param integer $state
456 457
 	 * @return mixed True on success, WSError otherwise
457 458
 	 */
458 459
 	protected function changeCourseSubscription($course_id_field_name, $course_id_value, $session_id_field_name, $session_id_value, $state) {
Please login to merge, or discard this patch.
main/webservices/webservice_course.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -453,6 +453,7 @@
 block discarded – undo
453 453
 	 * @param string Session id field name
454 454
 	 * @param string Session id value
455 455
 	 * @param int State (1 to subscribe, 0 to unsubscribe)
456
+	 * @param integer $state
456 457
 	 * @return mixed True on success, WSError otherwise
457 458
 	 */
458 459
 	protected function changeCourseSubscription($course_id_field_name, $course_id_value, $session_id_field_name, $session_id_value, $state) {
Please login to merge, or discard this patch.
main/inc/lib/document.lib.php 1 patch
Doc Comments   +21 added lines, -18 removed lines patch added patch discarded remove patch
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
     /**
278 278
      *  @param string
279 279
      *  @param string
280
-     * 	@return true if the user is allowed to see the document, false otherwise
280
+     * 	@return boolean if the user is allowed to see the document, false otherwise
281 281
      * 	@author Sergio A Kessler, first version
282 282
      * 	@author Roan Embrechts, bugfix
283 283
      *  @todo not only check if a file is visible, but also check if the user is allowed to see the file??
@@ -1527,7 +1527,7 @@  discard block
 block discarded – undo
1527 1527
      * Return true if the documentpath have visibility=1 as
1528 1528
      * item_property (you should use the is_visible_by_id)
1529 1529
      *
1530
-     * @param string $document_path the relative complete path of the document
1530
+     * @param string $doc_path the relative complete path of the document
1531 1531
      * @param array  $course the _course array info of the document's course
1532 1532
      * @param int
1533 1533
      * @param string
@@ -1612,6 +1612,8 @@  discard block
 block discarded – undo
1612 1612
      * @param   int
1613 1613
      * @param   int
1614 1614
      * @param bool
1615
+     * @param integer $session_id
1616
+     * @param integer $user_id
1615 1617
      * @return  bool
1616 1618
      */
1617 1619
     public static function is_visible_by_id(
@@ -2090,6 +2092,7 @@  discard block
 block discarded – undo
2090 2092
      * @param	bool  	is file or string html
2091 2093
      * @param	string	type (one of the app tools) - optional (otherwise takes the current item's type)
2092 2094
      * @param	int		level of recursivity we're in
2095
+     * @param string $source_html
2093 2096
      * @return	array	List of file paths. An additional field containing 'local' or 'remote' helps determine
2094 2097
      * if the file should be copied into the zip or just linked
2095 2098
      */
@@ -2913,6 +2916,7 @@  discard block
 block discarded – undo
2913 2916
 
2914 2917
     /**
2915 2918
      * Obtains the text inside the file with the right parser
2919
+     * @param string $doc_path
2916 2920
      */
2917 2921
     public static function get_text_content($doc_path, $doc_mime)
2918 2922
     {
@@ -3163,6 +3167,7 @@  discard block
 block discarded – undo
3163 3167
      * Shows a play icon next to the document title in the document list
3164 3168
      * @param int
3165 3169
      * @param string
3170
+     * @param integer|null $i
3166 3171
      * @return string	html content
3167 3172
      */
3168 3173
     static function generate_media_preview($i, $type = 'simple')
@@ -3557,7 +3562,7 @@  discard block
 block discarded – undo
3557 3562
      * @param bool $add_move_button
3558 3563
      * @param string $target
3559 3564
      * @param string $overwrite_url
3560
-     * @return null|string
3565
+     * @return string
3561 3566
      */
3562 3567
     private static function parseFile(
3563 3568
         $course_info,
@@ -4058,7 +4063,7 @@  discard block
 block discarded – undo
4058 4063
     }
4059 4064
 
4060 4065
     /**
4061
-     * @return array
4066
+     * @return string[]
4062 4067
      */
4063 4068
     public static function get_web_odf_extension_list()
4064 4069
     {
@@ -4067,10 +4072,10 @@  discard block
 block discarded – undo
4067 4072
 
4068 4073
     /**
4069 4074
      * Set of extension allowed to use Jodconverter
4070
-     * @param $mode 'from'
4075
+     * @param string $mode 'from'
4071 4076
      *              'to'
4072 4077
      *              'all'
4073
-     * @param $format   'text'
4078
+     * @param string $format   'text'
4074 4079
      *                  'spreadsheet'
4075 4080
      *                  'presentation'
4076 4081
      *                  'drawing'
@@ -4274,7 +4279,7 @@  discard block
 block discarded – undo
4274 4279
     }
4275 4280
 
4276 4281
     /**
4277
-     * @return array
4282
+     * @return string[]
4278 4283
      */
4279 4284
     public static function get_system_folders()
4280 4285
     {
@@ -4292,7 +4297,7 @@  discard block
 block discarded – undo
4292 4297
     }
4293 4298
 
4294 4299
     /**
4295
-     * @return array
4300
+     * @return string[]
4296 4301
      */
4297 4302
     public static function getProtectedFolderFromStudent()
4298 4303
     {
@@ -4448,7 +4453,7 @@  discard block
 block discarded – undo
4448 4453
      * Requires the ffmpeg lib. In ubuntu: sudo apt-get install ffmpeg
4449 4454
      * @param string $wavFile
4450 4455
      * @param bool $removeWavFileIfSuccess
4451
-     * @return bool
4456
+     * @return string|false
4452 4457
      */
4453 4458
     public static function convertWavToMp3($wavFile, $removeWavFileIfSuccess = false)
4454 4459
     {
@@ -5536,9 +5541,6 @@  discard block
 block discarded – undo
5536 5541
     /**
5537 5542
      * Creates the row of edit icons for a file/folder
5538 5543
      *
5539
-     * @param string $curdirpath current path (cfr open folder)
5540
-     * @param string $type (file/folder)
5541
-     * @param string $path dbase path of file/folder
5542 5544
      * @param int $visibility (1/0)
5543 5545
      * @param int $id dbase id of the document
5544 5546
      * @return string html img tags with hyperlinks
@@ -5867,7 +5869,7 @@  discard block
 block discarded – undo
5867 5869
     /**
5868 5870
      * Gets the path translated with title of docs and folders
5869 5871
      * @param string $path the real path
5870
-     * @return the path which should be displayed
5872
+     * @return string path which should be displayed
5871 5873
      */
5872 5874
     public static function get_titles_of_path($path)
5873 5875
     {
@@ -5922,7 +5924,8 @@  discard block
 block discarded – undo
5922 5924
 
5923 5925
     /**
5924 5926
      * Checks whether the user is in shared folder
5925
-     * @return return bool Return true when user is into shared folder
5927
+     * @param integer $current_session_id
5928
+     * @return boolean bool Return true when user is into shared folder
5926 5929
      */
5927 5930
     public static function is_shared_folder($curdirpath, $current_session_id)
5928 5931
     {
@@ -5938,7 +5941,7 @@  discard block
 block discarded – undo
5938 5941
 
5939 5942
     /**
5940 5943
      * Checks whether the user is into any user shared folder
5941
-     * @return return bool Return true when user is in any user shared folder
5944
+     * @return boolean bool Return true when user is in any user shared folder
5942 5945
      */
5943 5946
     public static function is_any_user_shared_folder($path, $current_session_id)
5944 5947
     {
@@ -6152,7 +6155,7 @@  discard block
 block discarded – undo
6152 6155
      * @param int $id
6153 6156
      * @param array $courseInfo
6154 6157
      * @param int $sessionId
6155
-     * @return bool
6158
+     * @return boolean|null
6156 6159
      */
6157 6160
     public static function downloadDeletedDocument($id, $courseInfo, $sessionId)
6158 6161
     {
@@ -6171,7 +6174,7 @@  discard block
 block discarded – undo
6171 6174
      * @param array $courseInfo
6172 6175
      * @param int $sessionId
6173 6176
      *
6174
-     * @return bool
6177
+     * @return false|null
6175 6178
      */
6176 6179
     public static function downloadAllDeletedDocument($courseInfo, $sessionId)
6177 6180
     {
@@ -6210,7 +6213,7 @@  discard block
 block discarded – undo
6210 6213
      * @param array $courseInfo
6211 6214
      * @param int $sessionId
6212 6215
      *
6213
-     * @return bool
6216
+     * @return false|null
6214 6217
      */
6215 6218
     public function deleteDocumentsFromSession($courseInfo, $sessionId)
6216 6219
     {
Please login to merge, or discard this patch.
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/inc/lib/api.lib.php 1 patch
Doc Comments   +52 added lines, -25 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.
@@ -1650,6 +1649,7 @@  discard block
 block discarded – undo
1650 1649
  * Gets a course setting from the current course_setting table. Try always using integer values.
1651 1650
  * @param string    The name of the setting we want from the table
1652 1651
  * @param string    Optional: course code
1652
+ * @param string $setting_name
1653 1653
  * @return mixed    The value of that setting in that table. Return -1 if not found.
1654 1654
  */
1655 1655
 function api_get_course_setting($setting_name, $course_code = null)
@@ -1957,7 +1957,7 @@  discard block
 block discarded – undo
1957 1957
 /**
1958 1958
  * Checks a password to see wether it is OK to use.
1959 1959
  * @param string $password
1960
- * @return true if the password is acceptable, false otherwise
1960
+ * @return boolean if the password is acceptable, false otherwise
1961 1961
  * Notes about what a password "OK to use" is:
1962 1962
  * 1. The password should be at least 5 characters long.
1963 1963
  * 2. Only English letters (uppercase or lowercase, it doesn't matter) and digits are allowed.
@@ -2129,7 +2129,7 @@  discard block
 block discarded – undo
2129 2129
      * @author Hugues Peeters <[email protected]>
2130 2130
      * @param  string $failure_type - the type of failure
2131 2131
      * @global array  $api_failureList
2132
-     * @return bolean false to stay consistent with the main script
2132
+     * @return boolean false to stay consistent with the main script
2133 2133
      */
2134 2134
     static function set_failure($failure_type) {
2135 2135
         global $api_failureList;
@@ -3196,8 +3196,8 @@  discard block
 block discarded – undo
3196 3196
 
3197 3197
 /**
3198 3198
 * Checks whether the user is allowed in a specific tool for a specific action
3199
-* @param $tool the tool we are checking if the user has a certain permission
3200
-* @param $action the action we are checking (add, edit, delete, move, visibility)
3199
+* @param string $tool the tool we are checking if the user has a certain permission
3200
+* @param string $action the action we are checking (add, edit, delete, move, visibility)
3201 3201
 * @author Patrick Cool <[email protected]>, Ghent University
3202 3202
 * @author Julio Montoya
3203 3203
 * @version 1.0
@@ -3496,7 +3496,7 @@  discard block
 block discarded – undo
3496 3496
 /**
3497 3497
  * Gets a UNIX timestamp from a database (MySQL) datetime format string
3498 3498
  * @param $last_post_datetime standard output date in a sql query
3499
- * @return unix timestamp
3499
+ * @return integer timestamp
3500 3500
  * @author Toon Van Hoecke <[email protected]>
3501 3501
  * @version October 2003
3502 3502
  * @desc convert sql date to unix timestamp
@@ -3529,6 +3529,9 @@  discard block
 block discarded – undo
3529 3529
  * @param string    Tool (learnpath, document, etc)
3530 3530
  * @param int       The item ID in the given tool
3531 3531
  * @param int       The session ID (optional)
3532
+ * @param string $tool
3533
+ * @param integer $user_id
3534
+ * @param string $type
3532 3535
  * @return int      -1 on error, 0 if invisible, 1 if visible
3533 3536
  */
3534 3537
 function api_get_item_visibility(
@@ -3597,7 +3600,7 @@  discard block
 block discarded – undo
3597 3600
  * @param int $userId
3598 3601
  * @param int $groupId
3599 3602
  * @param int $sessionId
3600
- * @return void
3603
+ * @return false|null
3601 3604
  */
3602 3605
 function api_item_property_delete(
3603 3606
     $courseInfo,
@@ -3652,7 +3655,7 @@  discard block
 block discarded – undo
3652 3655
  * @param array $_course array with course properties
3653 3656
  * @param string $tool tool id, linked to 'rubrique' of the course tool_list (Warning: language sensitive !!)
3654 3657
  * @param int $item_id id of the item itself, linked to key of every tool ('id', ...), "*" = all items of the tool
3655
- * @param string $lastedit_type add or update action
3658
+ * @param string $last_edit_type add or update action
3656 3659
  * (1) message to be translated (in trad4all) : e.g. DocumentAdded, DocumentUpdated;
3657 3660
  * (2) "delete"
3658 3661
  * (3) "visible"
@@ -3935,6 +3938,8 @@  discard block
 block discarded – undo
3935 3938
  * @param string    tool name, linked to 'rubrique' of the course tool_list (Warning: language sensitive !!)
3936 3939
  * @param int       id of the item itself, linked to key of every tool ('id', ...), "*" = all items of the tool
3937 3940
  * @param int $session_id
3941
+ * @param string $tool
3942
+ * @param string $course_code
3938 3943
  * @return array All fields from c_item_property (all rows found) or empty array
3939 3944
  */
3940 3945
 function api_get_item_property_by_tool($tool, $course_code, $session_id = null)
@@ -4197,7 +4202,7 @@  discard block
 block discarded – undo
4197 4202
  * Displays a form (drop down menu) so the user can select his/her preferred language.
4198 4203
  * The form works with or without javascript
4199 4204
  * @param  boolean Hide form if only one language available (defaults to false = show the box anyway)
4200
- * @return void Display the box directly
4205
+ * @return null|string Display the box directly
4201 4206
  */
4202 4207
 function api_display_language_form($hide_if_no_choice = false)
4203 4208
 {
@@ -4477,6 +4482,7 @@  discard block
 block discarded – undo
4477 4482
  * and also when a user subscribes to courses (the new course is added at the end of the main category
4478 4483
  * @author Patrick Cool <[email protected]>, Ghent University
4479 4484
  * @param int $user_course_category: the id of the user_course_category
4485
+ * @param integer $user_id
4480 4486
  * @return int the value of the highest sort of the user_course_category
4481 4487
  */
4482 4488
 function api_max_sort_value($user_course_category, $user_id)
@@ -4685,6 +4691,8 @@  discard block
 block discarded – undo
4685 4691
  * @param the dest folder
4686 4692
  * @param an array of excluded file_name (without extension)
4687 4693
  * @param copied_files the returned array of copied files
4694
+ * @param string $source
4695
+ * @param string $dest
4688 4696
  */
4689 4697
 function copyr($source, $dest, $exclude = array(), $copied_files = array()) {
4690 4698
     if (empty($dest)) { return false; }
@@ -4724,6 +4732,11 @@  discard block
 block discarded – undo
4724 4732
 }
4725 4733
 
4726 4734
 // TODO: Using DIRECTORY_SEPARATOR is not recommended, this is an obsolete approach. Documentation header to be added here.
4735
+/**
4736
+ * @param string $pathname
4737
+ * @param string $base_path_document
4738
+ * @param integer $session_id
4739
+ */
4727 4740
 function copy_folder_course_session(
4728 4741
     $pathname,
4729 4742
     $base_path_document,
@@ -4809,6 +4822,9 @@  discard block
 block discarded – undo
4809 4822
 }
4810 4823
 
4811 4824
 // TODO: chmodr() is a better name. Some corrections are needed. Documentation header to be added here.
4825
+/**
4826
+ * @param string $path
4827
+ */
4812 4828
 function api_chmod_R($path, $filemode) {
4813 4829
     if (!is_dir($path)) {
4814 4830
         return chmod($path, $filemode);
@@ -4891,7 +4907,7 @@  discard block
 block discarded – undo
4891 4907
  *   version = VERSION
4892 4908
  * @endverbatim
4893 4909
  * </code>
4894
- * @param $filename
4910
+ * @param string $filename
4895 4911
  *   The file we are parsing. Accepts file with relative or absolute path.
4896 4912
  * @return
4897 4913
  *   The info array.
@@ -4983,7 +4999,7 @@  discard block
 block discarded – undo
4983 4999
 /**
4984 5000
  * Checks whether status given in parameter exists in the platform
4985 5001
  * @param mixed the status (can be either int either string)
4986
- * @return true if the status exists, else returns false
5002
+ * @return boolean if the status exists, else returns false
4987 5003
  */
4988 5004
 function api_status_exists($status_asked) {
4989 5005
     global $_status_list;
@@ -5005,7 +5021,7 @@  discard block
 block discarded – undo
5005 5021
 
5006 5022
 /**
5007 5023
  * Gets the status langvars list
5008
- * @return array the list of status with their translations
5024
+ * @return string[] the list of status with their translations
5009 5025
  */
5010 5026
 function api_get_status_langvars() {
5011 5027
     return array(
@@ -5081,6 +5097,7 @@  discard block
 block discarded – undo
5081 5097
  * @param string    The sub-variable if any (in most cases, this will remain null)
5082 5098
  * @param string    The category if any (in most cases, this will remain null)
5083 5099
  * @param int       The access_url for which this parameter is valid
5100
+ * @param string $cat
5084 5101
  */
5085 5102
 function api_set_setting($var, $value, $subvar = null, $cat = null, $access_url = 1)
5086 5103
 {
@@ -5178,6 +5195,8 @@  discard block
 block discarded – undo
5178 5195
  * @param string    Value
5179 5196
  * @param int       Access URL. Optional. Defaults to 1
5180 5197
  * @param array     Optional array of filters on field type
5198
+ * @param string $category
5199
+ * @param string $value
5181 5200
  */
5182 5201
 function api_set_settings_category($category, $value = null, $access_url = 1, $fieldtype = array())
5183 5202
 {
@@ -5421,6 +5440,10 @@  discard block
 block discarded – undo
5421 5440
  * @param string    The subkey text
5422 5441
  * @param int       The access_url for which this parameter is valid
5423 5442
  * @param int       The changeability of this setting for non-master urls
5443
+ * @param string $val
5444
+ * @param string $var
5445
+ * @param string $sk
5446
+ * @param string $c
5424 5447
  * @return boolean  true on success, false on failure
5425 5448
  */
5426 5449
 function api_add_setting($val, $var, $sk = null, $type = 'textfield', $c = null, $title = '', $com = '', $sc = null, $skt = null, $a = 1, $v = 0) {
@@ -5686,6 +5709,7 @@  discard block
 block discarded – undo
5686 5709
  * @param String the tool of the element
5687 5710
  * @param int the element id in database
5688 5711
  * @param int the session_id to compare with element session id
5712
+ * @param string $tool
5689 5713
  * @return boolean true if the element is in the session, false else
5690 5714
  */
5691 5715
 function api_is_element_in_the_session($tool, $element_id, $session_id = null) {
@@ -5731,8 +5755,6 @@  discard block
 block discarded – undo
5731 5755
  * Replaces "forbidden" characters in a filename string.
5732 5756
  *
5733 5757
  * @param string $filename
5734
- * @param int $length
5735
- * @param bool $file_name
5736 5758
  *
5737 5759
  * @return string
5738 5760
  */
@@ -5968,6 +5990,7 @@  discard block
 block discarded – undo
5968 5990
  * @link http://php.net/manual/en/function.getimagesize.php
5969 5991
  * @link http://www.dokeos.com/forum/viewtopic.php?t=12345
5970 5992
  * @link http://www.dokeos.com/forum/viewtopic.php?t=16355
5993
+ * @return integer
5971 5994
  */
5972 5995
 function api_getimagesize($path) {
5973 5996
     $image = new Image($path);
@@ -6128,6 +6151,7 @@  discard block
 block discarded – undo
6128 6151
  * with his user id and the access_url_id=1
6129 6152
  *
6130 6153
  * @author Julio Montoya
6154
+ * @param integer $user_id
6131 6155
  */
6132 6156
 function api_is_global_platform_admin($user_id = null)
6133 6157
 {
@@ -6189,7 +6213,7 @@  discard block
 block discarded – undo
6189 6213
  * @param int $admin_id_to_check
6190 6214
  * @param int  $my_user_id
6191 6215
  * @param bool $allow_session_admin
6192
- * @return bool
6216
+ * @return boolean|null
6193 6217
  */
6194 6218
 function api_protect_super_admin($admin_id_to_check, $my_user_id = null, $allow_session_admin = false)
6195 6219
 {
@@ -6431,6 +6455,7 @@  discard block
 block discarded – undo
6431 6455
 
6432 6456
 /**
6433 6457
  * Returns the <link> HTML tag
6458
+ * @param string $file
6434 6459
  */
6435 6460
 function api_get_css($file, $media = 'screen') {
6436 6461
     return '<link href="'.$file.'" rel="stylesheet" media="'.$media.'" type="text/css" />'."\n";
@@ -6568,7 +6593,8 @@  discard block
 block discarded – undo
6568 6593
  * This function relies on api_get_course_info()
6569 6594
  * @param   string  The course code - optional (takes it from session if not given)
6570 6595
  * @param   int     The session id  - optional (takes it from session if not given)
6571
- * @return  mixed   The URL of the course or null if something does not work
6596
+ * @param integer $session_id
6597
+ * @return  string|null   The URL of the course or null if something does not work
6572 6598
  * @author  Julio Montoya <[email protected]>
6573 6599
  */
6574 6600
 function api_get_course_url($course_code = null, $session_id = null)
@@ -6683,7 +6709,7 @@  discard block
 block discarded – undo
6683 6709
  * @param int       LINK_EXERCISE, LINK_STUDENTPUBLICATION, LINK_LEARNPATH LINK_FORUM_THREAD, LINK_ATTENDANCE
6684 6710
  * see gradebook/lib/be/linkfactory
6685 6711
  * @param string    course code
6686
- * @return boolean
6712
+ * @return false|null
6687 6713
  */
6688 6714
 function api_block_course_item_locked_by_gradebook($item_id, $link_type, $course_code = null) {
6689 6715
     if (api_is_platform_admin()) {
@@ -6724,7 +6750,7 @@  discard block
 block discarded – undo
6724 6750
 /**
6725 6751
  * Returns an array of global configuration settings which should be ignored
6726 6752
  * when printing the configuration settings screens
6727
- * @return array Array of strings, each identifying one of the excluded settings
6753
+ * @return string[] Array of strings, each identifying one of the excluded settings
6728 6754
  */
6729 6755
 function api_get_locked_settings() {
6730 6756
     return array(
@@ -6767,7 +6793,7 @@  discard block
 block discarded – undo
6767 6793
  * false if he isn't. If the user ID is given and is an integer, then the same
6768 6794
  * ID is simply returned
6769 6795
  * @param  integer User ID
6770
- * @return mixed Integer User ID is logged in, or false otherwise
6796
+ * @return boolean Integer User ID is logged in, or false otherwise
6771 6797
  */
6772 6798
 function api_user_is_login($user_id = null) {
6773 6799
     $user_id = empty($user_id) ? api_get_user_id() : intval($user_id);
@@ -6802,6 +6828,7 @@  discard block
 block discarded – undo
6802 6828
  * Checks whether an IP is included inside an IP range
6803 6829
  * @param string IP address
6804 6830
  * @param string IP range
6831
+ * @param string $ip
6805 6832
  * @return bool True if IP is in the range, false otherwise
6806 6833
  * @author claudiu at cnixs dot com  on http://www.php.net/manual/fr/ref.network.php#55230
6807 6834
  * @author Yannick Warnier for improvements and managment of multiple ranges
@@ -7185,6 +7212,7 @@  discard block
 block discarded – undo
7185 7212
 /**
7186 7213
  * Tries to set memory limit, if authorized and new limit is higher than current
7187 7214
  * @param string New memory limit
7215
+ * @param string $mem
7188 7216
  * @return bool True on success, false on failure or current is higher than suggested
7189 7217
  * @assert (null) === false
7190 7218
  * @assert (-1) === false
@@ -7241,7 +7269,6 @@  discard block
 block discarded – undo
7241 7269
 
7242 7270
 /**
7243 7271
  * Finds all the information about a user from username instead of user id
7244
- * @param string $username
7245 7272
  *
7246 7273
  * @return array $user_info user_id, lastname, firstname, username, email, ...
7247 7274
  * @author Yannick Warnier <[email protected]>
@@ -7263,7 +7290,6 @@  discard block
 block discarded – undo
7263 7290
 
7264 7291
 /**
7265 7292
  *
7266
- * @param string $inputId the jquery id example: #password
7267 7293
  *
7268 7294
  * @return string
7269 7295
  */
@@ -7388,6 +7414,7 @@  discard block
 block discarded – undo
7388 7414
 /**
7389 7415
  * Remove tags from HTML anf return the $in_number_char first non-HTML char
7390 7416
  * Postfix the text with "..." if it has been truncated.
7417
+ * @param integer $in_number_char
7391 7418
  * @return string
7392 7419
  * @author hubert borderiou
7393 7420
  */
@@ -7432,7 +7459,7 @@  discard block
 block discarded – undo
7432 7459
 /**
7433 7460
  * @param string $tool
7434 7461
  * @param string $setting
7435
- * @param mixed $defaultValue
7462
+ * @param integer $defaultValue
7436 7463
  * @return string
7437 7464
  */
7438 7465
 function api_get_default_tool_setting($tool, $setting, $defaultValue)
@@ -7557,7 +7584,7 @@  discard block
 block discarded – undo
7557 7584
 }
7558 7585
 
7559 7586
 /**
7560
- * @return true if course_code for direct course access after login is set
7587
+ * @return boolean if course_code for direct course access after login is set
7561 7588
  */
7562 7589
 function exist_firstpage_parameter()
7563 7590
 {
@@ -7849,7 +7876,7 @@  discard block
 block discarded – undo
7849 7876
  * @param array     data file (path and filename)
7850 7877
  * @param array     data to attach a file (optional)
7851 7878
  * @param bool      True for attaching a embedded file inside content html (optional)
7852
- * @return          returns true if mail was sent
7879
+ * @return          integer true if mail was sent
7853 7880
  * @see             class.phpmailer.php
7854 7881
  */
7855 7882
 function api_mail_html(
Please login to merge, or discard this patch.