Completed
Push — 1.10.x ( ad23de...73a570 )
by Yannick
448:11 queued 407:15
created
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.
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/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/sessionmanager.lib.php 1 patch
Doc Comments   +24 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1336,9 +1336,9 @@  discard block
 block discarded – undo
1336 1336
      * @param integer   $sessionCategoryId
1337 1337
      * @param int       $visibility
1338 1338
      * @param string    $description
1339
-     * @param bool      $showDescription
1339
+     * @param integer      $showDescription
1340 1340
      * @param int       $duration
1341
-     * @param array     $extraFields
1341
+     * @param boolean|null     $extraFields
1342 1342
      * @param int       $sessionAdminId
1343 1343
      * @param boolean $sendSubscriptionNotification Optional.
1344 1344
      *          Whether send a mail notification to users being subscribed
@@ -1558,7 +1558,7 @@  discard block
 block discarded – undo
1558 1558
      * @param array $user_list
1559 1559
      * @param int $session_visibility
1560 1560
      * @param bool $empty_users
1561
-     * @return bool
1561
+     * @return false|null
1562 1562
      */
1563 1563
     public static function suscribe_users_to_session(
1564 1564
         $id_session,
@@ -1830,7 +1830,7 @@  discard block
 block discarded – undo
1830 1830
      * @param array $courseInfo
1831 1831
      * @param int $status
1832 1832
      * @param bool $updateTotal
1833
-     * @return bool
1833
+     * @return false|null
1834 1834
      */
1835 1835
     public static function removeUsersFromCourseSession(
1836 1836
         $userList,
@@ -1896,7 +1896,7 @@  discard block
 block discarded – undo
1896 1896
      * @param string $course_code
1897 1897
      * @param int $session_visibility
1898 1898
      * @param bool $removeUsersNotInList
1899
-     * @return bool
1899
+     * @return false|null
1900 1900
      */
1901 1901
     public static function subscribe_users_to_session_course(
1902 1902
         $user_list,
@@ -2079,7 +2079,7 @@  discard block
 block discarded – undo
2079 2079
      * @param	bool	$removeExistingCoursesWithUsers Whether to unsubscribe
2080 2080
      * existing courses and users (true, default) or not (false)
2081 2081
      * @param $copyEvaluation from base course to session course
2082
-     * @return	void	Nothing, or false on error
2082
+     * @return	false|null	Nothing, or false on error
2083 2083
      * */
2084 2084
     public static function add_courses_to_session(
2085 2085
         $sessionId,
@@ -2275,6 +2275,8 @@  discard block
 block discarded – undo
2275 2275
      *
2276 2276
      * @param int Session id
2277 2277
      * @param int Course id
2278
+     * @param integer $session_id
2279
+     * @param integer $course_id
2278 2280
      * @return bool True in case of success, false otherwise
2279 2281
      */
2280 2282
     public static function unsubscribe_course_from_session($session_id, $course_id)
@@ -2330,7 +2332,7 @@  discard block
 block discarded – undo
2330 2332
      * @param	string	$variable Field's internal variable name
2331 2333
      * @param	int		$fieldType Field's type
2332 2334
      * @param	string	$displayText Field's language var name
2333
-     * @return int     new extra field id
2335
+     * @return boolean     new extra field id
2334 2336
      */
2335 2337
     public static function create_session_extra_field($variable, $fieldType, $displayText)
2336 2338
     {
@@ -2349,7 +2351,7 @@  discard block
 block discarded – undo
2349 2351
      * @param	integer	Course ID
2350 2352
      * @param	string	Field variable name
2351 2353
      * @param	string	Field value
2352
-     * @return	boolean	true if field updated, false otherwise
2354
+     * @return	boolean|null	true if field updated, false otherwise
2353 2355
      */
2354 2356
     public static function update_session_extra_field_value($sessionId, $variable, $value = '')
2355 2357
     {
@@ -2554,7 +2556,7 @@  discard block
 block discarded – undo
2554 2556
      * @param	array	id_checked
2555 2557
      * @param	bool	include delete session
2556 2558
      * @param	bool	optional, true if the function is called by a webservice, false otherwise.
2557
-     * @return	void	Nothing, or false on error
2559
+     * @return	boolean	Nothing, or false on error
2558 2560
      * The parameters is a array to delete sessions
2559 2561
      * */
2560 2562
     public static function delete_session_category($id_checked, $delete_session = false, $from_ws = false)
@@ -3049,6 +3051,7 @@  discard block
 block discarded – undo
3049 3051
      * @param string $orderCondition
3050 3052
      * @param string $keyword
3051 3053
      * @param string $description
3054
+     * @param integer $status
3052 3055
      * @return array sessions
3053 3056
      */
3054 3057
     public static function getSessionsFollowedByUser(
@@ -3261,8 +3264,8 @@  discard block
 block discarded – undo
3261 3264
     /**
3262 3265
      * Gets the list of courses by session filtered by access_url
3263 3266
      *
3264
-     * @param $userId
3265
-     * @param $sessionId
3267
+     * @param integer $userId
3268
+     * @param null|integer $sessionId
3266 3269
      * @param null $from
3267 3270
      * @param null $limit
3268 3271
      * @param null $column
@@ -3387,6 +3390,7 @@  discard block
 block discarded – undo
3387 3390
     /**
3388 3391
      * Gets the count of courses by session filtered by access_url
3389 3392
      * @param int session id
3393
+     * @param integer $session_id
3390 3394
      * @return array list of courses
3391 3395
      */
3392 3396
     public static function getCourseCountBySessionId($session_id, $keyword = null)
@@ -3638,6 +3642,7 @@  discard block
 block discarded – undo
3638 3642
      * Updates a session status
3639 3643
      * @param	int 	session id
3640 3644
      * @param	int 	status
3645
+     * @param integer $status
3641 3646
      */
3642 3647
     public static function set_session_status($session_id, $status)
3643 3648
     {
@@ -3949,7 +3954,7 @@  discard block
 block discarded – undo
3949 3954
 
3950 3955
     /**
3951 3956
      * @param $id
3952
-     * @return bool
3957
+     * @return null|boolean
3953 3958
      */
3954 3959
     public static function protect_teacher_session_edit($id)
3955 3960
     {
@@ -4013,7 +4018,7 @@  discard block
 block discarded – undo
4013 4018
      *  true: if the session exists it will be updated.
4014 4019
      *  false: if session exists a new session will be created adding a counter session1, session2, etc
4015 4020
      * @param int $defaultUserId
4016
-     * @param mixed $logger
4021
+     * @param Logger $logger
4017 4022
      * @param array $extraFields convert a file row to an extra field. Example in CSV file there's a SessionID then it will
4018 4023
      * converted to extra_external_session_id if you set this: array('SessionId' => 'extra_external_session_id')
4019 4024
      * @param string $extraFieldId
@@ -5255,7 +5260,6 @@  discard block
 block discarded – undo
5255 5260
      * @param string $lastConnectionDate
5256 5261
      * @param array $sessionIdList
5257 5262
      * @param array $studentIdList
5258
-     * @param int $userStatus STUDENT|COURSEMANAGER constants
5259 5263
      *
5260 5264
      * @return array|int
5261 5265
      */
@@ -5407,7 +5411,7 @@  discard block
 block discarded – undo
5407 5411
     /**
5408 5412
      * Get the list of course tools that have to be dealt with in case of
5409 5413
      * registering any course to a session
5410
-     * @return array The list of tools to be dealt with (literal names)
5414
+     * @return string[] The list of tools to be dealt with (literal names)
5411 5415
      */
5412 5416
     public static function getCourseToolToBeManaged()
5413 5417
     {
@@ -5421,7 +5425,7 @@  discard block
 block discarded – undo
5421 5425
      * Calls the methods bound to each tool when a course is registered into a session
5422 5426
      * @param int $sessionId
5423 5427
      * @param int $courseId
5424
-     * @return void
5428
+     * @return boolean|null
5425 5429
      */
5426 5430
     public static function installCourse($sessionId, $courseId)
5427 5431
     {
@@ -6061,6 +6065,7 @@  discard block
 block discarded – undo
6061 6065
      * @param int $categoryId The internal ID of the session category
6062 6066
      * @param string $target Value to search for in the session field values
6063 6067
      * @param array $extraFields A list of fields to be scanned and returned
6068
+     * @param DateTime $publicationDate
6064 6069
      * @return mixed
6065 6070
      */
6066 6071
     public static function getShortSessionListAndExtraByCategory($categoryId, $target, $extraFields = null, $publicationDate = null)
@@ -7390,7 +7395,7 @@  discard block
 block discarded – undo
7390 7395
     /**
7391 7396
      * Get link to the admin page for this session
7392 7397
      * @param   int $id Session ID
7393
-     * @return mixed    URL to the admin page to manage the session, or false on error
7398
+     * @return false|string    URL to the admin page to manage the session, or false on error
7394 7399
      */
7395 7400
     public static function getAdminPath($id)
7396 7401
     {
@@ -7407,7 +7412,7 @@  discard block
 block discarded – undo
7407 7412
      * If a course is provided, build the link to the course
7408 7413
      * @param   int $id Session ID
7409 7414
      * @param   int $courseId Course ID (optional) in case the link has to send straight to the course
7410
-     * @return mixed    URL to the page to use the session, or false on error
7415
+     * @return false|string    URL to the page to use the session, or false on error
7411 7416
      */
7412 7417
     public static function getPath($id, $courseId = 0)
7413 7418
     {
@@ -7505,7 +7510,7 @@  discard block
 block discarded – undo
7505 7510
     /**
7506 7511
      * Return true if coach is allowed to access this session
7507 7512
      * @param int $sessionId
7508
-     * @return bool
7513
+     * @return integer
7509 7514
      */
7510 7515
     public static function isSessionDateOkForCoach($sessionId)
7511 7516
     {
Please login to merge, or discard this patch.
main/inc/lib/blog.lib.php 1 patch
Doc Comments   +7 added lines, -11 removed lines patch added patch discarded remove patch
@@ -96,9 +96,7 @@  discard block
 block discarded – undo
96 96
 	/**
97 97
 	 * Creates a new blog in the given course
98 98
 	 * @author Toon Keppens
99
-	 * @param int $course_id Id
100 99
 	 * @param string $title
101
-	 * @param Text $description
102 100
 	 */
103 101
 	public static function create_blog($title, $subtitle)
104 102
 	{
@@ -185,9 +183,7 @@  discard block
 block discarded – undo
185 183
 	/**
186 184
 	 * Update title and subtitle of a blog in the given course
187 185
 	 * @author Toon Keppens
188
-	 * @param int $course_id Id
189 186
 	 * @param string $title
190
-	 * @param string $description
191 187
 	 */
192 188
 	public static function edit_blog($blog_id, $title, $subtitle)
193 189
 	{
@@ -711,7 +707,6 @@  discard block
 block discarded – undo
711 707
 	/**
712 708
 	 * Deletes an assigned task from a blog
713 709
 	 * @param Integer $blog_id
714
-	 * @param Integer $assignment_id
715 710
 	 */
716 711
 	public static function delete_assigned_task($blog_id, $task_id, $user_id)
717 712
 	{
@@ -1129,9 +1124,7 @@  discard block
 block discarded – undo
1129 1124
 	 *
1130 1125
 	 * @param String $type
1131 1126
 	 * @param Integer $blog_id
1132
-	 * @param Integer $item_id
1133
-	 *
1134
-	 *@return String
1127
+	 * @param integer $post_id
1135 1128
 	 */
1136 1129
 	public static function display_rating_form ($type, $blog_id, $post_id, $comment_id = NULL)
1137 1130
 	{
@@ -2136,7 +2129,7 @@  discard block
 block discarded – undo
2136 2129
 	 *
2137 2130
 	 * @param Integer $blog_id
2138 2131
 	 *
2139
-	 * @return Html Form with sortable table with users to unsubcribe from a blog.
2132
+	 * @return false|null Form with sortable table with users to unsubcribe from a blog.
2140 2133
 	 */
2141 2134
 	public static function display_form_user_unsubscribe ($blog_id)
2142 2135
 	{
@@ -2257,6 +2250,7 @@  discard block
 block discarded – undo
2257 2250
 	 * @author Toon Keppens
2258 2251
 	 *
2259 2252
 	 * @param Integer $blog_id
2253
+	 * @param integer $post_id
2260 2254
 	 */
2261 2255
 	public static function display_new_comment_form($blog_id, $post_id, $title)
2262 2256
 	{
@@ -2305,10 +2299,8 @@  discard block
 block discarded – undo
2305 2299
 	 * @author Patrick Cool
2306 2300
 	 * @author Toon Keppens
2307 2301
 	 *
2308
-	 * @param Array $blogitems an array containing all the blog items for the given month
2309 2302
 	 * @param Integer $month: the integer value of the month we are viewing
2310 2303
 	 * @param Integer $year: the 4-digit year indication e.g. 2005
2311
-	 * @param String $monthName: the language variable for the mont name
2312 2304
 	 *
2313 2305
 	 * @return html code
2314 2306
 	*/
@@ -2597,6 +2589,7 @@  discard block
 block discarded – undo
2597 2589
  * @param the blog's id
2598 2590
  * @param the post's id
2599 2591
  * @param the comment's id
2592
+ * @param integer $blog_id
2600 2593
  * @return array with the post info according the parameters
2601 2594
  * @author Julio Montoya Dokeos
2602 2595
  * @version avril 2008, dokeos 1.8.5
@@ -2638,6 +2631,9 @@  discard block
 block discarded – undo
2638 2631
  * @param the blog's id
2639 2632
  * @param the post's id
2640 2633
  * @param the comment's id
2634
+ * @param integer $blog_id
2635
+ * @param integer $post_id
2636
+ * @param integer $comment_id
2641 2637
  * @author Julio Montoya Dokeos
2642 2638
  * @version avril 2008, dokeos 1.8.5
2643 2639
  */
Please login to merge, or discard this patch.
main/exercice/exercise.class.php 1 patch
Doc Comments   +13 added lines, -8 removed lines patch added patch discarded remove patch
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
     }
355 355
 
356 356
     /**
357
-     * @return int
357
+     * @return string
358 358
      */
359 359
     public function selectPassPercentage()
360 360
     {
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
      * tells if questions are selected randomly, and if so returns the draws
474 474
      *
475 475
      * @author Olivier Brouckaert
476
-     * @return integer - 0 if not random, otherwise the draws
476
+     * @return boolean - 0 if not random, otherwise the draws
477 477
      */
478 478
     public function isRandom()
479 479
     {
@@ -2830,7 +2830,7 @@  discard block
 block discarded – undo
2830 2830
      * @param int  int lp id
2831 2831
      * @param int  int lp item id
2832 2832
      * @param int  int lp item_view id
2833
-     * @param float $weight
2833
+     * @param integer $weight
2834 2834
      * @param array question list
2835 2835
      */
2836 2836
     public function save_stat_track_exercise_info(
@@ -5118,6 +5118,7 @@  discard block
 block discarded – undo
5118 5118
     /**
5119 5119
      * Sends a notification when a user ends an examn
5120 5120
      *
5121
+     * @param integer $exe_id
5121 5122
      */
5122 5123
     public function send_mail_notification_for_exam($question_list_answers, $origin, $exe_id)
5123 5124
     {
@@ -5198,6 +5199,7 @@  discard block
 block discarded – undo
5198 5199
     /**
5199 5200
      * Sends a notification when a user ends an examn
5200 5201
      *
5202
+     * @param integer $exe_id
5201 5203
      */
5202 5204
     function send_notification_for_open_questions($question_list_answers, $origin, $exe_id)
5203 5205
     {
@@ -5295,6 +5297,9 @@  discard block
 block discarded – undo
5295 5297
         }
5296 5298
     }
5297 5299
 
5300
+    /**
5301
+     * @param integer $exe_id
5302
+     */
5298 5303
     function send_notification_for_oral_questions($question_list_answers, $origin, $exe_id)
5299 5304
     {
5300 5305
         if (api_get_course_setting('email_alert_manager_on_new_quiz') != 1 ) {
@@ -5388,7 +5393,7 @@  discard block
 block discarded – undo
5388 5393
 
5389 5394
     /**
5390 5395
      * @param array $user_data result of api_get_user_info()
5391
-     * @param null $start_date
5396
+     * @param string $start_date
5392 5397
      * @param null $duration
5393 5398
      * @param string $ip Optional. The user IP
5394 5399
      * @return string
@@ -5446,7 +5451,7 @@  discard block
 block discarded – undo
5446 5451
      * @param int     Maximum number of attempts (0 if no limit)
5447 5452
      * @param int     Feedback type
5448 5453
      * @todo this was function was added due the import exercise via CSV
5449
-     * @return    int New exercise ID
5454
+     * @return    string New exercise ID
5450 5455
      */
5451 5456
     public function createExercise(
5452 5457
         $title,
@@ -6795,7 +6800,7 @@  discard block
 block discarded – undo
6795 6800
      * @param bool $show_comment
6796 6801
      * @param null $exercise_feedback
6797 6802
      * @param bool $show_answers
6798
-     * @param null $modelType
6803
+     * @param integer $modelType
6799 6804
      * @param bool $categoryMinusOne
6800 6805
      * @return bool|null|string
6801 6806
      */
@@ -7956,8 +7961,8 @@  discard block
 block discarded – undo
7956 7961
     /**
7957 7962
      * Returns an HTML ribbon to show on top of the exercise result, with
7958 7963
      * colouring depending on the success or failure of the student
7959
-     * @param $score
7960
-     * @param $weight
7964
+     * @param integer $score
7965
+     * @param integer $weight
7961 7966
      * @param bool $check_pass_percentage
7962 7967
      * @return string
7963 7968
      */
Please login to merge, or discard this patch.
main/exercice/TestCategory.php 1 patch
Doc Comments   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
 	 * Return the list of differents categories NAME for a test
368 368
 	 * @param int exercise id
369 369
 	 * @param bool
370
-	 * @return array of string
370
+	 * @return integer of string
371 371
 	 *
372 372
      * @author function rewrote by jmontoya
373 373
 	 */
@@ -983,7 +983,6 @@  discard block
 block discarded – undo
983 983
     /**
984 984
      * Return the id of the test category with title = $in_title
985 985
      * @param $in_title
986
-     * @param int $in_c_id
987 986
      *
988 987
      * @return int is id of test category
989 988
      */
@@ -1011,7 +1010,7 @@  discard block
 block discarded – undo
1011 1010
      * @param int $questionId
1012 1011
      * @param int $courseId
1013 1012
 	 *
1014
-	 * @return int
1013
+	 * @return string|false
1015 1014
      */
1016 1015
     public static function add_category_for_question_id($categoryId, $questionId, $courseId)
1017 1016
     {
Please login to merge, or discard this patch.
main/gradebook/lib/GradebookUtils.php 1 patch
Doc Comments   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,6 +19,7 @@  discard block
 block discarded – undo
19 19
      * @param   int     Visibility (0 hidden, 1 shown)
20 20
      * @param   int     Session ID (optional or 0 if not defined)
21 21
      * @param   int
22
+     * @param integer $resource_type
22 23
      * @return  boolean True on success, false on failure
23 24
      */
24 25
     public static function add_resource_to_course_gradebook(
@@ -117,7 +118,6 @@  discard block
 block discarded – undo
117 118
 
118 119
     /**
119 120
      * Builds an img tag for a gradebook item
120
-     * @param string $type value returned by a gradebookitem's get_icon_name()
121 121
      */
122 122
     public static function build_type_icon_tag($kind, $attributes = array())
123 123
     {
@@ -572,6 +572,9 @@  discard block
 block discarded – undo
572 572
      * @param int The user id
573 573
      * @param float The score obtained for certified
574 574
      * @param Datetime The date when you obtained the certificate
575
+     * @param integer $cat_id
576
+     * @param integer $user_id
577
+     * @param string $date_certificate
575 578
      * @return void()
576 579
      */
577 580
     public static function register_user_info_about_certificate($cat_id, $user_id, $score_certificate, $date_certificate)
@@ -950,7 +953,7 @@  discard block
 block discarded – undo
950 953
     }
951 954
 
952 955
     /**
953
-     * @param array $list_values
956
+     * @param string[] $list_values
954 957
      * @return string
955 958
      */
956 959
     public static function score_badges($list_values)
@@ -1010,7 +1013,7 @@  discard block
 block discarded – undo
1010 1013
     }
1011 1014
 
1012 1015
     /**
1013
-     * @param $result
1016
+     * @param Doctrine\DBAL\Driver\Statement|null $result
1014 1017
      * @return array
1015 1018
      */
1016 1019
     public static function get_user_array_from_sql_result($result)
Please login to merge, or discard this patch.