Completed
Push — 1.11.x ( 4ebb26...e0fce5 )
by José
55:58 queued 28:24
created
main/inc/lib/api.lib.php 1 patch
Doc Comments   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1271,6 +1271,7 @@  discard block
 block discarded – undo
1271 1271
  * Gets the list of courses a specific user is subscribed to
1272 1272
  * @param int       User ID
1273 1273
  * @param boolean   $fetch_session Whether to get session courses or not - NOT YET IMPLEMENTED
1274
+ * @param integer $userid
1274 1275
  * @return array    Array of courses in the form [0]=>('code'=>xxx,'db'=>xxx,'dir'=>xxx,'status'=>d)
1275 1276
  */
1276 1277
 function api_get_user_courses($userid, $fetch_session = true)
@@ -3016,7 +3017,7 @@  discard block
 block discarded – undo
3016 3017
 * on the session visibility
3017 3018
 * @param bool $tutor  Whether to check if the user has the tutor role
3018 3019
 * @param bool  $coach Whether to check if the user has the coach role
3019
-* @return boolean true: the user has the rights to edit, false: he does not
3020
+* @return boolean|null true: the user has the rights to edit, false: he does not
3020 3021
 */
3021 3022
 function api_is_allowed_to_session_edit($tutor = false, $coach = false)
