Completed
Push — 1.11.x ( 30c239...4463da )
by José
63:32 queued 32:15
created
main/inc/lib/diagnoser.lib.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -435,6 +435,12 @@
 block discarded – undo
435 435
 
436 436
     /**
437 437
      * Additional functions needed for fast integration
438
+     * @param integer $status
439
+     * @param string $section
440
+     * @param string $title
441
+     * @param string $url
442
+     * @param string|null $formatter
443
+     * @param string $comment
438 444
      */
439 445
     public function build_setting(
440 446
         $status,
Please login to merge, or discard this patch.
main/inc/lib/event_email_template.class.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 	}
60 60
 
61 61
     /**
62
-     * @return array
62
+     * @return string[]
63 63
      */
64 64
     public function get_status_list()
65 65
     {
Please login to merge, or discard this patch.
main/inc/lib/events_dispatcher.class.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
     /**
14 14
      * @param string $event_name
15 15
      * @param array $event_data
16
-     * @return bool
16
+     * @return false|null
17 17
      */
18 18
     public static function events($event_name, $event_data = array())
19 19
     {
Please login to merge, or discard this patch.
main/inc/lib/exercise.lib.php 1 patch
Doc Comments   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1276,6 +1276,7 @@  discard block
 block discarded – undo
1276 1276
 
1277 1277
     /**
1278 1278
      * Validates the time control key
1279
+     * @param integer $exercise_id
1279 1280
      */
1280 1281
     public static function exercise_time_control_is_valid(
1281 1282
         $exercise_id,
@@ -1412,7 +1413,7 @@  discard block
 block discarded – undo
1412 1413
      * @param int $in_direction
1413 1414
      * @param string $in_hotpot_path
1414 1415
      * @param bool $in_get_count
1415
-     * @param null $where_condition
1416
+     * @param string $where_condition
1416 1417
      * @return array|int
1417 1418
      */
1418 1419
     public static function get_exam_results_hotpotatoes_data(
@@ -2215,7 +2216,7 @@  discard block
 block discarded – undo
2215 2216
     /**
2216 2217
      * Return true if pass_pourcentage activated (we use the pass pourcentage feature
2217 2218
      * return false if pass_percentage = 0 (we don't use the pass pourcentage feature
2218
-     * @param $in_pass_pourcentage
2219
+     * @param string $in_pass_pourcentage
2219 2220
      * @return boolean
2220 2221
      * In this version, pass_percentage and show_success_message are disabled if
2221 2222
      * pass_percentage is set to 0
@@ -2228,7 +2229,7 @@  discard block
 block discarded – undo
2228 2229
     /**
2229 2230
      * Converts a numeric value in a percentage example 0.66666 to 66.67 %
2230 2231
      * @param $value
2231
-     * @return float Converted number
2232
+     * @return string Converted number
2232 2233
      */
2233 2234
     public static function convert_to_percentage($value)
2234 2235
     {
@@ -2244,7 +2245,7 @@  discard block
 block discarded – undo
2244 2245
      * @param   float $score
2245 2246
      * @param   float $weight
2246 2247
      * @deprecated seem not to be used
2247
-     * @return  float   the score rounded converted to the new range
2248
+     * @return  string|null   the score rounded converted to the new range
2248 2249
      */
2249 2250
     public static function convert_score($score, $weight)
2250 2251
     {
@@ -2801,6 +2802,7 @@  discard block
 block discarded – undo
2801 2802
      * @param    int        exercise id
2802 2803
      * @param    int $courseId
2803 2804
      * @param    int        session id
2805
+     * @param integer $user_count
2804 2806
      * @return    float    Best average score
2805 2807
      */
2806 2808
     public static function get_best_average_score_by_exercise(
@@ -3230,8 +3232,9 @@  discard block
 block discarded – undo
3230 3232
     }
3231 3233
 
3232 3234
     /**
3233
-     * @param array $answer
3235
+     * @param string|null $answer
3234 3236
      * @param string $user_answer
3237
+     * @param string|null $current_answer
3235 3238
      * @return array
3236 3239
      */
3237 3240
     public static function check_fill_in_blanks($answer, $user_answer, $current_answer)
@@ -3858,7 +3861,7 @@  discard block
 block discarded – undo
3858 3861
 
3859 3862
     /**
3860 3863
      * @param int $countLetter
3861
-     * @return mixed
3864
+     * @return string
3862 3865
      */
3863 3866
     public static function detectInputAppropriateClass($countLetter)
3864 3867
     {
Please login to merge, or discard this patch.
main/inc/lib/extra_field_value.lib.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * This function is used with $extraField->addElements()
76 76
      * @param array $params array for the insertion into the *_field_values table
77 77
      * @param bool $showQuery
78
-     * @return mixed false on empty params, void otherwise
78
+     * @return false|null false on empty params, void otherwise
79 79
      * @assert (array()) === false
80 80
      */
81 81
     public function saveFieldValues($params, $showQuery = false)
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
      * @param int $item_id Item ID (It could be a session_id, course_id or user_id)
532 532
      * @param int $field_id Field ID (the ID from the *_field table)
533 533
      * @param bool $transform Whether to transform the result to a human readable strings
534
-     * @return mixed A structured array with the field_id and field_value, or false on error
534
+     * @return string A structured array with the field_id and field_value, or false on error
535 535
      * @assert (-1,-1) === false
536 536
      */
537 537
     public function get_values_by_handler_and_field_id($item_id, $field_id, $transform = false)
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
      * @param int $item_id Item ID from the original table
625 625
      * @param string $field_variable The name of the field we are looking for
626 626
      * @param bool $transform
627
-     * @param bool $allVisibility
627
+     * @param bool $visibility
628 628
      *
629 629
      * @return mixed Array of results, or false on error or not found
630 630
      * @assert (-1,'') === false
Please login to merge, or discard this patch.
main/inc/lib/fileManage.lib.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
  * Deletes a file or a directory
40 40
  *
41 41
  * @author - Hugues Peeters
42
- * @param  $file (String) - the path of file or directory to delete
43
- * @return boolean - true if the delete succeed, false otherwise.
42
+ * @param  string $file (String) - the path of file or directory to delete
43
+ * @return boolean|null - true if the delete succeed, false otherwise.
44 44
  * @see    - delete() uses check_name_exist() and removeDir() functions
45 45
  */
46 46
 function my_delete($file)
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
  * @author Hugues Peeters <[email protected]>
128 128
  * @param  string $file_path complete path of the file or the directory
129 129
  * @param  string $new_file_name new name for the file or the directory
130
- * @return boolean true if succeed, false otherwise
130
+ * @return string|false true if succeed, false otherwise
131 131
  * @see rename() uses the check_name_exist() and php2phps() functions
132 132
  */
133 133
 function my_rename($file_path, $new_file_name) {
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
  * @param  string $target the path of the new area
175 175
  * @param  bool $forceMove Whether to force a move or to make a copy (safer but slower) and then delete the original
176 176
  * @param	bool $moveContent In some cases (including migrations), we need to move the *content* and not the folder itself
177
- * @return bool true if the move succeed, false otherwise.
177
+ * @return boolean|null true if the move succeed, false otherwise.
178 178
  * @see move() uses check_name_exist() and copyDirTo() functions
179 179
  */
180 180
 function move($source, $target, $forceMove = true, $moveContent = false)
Please login to merge, or discard this patch.
main/inc/lib/fileUpload.lib.php 1 patch
Doc Comments   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
  * Returns the name without extension, used for the title
54 54
  *
55 55
  * @param string $name
56
- * @return name without the extension
56
+ * @return string without the extension
57 57
  */
58 58
 function get_document_title($name)
59 59
 {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
  * This function checks if the upload succeeded
68 68
  *
69 69
  * @param array $uploaded_file ($_FILES)
70
- * @return true if upload succeeded
70
+ * @return boolean if upload succeeded
71 71
  */
72 72
 function process_uploaded_file($uploaded_file, $show_output = true)
73 73
 {
@@ -1032,7 +1032,7 @@  discard block
 block discarded – undo
1032 1032
  * @param array  $courseInfo
1033 1033
  * @param array  $userInfo
1034 1034
  * @param array  $uploaded_file - follows the $_FILES Structure
1035
- * @param string $upload_path   - destination of the upload.
1035
+ * @param string $uploadPath   - destination of the upload.
1036 1036
  *                               This path is to append to $base_work_dir
1037 1037
  * @param string $base_work_dir  - base working directory of the module
1038 1038
  * @param int    $maxFilledSpace  - amount of bytes to not exceed in the base
@@ -1219,7 +1219,7 @@  discard block
 block discarded – undo
1219 1219
  * @param int $session_id Session ID, if any
1220 1220
  * @param int $userId creator id
1221 1221
  *
1222
- * @return int id if inserted document
1222
+ * @return string|false id if inserted document
1223 1223
  */
1224 1224
 function add_document(
1225 1225
     $_course,
@@ -1360,7 +1360,7 @@  discard block
 block discarded – undo
1360 1360
  *
1361 1361
  * @author	Olivier Cauberghe <[email protected]>
1362 1362
  * @param	path+filename eg: /main/document/document.php
1363
- * @return	The directory depth
1363
+ * @return	integer directory depth
1364 1364
  */
1365 1365
 function get_levels($filename) {
1366 1366
     $levels = explode('/', $filename);
@@ -1377,6 +1377,8 @@  discard block
 block discarded – undo
1377 1377
  * @author	Olivier Cauberghe <[email protected]>
1378 1378
  * @param	path,filename
1379 1379
  * action:	Adds an entry to the document table with the default settings.
1380
+ * @param string $upload_path
1381
+ * @param string $filename
1380 1382
  */
1381 1383
 function set_default_settings($upload_path, $filename, $filetype = 'file')
1382 1384
 {
@@ -1838,7 +1840,6 @@  discard block
 block discarded – undo
1838 1840
  * @param int $groupId group.id
1839 1841
  * @param bool $output
1840 1842
  * @param array $parent
1841
- * @param string $uploadPath
1842 1843
  *
1843 1844
  */
1844 1845
 function add_all_documents_in_folder_to_database(
Please login to merge, or discard this patch.
main/inc/lib/internationalization.lib.php 1 patch
Doc Comments   +19 added lines, -12 removed lines patch added patch discarded remove patch
@@ -433,6 +433,7 @@  discard block
 block discarded – undo
433 433
  * If null, the timezone will be determined based on user preference,
434 434
  * or timezone chosen by the admin for the platform.
435 435
  * @param string The timezone to be converted from. If null, UTC will be assumed.
436
+ * @param string $to_timezone
436 437
  * @return string The converted time formatted as Y-m-d H:i:s
437 438
  *
438 439
  * @author Guillaume Viguier <[email protected]>
@@ -691,6 +692,8 @@  discard block
 block discarded – undo
691 692
  * @param mixed The time to be converted
692 693
  * @param mixed Format to be used (TIME_NO_SEC_FORMAT, DATE_FORMAT_SHORT, DATE_FORMAT_LONG, DATE_TIME_FORMAT_LONG)
693 694
  * @param string Timezone to be converted from. If null, UTC will be assumed.
695
+ * @param integer $format
696
+ * @param string $from_timezone
694 697
  * @return string Converted and localized date
695 698
  *
696 699
  * @author Guillaume Viguier <[email protected]>
@@ -760,7 +763,7 @@  discard block
 block discarded – undo
760 763
  * @param int|string $format (optional)	The person name format. It may be a pattern-string (for example '%t %l, %f' or '%T %F %L', ...) or some of the constants PERSON_NAME_COMMON_CONVENTION (default), PERSON_NAME_WESTERN_ORDER, PERSON_NAME_EASTERN_ORDER, PERSON_NAME_LIBRARY_ORDER.
761 764
  * @param string $language (optional)	The language id. If it is omitted, the current interface language is assumed. This parameter has meaning with the format PERSON_NAME_COMMON_CONVENTION only.
762 765
  * @param string $encoding (optional)	The used internally by this function character encoding. If it is omitted, the platform character set will be used by default.
763
- * @return bool							The result is sort of full name of the person.
766
+ * @return string							The result is sort of full name of the person.
764 767
  * Sample results:
765 768
  * Peter Ustinoff or Dr. Peter Ustinoff     - the Western order
766 769
  * Ustinoff Peter or Dr. Ustinoff Peter     - the Eastern order
@@ -1081,8 +1084,8 @@  discard block
 block discarded – undo
1081 1084
 
1082 1085
 /**
1083 1086
  * This function returns a string or an array with all occurrences of search in subject (ignoring case) replaced with the given replace value.
1084
- * @param mixed $search					String or array of strings to be found.
1085
- * @param mixed $replace				String or array of strings used for replacement.
1087
+ * @param string $search					String or array of strings to be found.
1088
+ * @param string $replace				String or array of strings used for replacement.
1086 1089
  * @param mixed $subject				String or array of strings being searched.
1087 1090
  * @param int $count (optional)			The number of matched and replaced needles will be returned in count, which is passed by reference.
1088 1091
  * @param string $encoding (optional)	The used internally by this function character encoding.
@@ -1145,10 +1148,10 @@  discard block
 block discarded – undo
1145 1148
 /**
1146 1149
  * Finds first occurrence of a string within another, case insensitive.
1147 1150
  * @param string $haystack					The string from which to get the first occurrence.
1148
- * @param mixed $needle						The string to be found.
1151
+ * @param string $needle						The string to be found.
1149 1152
  * @param bool $before_needle (optional)	Determines which portion of $haystack this function returns. The default value is FALSE.
1150 1153
  * @param string $encoding (optional)		The used internally by this function character encoding. If it is omitted, the platform character set will be used by default.
1151
- * @return mixed							Returns the portion of $haystack, or FALSE if $needle is not found.
1154
+ * @return false|string							Returns the portion of $haystack, or FALSE if $needle is not found.
1152 1155
  * Notes:
1153 1156
  * If $needle is not a string, it is converted to an integer and applied as the ordinal value (codepoint if the encoding is UTF-8) of a character.
1154 1157
  * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence of $needle.
@@ -1204,7 +1207,7 @@  discard block
 block discarded – undo
1204 1207
  * @param mixed $needle						The string which first character is to be found.
1205 1208
  * @param bool $before_needle (optional)	Determines which portion of $haystack this function returns. The default value is FALSE.
1206 1209
  * @param string $encoding (optional)		The used internally by this function character encoding. If it is omitted, the platform character set will be used by default.
1207
- * @return mixed							Returns the portion of $haystack, or FALSE if the first character from $needle is not found.
1210
+ * @return false|string							Returns the portion of $haystack, or FALSE if the first character from $needle is not found.
1208 1211
  * Notes:
1209 1212
  * If $needle is not a string, it is converted to an integer and applied as the ordinal value (codepoint if the encoding is UTF-8) of a character.
1210 1213
  * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence.
@@ -1271,7 +1274,7 @@  discard block
 block discarded – undo
1271 1274
  * @param mixed $needle						The string to be found.
1272 1275
  * @param bool $before_needle (optional)	Determines which portion of $haystack this function returns. The default value is FALSE.
1273 1276
  * @param string $encoding (optional)		The used internally by this function character encoding. If it is omitted, the platform character set will be used by default.
1274
- * @return mixed							Returns the portion of $haystack, or FALSE if $needle is not found.
1277
+ * @return false|string							Returns the portion of $haystack, or FALSE if $needle is not found.
1275 1278
  * Notes:
1276 1279
  * If $needle is not a string, it is converted to an integer and applied as the ordinal value (codepoint if the encoding is UTF-8) of a character.
1277 1280
  * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence of $needle.
@@ -1452,8 +1455,8 @@  discard block
 block discarded – undo
1452 1455
 
1453 1456
 /**
1454 1457
  * Performs a regular expression search and replace, UTF-8 aware when it is applicable.
1455
- * @param string|array $pattern			The pattern to search for. It can be either a string or an array with strings.
1456
- * @param string|array $replacement		The string or an array with strings to replace.
1458
+ * @param string $pattern			The pattern to search for. It can be either a string or an array with strings.
1459
+ * @param string $replacement		The string or an array with strings to replace.
1457 1460
  * @param string|array $subject			The string or an array with strings to search and replace.
1458 1461
  * @param int $limit					The maximum possible replacements for each pattern in each subject string. Defaults to -1 (no limit).
1459 1462
  * @param int &$count					If specified, this variable will be filled with the number of replacements done.
@@ -1601,7 +1604,7 @@  discard block
 block discarded – undo
1601 1604
 
1602 1605
 /**
1603 1606
  * This function checks whether two $encoding are equal (same, equvalent).
1604
- * @param string|array $encoding1		The first encoding
1607
+ * @param string $encoding1		The first encoding
1605 1608
  * @param string|array $encoding2		The second encoding
1606 1609
  * @param bool $strict					When this parameter is TRUE the comparison ignores aliases of encodings.
1607 1610
  * When the parameter is FALSE, aliases are taken into account.
@@ -1705,6 +1708,7 @@  discard block
 block discarded – undo
1705 1708
 /**
1706 1709
  * Checks a string for UTF-8 validity.
1707 1710
  *
1711
+ * @param string $string
1708 1712
  */
1709 1713
 function api_is_valid_utf8($string)
1710 1714
 {
@@ -1847,7 +1851,7 @@  discard block
 block discarded – undo
1847 1851
 /**
1848 1852
  * Replaces non-valid formats for person names with the default (English) format.
1849 1853
  * @param string $format	The input format to be verified.
1850
- * @return bool				Returns the same format if is is valid, otherwise returns a valid English format.
1854
+ * @return string				Returns the same format if is is valid, otherwise returns a valid English format.
1851 1855
  */
1852 1856
 function _api_validate_person_name_format($format) {
1853 1857
     if (empty($format) || stripos($format, '%f') === false || stripos($format, '%l') === false) {
@@ -1976,6 +1980,9 @@  discard block
 block discarded – undo
1976 1980
 
1977 1981
 // This function checks whether the function _api_convert_encoding() (the php-
1978 1982
 // implementation) is able to convert from/to a given encoding.
1983
+/**
1984
+ * @param string $encoding
1985
+ */
1979 1986
 function _api_convert_encoding_supports($encoding)
1980 1987
 {
1981 1988
     static $supports = array();
@@ -1987,7 +1994,7 @@  discard block
 block discarded – undo
1987 1994
 
1988 1995
 /**
1989 1996
  * Given a date object, return a human or ISO format, with or without h:m:s
1990
- * @param object $date The Date object
1997
+ * @param DateTime $date The Date object
1991 1998
  * @param bool $showTime Whether to show the time and date (true) or only the date (false)
1992 1999
  * @param bool $humanForm Whether to show day-month-year (true) or year-month-day (false)
1993 2000
  * @return string Formatted date
Please login to merge, or discard this patch.
main/inc/lib/myspace.lib.php 1 patch
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -679,7 +679,6 @@  discard block
 block discarded – undo
679 679
      * @param   int $sessionId  The session ID
680 680
      * @param   int $courseId   The course ID
681 681
      * @param   int $exerciseId The quiz ID
682
-     * @param   int $answer Answer status (0 = incorrect, 1 = correct, 2 = both)
683 682
      * @return  string  HTML array of results formatted for gridJS
684 683
      * @author César Perales <[email protected]>, Beeznest Team
685 684
      */
@@ -898,6 +897,7 @@  discard block
 block discarded – undo
898 897
      * @param int Number of items to select
899 898
      * @param string Column to order on
900 899
      * @param string Order direction
900
+     * @param integer $number_of_items
901 901
      * @return array Results
902 902
      */
903 903
     public static function get_course_data_tracking_overview($from, $number_of_items, $column, $direction)
@@ -1235,6 +1235,7 @@  discard block
 block discarded – undo
1235 1235
      * @param int Number of items to select
1236 1236
      * @param string Column to order on
1237 1237
      * @param string Order direction
1238
+     * @param integer $number_of_items
1238 1239
      * @return array Results
1239 1240
      */
1240 1241
     public static function get_session_data_tracking_overview($from, $number_of_items, $column, $direction)
@@ -1255,7 +1256,6 @@  discard block
 block discarded – undo
1255 1256
     /**
1256 1257
      * Fills in session reporting data
1257 1258
      *
1258
-     * @param integer $user_id the id of the user
1259 1259
      * @param array $url_params additonal url parameters
1260 1260
      * @param array $row the row information (the other columns)
1261 1261
      * @return string html code
@@ -1888,6 +1888,7 @@  discard block
 block discarded – undo
1888 1888
      * @author Patrick Cool <[email protected]>, Ghent University, Belgium
1889 1889
      * @version Dokeos 1.8.6
1890 1890
      * @since October 2008
1891
+     * @param integer $number_of_items
1891 1892
      */
1892 1893
     public static function get_user_data_tracking_overview($from, $number_of_items, $column, $direction)
1893 1894
     {
@@ -1990,7 +1991,6 @@  discard block
 block discarded – undo
1990 1991
     /**
1991 1992
      * Checks if there are repeted users in a given array
1992 1993
      * @param  array $usernames list of the usernames in the uploaded file
1993
-     * @param  array $user_array['username'] and $user_array['sufix'] where sufix is the number part in a login i.e -> jmontoya2
1994 1994
      * @return array with the $usernames array and the $user_array array
1995 1995
      * @author Julio Montoya
1996 1996
      */
@@ -2165,6 +2165,7 @@  discard block
 block discarded – undo
2165 2165
 
2166 2166
     /**
2167 2167
      * Adds missing user-information (which isn't required, like password, etc).
2168
+     * @return integer
2168 2169
      */
2169 2170
     function complete_missing_data($user) {
2170 2171
         // 1. Generate a password if it is necessary.
Please login to merge, or discard this patch.