3022 3023
 {
@@ -5197,6 +5198,7 @@  discard block
 block discarded – undo
5197 5198
  * @param string    Whether we want a simple list (display a category) or
5198 5199
  * a grouped list (group by variable as in settings.php default). Values: 'list' or 'group'
5199 5200
  * @param int       Access URL's ID. Optional. Uses 1 by default, which is the unique URL
5201
+ * @param string $cat
5200 5202
  * @return array    Array of database results for the current settings of the current access URL
5201 5203
  */
5202 5204
 function &api_get_settings($cat = null, $ordering = 'list', $access_url = 1, $url_changeable = 0)
@@ -6590,7 +6592,7 @@  discard block
 block discarded – undo
6590 6592
 /**
6591 6593
  * Returns an array of global configuration settings which should be ignored
6592 6594
  * when printing the configuration settings screens
6593
- * @return array Array of strings, each identifying one of the excluded settings
6595
+ * @return string[] Array of strings, each identifying one of the excluded settings
6594 6596
  */
6595 6597
 function api_get_locked_settings() {
6596 6598
     return array(
@@ -6631,6 +6633,7 @@  discard block
 block discarded – undo
6631 6633
  * false if he isn't. If the user ID is given and is an integer, then the same
6632 6634
  * ID is simply returned
6633 6635
  * @param  integer User ID
6636
+ * @param integer $user_id
6634 6637
  * @return boolean Integer User ID is logged in, or false otherwise
6635 6638
  */
6636 6639
 function api_user_is_login($user_id = null) {
@@ -7051,6 +7054,7 @@  discard block
 block discarded – undo
7051 7054
 /**
7052 7055
  * Gets memory limit in bytes
7053 7056
  * @param string The memory size (128M, 1G, 1000K, etc)
7057
+ * @param string $mem
7054 7058
  * @return int
7055 7059
  * @assert (null) === false
7056 7060
  * @assert ('1t')  === 1099511627776
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
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
     }
87 87
 
88 88
     /**
89
-     * @return array
89
+     * @return string[]
90 90
      */
91 91
     public function get_status_list()
92 92
     {
Please login to merge, or discard this patch.
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/display.lib.php 1 patch
Doc Comments   +26 added lines, -17 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     }
34 34
 
35 35
     /**
36
-     * @return array
36
+     * @return string[]
37 37
      */
38 38
     public static function toolList()
39 39
     {
@@ -293,7 +293,6 @@  discard block
 block discarded – undo
293 293
      * 					'page_nr' = The page to display
294 294
      * 					'hide_navigation' =  true to hide the navigation
295 295
      * @param array $query_vars Additional variables to add in the query-string
296
-     * @param array $form actions Additional variables to add in the query-string
297 296
      * @param mixed An array with bool values to know which columns show.
298 297
      * i.e: $visibility_options= array(true, false) we will only show the first column
299 298
      * 				Can be also only a bool value. TRUE: show all columns, FALSE: show nothing
@@ -334,7 +333,6 @@  discard block
 block discarded – undo
334 333
      * 					'page_nr' = The page to display
335 334
      * 					'hide_navigation' =  true to hide the navigation
336 335
      * @param array $query_vars Additional variables to add in the query-string
337
-     * @param array $form actions Additional variables to add in the query-string
338 336
      * @param mixed An array with bool values to know which columns show. i.e:
339 337
      *  $visibility_options= array(true, false) we will only show the first column
340 338
      * 	Can be also only a bool value. TRUE: show all columns, FALSE: show nothing
@@ -391,10 +389,11 @@  discard block
 block discarded – undo
391 389
      * 					'per_page' = number of items to show per page
392 390
      * 					'page_nr' = The page to display
393 391
      * @param array $query_vars Additional variables to add in the query-string
394
-     * @param array $column_show Array of binaries 1= show columns 0. hide a column
392
+     * @param integer[] $column_show Array of binaries 1= show columns 0. hide a column
395 393
      * @param array $column_order An array of integers that let us decide how the columns are going to be sort.
396 394
      * 						      i.e:  $column_order=array('1''4','3','4'); The 2nd column will be order like the 4th column
397 395
      * @param array $form_actions Set optional forms actions
396
+     * @param string $table_name
398 397
      *
399 398
      * @author Julio Montoya
400 399
      */
@@ -449,7 +448,7 @@  discard block
 block discarded – undo
449 448
      *
450 449
      * @deprecated use Display::addFlash with Display::return_message($message, 'normal');
451 450
      *
452
-     * @return void
451
+     * @return string|null
453 452
      */
454 453
     public static function display_normal_message($message, $filter = true, $returnValue = false)
455 454
     {
@@ -481,7 +480,7 @@  discard block
 block discarded – undo
481 480
      * Displays an confirmation message. Use this if something has been done successfully
482 481
      * @param bool	Filter (true) or not (false)
483 482
      * @deprecated use Display::addFlash with Display::return_message
484
-     * @return void
483
+     * @return string|null
485 484
      */
486 485
     public static function display_confirmation_message ($message, $filter = true, $returnValue = false)
487 486
     {
@@ -500,7 +499,7 @@  discard block
 block discarded – undo
500 499
      * @param bool	Filter (true) or not (false)
501 500
      * @deprecated use Display::addFlash with Display::return_message
502 501
      *
503
-     * @return void
502
+     * @return string|null
504 503
      */
505 504
     public static function display_error_message ($message, $filter = true, $returnValue = false)
506 505
     {
@@ -681,6 +680,7 @@  discard block
 block discarded – undo
681 680
      * @param string   The alt text (probably a language variable)
682 681
      * @param array    additional attributes (for instance height, width, onclick, ...)
683 682
      * @param integer  The wanted width of the icon (to be looked for in the corresponding img/icons/ folder)
683
+     * @param string $image
684 684
      * @return void
685 685
     */
686 686
     public static function display_icon(
@@ -917,6 +917,7 @@  discard block
 block discarded – undo
917 917
     /**
918 918
      * Displays an HTML input tag
919 919
      *
920
+     * @param string $type
920 921
      */
921 922
     public static function input($type, $name, $value, $attributes = array())
922 923
     {
@@ -933,8 +934,8 @@  discard block
 block discarded – undo
933 934
     }
934 935
 
935 936
     /**
936
-     * @param $name
937
-     * @param $value
937
+     * @param string $name
938
+     * @param string $value
938 939
      * @param array $attributes
939 940
      * @return string
940 941
      */
@@ -949,6 +950,7 @@  discard block
 block discarded – undo
949 950
     /**
950 951
      * Displays an HTML select tag
951 952
      *
953
+     * @param string $blank_item_text
952 954
      */
953 955
     public static function select(
954 956
         $name,
@@ -1015,8 +1017,8 @@  discard block
 block discarded – undo
1015 1017
                         $( "#tabs" ).tabs();
1016 1018
                     });
1017 1019
                 </script>
1018
-     * @param   array   $headers list of the tab titles
1019
-     * @param   array   $items
1020
+     * @param   string[]   $headers list of the tab titles
1021
+     * @param   string[]   $items
1020 1022
      * @param   string  $id id of the container of the tab in the example "tabs"
1021 1023
      * @param   array   $attributes for the ul
1022 1024
      * @param array $ul_attributes
@@ -1070,7 +1072,7 @@  discard block
 block discarded – undo
1070 1072
 
1071 1073
     /**
1072 1074
      * @param $headers
1073
-     * @param null $selected
1075
+     * @param integer $selected
1074 1076
      *
1075 1077
      * @return string
1076 1078
      */
@@ -1108,6 +1110,7 @@  discard block
 block discarded – undo
1108 1110
      * As you can see both function use the same "my_grid_name" this is very important otherwise nothing will work
1109 1111
      *
1110 1112
      * @param   string  the div id, this value must be the same with the first parameter of Display::grid_js()
1113
+     * @param string $div_id
1111 1114
      * @return  string  html
1112 1115
      *
1113 1116
      */
@@ -1668,6 +1671,8 @@  discard block
 block discarded – undo
1668 1671
      * @param  string  url that will be added (for jquery see hot_courses.tpl)
1669 1672
 	 * @param	string	point info array see function CourseManager::get_course_ranking()
1670 1673
 	 * @param	bool	add a div wrapper
1674
+	 * @param string $id
1675
+	 * @param string $url
1671 1676
 	 * @todo	use     templates
1672 1677
      **/
1673 1678
     public static function return_rating_system($id, $url, $point_info = array(), $add_div_wrapper = true)
@@ -1758,6 +1763,9 @@  discard block
 block discarded – undo
1758 1763
         return '<'.$size.'>'.Security::remove_XSS($title).'</'.$size.'>';
1759 1764
     }
1760 1765
 
1766
+    /**
1767
+     * @param string $title
1768
+     */
1761 1769
     public static function page_subheader2($title, $second_title = null)
1762 1770
     {
1763 1771
         return self::page_header($title, $second_title, 'h4');
@@ -1990,6 +1998,7 @@  discard block
 block discarded – undo
1990 1998
 
1991 1999
     /**
1992 2000
      * @todo use twig
2001
+     * @param string $title
1993 2002
      */
1994 2003
     public static function group_button($title, $elements)
1995 2004
     {
@@ -2361,9 +2370,9 @@  discard block
 block discarded – undo
2361 2370
 
2362 2371
     /**
2363 2372
      * @param int $id
2364
-     * @param array $content
2373
+     * @param string[] $content
2365 2374
      * @param int $col
2366
-     * @param bool|true $right
2375
+     * @param boolean $right
2367 2376
      * @return string
2368 2377
      */
2369 2378
     public static function toolbarAction($id, $content = array(), $col = 2, $right = true)
@@ -2447,10 +2456,10 @@  discard block
 block discarded – undo
2447 2456
     /**
2448 2457
      * @param string $title
2449 2458
      * @param string $content
2450
-     * @param null $id
2459
+     * @param string $id
2451 2460
      * @param array $params
2452
-     * @param null $idAccordion
2453
-     * @param null $idCollapse
2461
+     * @param string $idAccordion
2462
+     * @param string $idCollapse
2454 2463
      * @param bool|true $open
2455 2464
      * @param bool|false $fullClickable
2456 2465
      * @return null|string
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.