Completed
Push — 1.11.x ( d4cbce...fbf9a8 )
by José
48:27
created
main/inc/lib/fileManage.lib.php 1 patch
Doc Comments   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,6 +13,8 @@  discard block
 block discarded – undo
13 13
  * @param  - action (string) - action type require : 'delete' or 'update'
14 14
  * @param  - old_path (string) - old path info stored to change
15 15
  * @param  - new_path (string) - new path info to substitute
16
+ * @param string $action
17
+ * @param string $old_path
16 18
  * @desc Update the file or directory path in the document db document table
17 19
  *
18 20
  */
@@ -75,8 +77,8 @@  discard block
 block discarded – undo
75 77
  * Deletes a file or a directory
76 78
  *
77 79
  * @author - Hugues Peeters
78
- * @param  $file (String) - the path of file or directory to delete
79
- * @return boolean - true if the delete succeed, false otherwise.
80
+ * @param  string $file (String) - the path of file or directory to delete
81
+ * @return boolean|null - true if the delete succeed, false otherwise.
80 82
  * @see    - delete() uses check_name_exist() and removeDir() functions
81 83
  */
82 84
 function my_delete($file)
@@ -163,7 +165,7 @@  discard block
 block discarded – undo
163 165
  * @author Hugues Peeters <[email protected]>
164 166
  * @param  string $file_path complete path of the file or the directory
165 167
  * @param  string $new_file_name new name for the file or the directory
166
- * @return boolean true if succeed, false otherwise
168
+ * @return string|false true if succeed, false otherwise
167 169
  * @see rename() uses the check_name_exist() and php2phps() functions
168 170
  */
169 171
 function my_rename($file_path, $new_file_name) {
@@ -209,7 +211,7 @@  discard block
 block discarded – undo
209 211
  * @param  string $target the path of the new area
210 212
  * @param  bool $forceMove Whether to force a move or to make a copy (safer but slower) and then delete the original
211 213
  * @param	bool $moveContent In some cases (including migrations), we need to move the *content* and not the folder itself
212
- * @return bool true if the move succeed, false otherwise.
214
+ * @return boolean|null true if the move succeed, false otherwise.
213 215
  * @see move() uses check_name_exist() and copyDirTo() functions
214 216
  */
215 217
 function move($source, $target, $forceMove = false, $moveContent = false)
Please login to merge, or discard this patch.
main/inc/lib/internationalization.lib.php 1 patch
Doc Comments   +20 added lines, -14 removed lines patch added patch discarded remove patch
@@ -422,6 +422,7 @@  discard block
 block discarded – undo
422 422
  * If null, the timezone will be determined based on user preference,
423 423
  * or timezone chosen by the admin for the platform.
424 424
  * @param string The timezone to be converted from. If null, UTC will be assumed.
425
+ * @param string $to_timezone
425 426
  * @return string The converted time formatted as Y-m-d H:i:s
426 427
  *
427 428
  * @author Guillaume Viguier <[email protected]>
@@ -666,6 +667,7 @@  discard block
 block discarded – undo
666 667
  * @param mixed The time to be converted
667 668
  * @param mixed Format to be used (TIME_NO_SEC_FORMAT, DATE_FORMAT_SHORT, DATE_FORMAT_LONG, DATE_TIME_FORMAT_LONG)
668 669
  * @param string Timezone to be converted from. If null, UTC will be assumed.
670
+ * @param string $from_timezone
669 671
  * @return string Converted and localized date
670 672
  *
671 673
  * @author Guillaume Viguier <[email protected]>
@@ -735,7 +737,7 @@  discard block
 block discarded – undo
735 737
  * @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.
736 738
  * @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.
737 739
  * @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.
738
- * @return bool							The result is sort of full name of the person.
740
+ * @return string							The result is sort of full name of the person.
739 741
  * Sample results:
740 742
  * Peter Ustinoff or Dr. Peter Ustinoff     - the Western order
741 743
  * Ustinoff Peter or Dr. Ustinoff Peter     - the Eastern order
@@ -1054,8 +1056,8 @@  discard block
 block discarded – undo
1054 1056
 
1055 1057
 /**
1056 1058
  * This function returns a string or an array with all occurrences of search in subject (ignoring case) replaced with the given replace value.
1057
- * @param mixed $search					String or array of strings to be found.
1058
- * @param mixed $replace				String or array of strings used for replacement.
1059
+ * @param string $search					String or array of strings to be found.
1060
+ * @param string $replace				String or array of strings used for replacement.
1059 1061
  * @param mixed $subject				String or array of strings being searched.
1060 1062
  * @param int $count (optional)			The number of matched and replaced needles will be returned in count, which is passed by reference.
1061 1063
  * @param string $encoding (optional)	The used internally by this function character encoding.
@@ -1118,10 +1120,10 @@  discard block
 block discarded – undo
1118 1120
 /**
1119 1121
  * Finds first occurrence of a string within another, case insensitive.
1120 1122
  * @param string $haystack					The string from which to get the first occurrence.
1121
- * @param mixed $needle						The string to be found.
1123
+ * @param string $needle						The string to be found.
1122 1124
  * @param bool $before_needle (optional)	Determines which portion of $haystack this function returns. The default value is FALSE.
1123 1125
  * @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.
1124
- * @return mixed							Returns the portion of $haystack, or FALSE if $needle is not found.
1126
+ * @return false|string							Returns the portion of $haystack, or FALSE if $needle is not found.
1125 1127
  * Notes:
1126 1128
  * 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.
1127 1129
  * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence of $needle.
@@ -1177,7 +1179,7 @@  discard block
 block discarded – undo
1177 1179
  * @param mixed $needle						The string which first character is to be found.
1178 1180
  * @param bool $before_needle (optional)	Determines which portion of $haystack this function returns. The default value is FALSE.
1179 1181
  * @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.
1180
- * @return mixed							Returns the portion of $haystack, or FALSE if the first character from $needle is not found.
1182
+ * @return false|string							Returns the portion of $haystack, or FALSE if the first character from $needle is not found.
1181 1183
  * Notes:
1182 1184
  * 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.
1183 1185
  * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence.
@@ -1244,7 +1246,7 @@  discard block
 block discarded – undo
1244 1246
  * @param mixed $needle						The string to be found.
1245 1247
  * @param bool $before_needle (optional)	Determines which portion of $haystack this function returns. The default value is FALSE.
1246 1248
  * @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.
1247
- * @return mixed							Returns the portion of $haystack, or FALSE if $needle is not found.
1249
+ * @return false|string							Returns the portion of $haystack, or FALSE if $needle is not found.
1248 1250
  * Notes:
1249 1251
  * 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.
1250 1252
  * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence of $needle.
@@ -1387,7 +1389,7 @@  discard block
 block discarded – undo
1387 1389
  * 										Note that this changes the return value in an array where every element is an array consisting of the matched string at index 0 and its string offset into subject at index 1.
1388 1390
  * @param int $offset (optional)		Normally, the search starts from the beginning of the subject string. The optional parameter offset can be used to specify the alternate place from which to start the search.
1389 1391
  * @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.
1390
- * @return int|boolean					Returns the number of times pattern matches or FALSE if an error occurred.
1392
+ * @return integer					Returns the number of times pattern matches or FALSE if an error occurred.
1391 1393
  * @link http://php.net/preg_match
1392 1394
  */
1393 1395
 function api_preg_match($pattern, $subject, &$matches = null, $flags = 0, $offset = 0, $encoding = null) {
@@ -1410,7 +1412,7 @@  discard block
 block discarded – undo
1410 1412
  * If no order flag is given, PREG_PATTERN_ORDER is assumed.
1411 1413
  * @param int $offset (optional)		Normally, the search starts from the beginning of the subject string. The optional parameter offset can be used to specify the alternate place from which to start the search.
1412 1414
  * @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.
1413
- * @return int|boolean					Returns the number of full pattern matches (which might be zero), or FALSE if an error occurred.
1415
+ * @return integer					Returns the number of full pattern matches (which might be zero), or FALSE if an error occurred.
1414 1416
  * @link http://php.net/preg_match_all
1415 1417
  */
1416 1418
 function api_preg_match_all($pattern, $subject, &$matches, $flags = PREG_PATTERN_ORDER, $offset = 0, $encoding = null) {
@@ -1425,8 +1427,8 @@  discard block
 block discarded – undo
1425 1427
 
1426 1428
 /**
1427 1429
  * Performs a regular expression search and replace, UTF-8 aware when it is applicable.
1428
- * @param string|array $pattern			The pattern to search for. It can be either a string or an array with strings.
1429
- * @param string|array $replacement		The string or an array with strings to replace.
1430
+ * @param string $pattern			The pattern to search for. It can be either a string or an array with strings.
1431
+ * @param string $replacement		The string or an array with strings to replace.
1430 1432
  * @param string|array $subject			The string or an array with strings to search and replace.
1431 1433
  * @param int $limit					The maximum possible replacements for each pattern in each subject string. Defaults to -1 (no limit).
1432 1434
  * @param int &$count					If specified, this variable will be filled with the number of replacements done.
@@ -1574,7 +1576,7 @@  discard block
 block discarded – undo
1574 1576
 
1575 1577
 /**
1576 1578
  * This function checks whether two $encoding are equal (same, equvalent).
1577
- * @param string|array $encoding1		The first encoding
1579
+ * @param string $encoding1		The first encoding
1578 1580
  * @param string|array $encoding2		The second encoding
1579 1581
  * @param bool $strict					When this parameter is TRUE the comparison ignores aliases of encodings.
1580 1582
  * When the parameter is FALSE, aliases are taken into account.
@@ -1678,6 +1680,7 @@  discard block
 block discarded – undo
1678 1680
 /**
1679 1681
  * Checks a string for UTF-8 validity.
1680 1682
  *
1683
+ * @param string $string
1681 1684
  */
1682 1685
 function api_is_valid_utf8(&$string)
1683 1686
 {
@@ -1820,7 +1823,7 @@  discard block
 block discarded – undo
1820 1823
 /**
1821 1824
  * Replaces non-valid formats for person names with the default (English) format.
1822 1825
  * @param string $format	The input format to be verified.
1823
- * @return bool				Returns the same format if is is valid, otherwise returns a valid English format.
1826
+ * @return string				Returns the same format if is is valid, otherwise returns a valid English format.
1824 1827
  */
1825 1828
 function _api_validate_person_name_format($format) {
1826 1829
     if (empty($format) || stripos($format, '%f') === false || stripos($format, '%l') === false) {
@@ -1947,6 +1950,9 @@  discard block
 block discarded – undo
1947 1950
 
1948 1951
 // This function checks whether the function _api_convert_encoding() (the php-
1949 1952
 // implementation) is able to convert from/to a given encoding.
1953
+/**
1954
+ * @param string $encoding
1955
+ */
1950 1956
 function _api_convert_encoding_supports($encoding) {
1951 1957
     static $supports = array();
1952 1958
     if (!isset($supports[$encoding])) {
@@ -1957,7 +1963,7 @@  discard block
 block discarded – undo
1957 1963
 
1958 1964
 /**
1959 1965
  * Given a date object, return a human or ISO format, with or without h:m:s
1960
- * @param object $date The Date object
1966
+ * @param DateTime $date The Date object
1961 1967
  * @param bool $showTime Whether to show the time and date (true) or only the date (false)
1962 1968
  * @param bool $humanForm Whether to show day-month-year (true) or year-month-day (false)
1963 1969
  * @return string Formatted date
Please login to merge, or discard this patch.
plugin/vchamilo/lib.php 1 patch
Doc Comments   +22 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 /**
134 134
 * provides a side connection to a vchamilo database
135 135
 * @param array $vchamilo
136
-* @return a connection
136
+* @return null|Doctrine\DBAL\Connection connection
137 137
 */
138 138
 function vchamilo_boot_connection(&$_configuration)
139 139
 {
@@ -607,6 +607,11 @@  discard block
 block discarded – undo
607 607
     }
608 608
 }
609 609
 
610
+/**
611
+ * @param string $path
612
+ *
613
+ * @return string
614
+ */
610 615
 function chop_last_slash($path)
611 616
 {
612 617
     return preg_replace('/\/$/', '', $path);
@@ -765,6 +770,9 @@  discard block
 block discarded – undo
765 770
     return $str;
766 771
 }
767 772
 
773
+/**
774
+ * @param string $key
775
+ */
768 776
 function print_error($key, $component = '', $passthru = false, $extrainfo = ''){
769 777
     global $debuglevel;
770 778
     global $debugdisplay;
@@ -777,6 +785,10 @@  discard block
 block discarded – undo
777 785
     ctrace('ERROR: '. $str);
778 786
 }
779 787
 
788
+/**
789
+ * @param string $message
790
+ * @param integer $level
791
+ */
780 792
 function debugging($message, $level) {
781 793
     global $debuglevel;
782 794
     global $debugdisplay;
@@ -789,6 +801,9 @@  discard block
 block discarded – undo
789 801
     }
790 802
 }
791 803
 
804
+/**
805
+ * @param string $str
806
+ */
792 807
 function ctrace($str) {
793 808
     if (!defined('CLI_SCRIPT')) echo "<pre>";
794 809
     Display::addFlash(Display::return_message($str));
@@ -1072,6 +1087,9 @@  discard block
 block discarded – undo
1072 1087
     die("Missing expected param $key in request input");
1073 1088
 }
1074 1089
 
1090
+/**
1091
+ * @param integer $default
1092
+ */
1075 1093
 function optional_param($key, $default, $type = 0)
1076 1094
 {
1077 1095
     if (array_key_exists($key, $_REQUEST)) {
@@ -1082,6 +1100,9 @@  discard block
 block discarded – undo
1082 1100
     return $default;
1083 1101
 }
1084 1102
 
1103
+/**
1104
+ * @param integer $type
1105
+ */
1085 1106
 function param_filter_type($value, $type)
1086 1107
 {
1087 1108
     switch($type) {
Please login to merge, or discard this patch.
main/inc/lib/tracking.lib.php 1 patch
Doc Comments   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1333,6 +1333,8 @@  discard block
 block discarded – undo
1333 1333
      * @param   string type of time filter: 'last_week' or 'custom'
1334 1334
      * @param   string  start date date('Y-m-d H:i:s')
1335 1335
      * @param   string  end date date('Y-m-d H:i:s')
1336
+     * @param string $start_date
1337
+     * @param string $end_date
1336 1338
      * @return timestamp $nb_seconds
1337 1339
      */
1338 1340
     public static function get_time_spent_on_the_platform(
@@ -1435,7 +1437,7 @@  discard block
 block discarded – undo
1435 1437
      * Get first connection date for a student
1436 1438
      * @param    int $student_id
1437 1439
      *
1438
-     * @return    string|bool Date format long without day or false if there are no connections
1440
+     * @return    string|false Date format long without day or false if there are no connections
1439 1441
      */
1440 1442
     public static function get_first_connection_date($student_id)
1441 1443
     {
@@ -1465,7 +1467,7 @@  discard block
 block discarded – undo
1465 1467
      * @param int $student_id
1466 1468
      * @param bool $warning_message Show a warning message (optional)
1467 1469
      * @param bool $return_timestamp True for returning results in timestamp (optional)
1468
-     * @return string|int|bool Date format long without day, false if there are no connections or
1470
+     * @return string Date format long without day, false if there are no connections or
1469 1471
      * timestamp if parameter $return_timestamp is true
1470 1472
      */
1471 1473
     public static function get_last_connection_date($student_id, $warning_message = false, $return_timestamp = false)
@@ -2762,6 +2764,9 @@  discard block
 block discarded – undo
2762 2764
      * @param     array         Limit average to listed lp ids
2763 2765
      * @param     int            Session id (optional), if param $session_id is
2764 2766
      * null(default) it'll return results including sessions, 0 = session is not filtered
2767
+     * @param integer $student_id
2768
+     * @param string $course_code
2769
+     * @param integer $session_id
2765 2770
      * @return     int         Total time
2766 2771
      */
2767 2772
     public static function get_time_spent_in_lp($student_id, $course_code, $lp_ids = array(), $session_id = null)
@@ -2831,6 +2836,8 @@  discard block
 block discarded – undo
2831 2836
      * @param     int|array    Student id(s)
2832 2837
      * @param     string         Course code
2833 2838
      * @param     int         Learning path id
2839
+     * @param integer $student_id
2840
+     * @param string $course_code
2834 2841
      * @return     int         Total time
2835 2842
      */
2836 2843
     public static function get_last_connection_time_in_lp($student_id, $course_code, $lp_id, $session_id = 0)
@@ -5504,7 +5511,7 @@  discard block
 block discarded – undo
5504 5511
 
5505 5512
     /**
5506 5513
     * @param FormValidator $form
5507
-    * @return mixed
5514
+    * @return FormValidator
5508 5515
     */
5509 5516
     public static function setUserSearchForm($form)
5510 5517
     {
@@ -6985,7 +6992,7 @@  discard block
 block discarded – undo
6985 6992
      * @param int $user_id
6986 6993
      * @param int $course_id
6987 6994
      * @param int $session_id
6988
-     * @return array
6995
+     * @return string[]
6989 6996
      */
6990 6997
     public function display_login_tracking_info($view, $user_id, $course_id, $session_id = 0)
6991 6998
     {
@@ -7031,9 +7038,9 @@  discard block
 block discarded – undo
7031 7038
     /**
7032 7039
      * Displays the exercise results for a specific user in a specific course.
7033 7040
      * @param   string $view
7034
-     * @param   int $user_id    User ID
7041
+     * @param   int $userId    User ID
7035 7042
      * @param   string  $courseCode Course code
7036
-     * @return array
7043
+     * @return string[]
7037 7044
      * @todo remove globals
7038 7045
      */
7039 7046
     public function display_exercise_tracking_info($view, $userId, $courseCode)
Please login to merge, or discard this patch.
main/inc/lib/usermanager.lib.php 1 patch
Doc Comments   +34 added lines, -15 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     /**
139 139
      * Validates the password
140 140
      *
141
-     * @param $encoded
141
+     * @param string $encoded
142 142
      * @param $raw
143 143
      * @param $salt
144 144
      * @return bool
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
      * @param string $raw
161 161
      * @param User   $user
162 162
      *
163
-     * @return bool
163
+     * @return string
164 164
      */
165 165
     public static function encryptPassword($raw, User $user)
166 166
     {
@@ -979,6 +979,7 @@  discard block
 block discarded – undo
979 979
      * Disables or enables a user
980 980
      * @param int user_id
981 981
      * @param int Enable or disable
982
+     * @param integer $active
982 983
      * @return void
983 984
      * @assert (-1,0) === false
984 985
      * @assert (1,1) === true
@@ -1009,6 +1010,7 @@  discard block
 block discarded – undo
1009 1010
     /**
1010 1011
      * Disables a user
1011 1012
      * @param int User id
1013
+     * @param integer $user_id
1012 1014
      * @return bool
1013 1015
      * @uses UserManager::change_active_state() to actually disable the user
1014 1016
      * @assert (0) === false
@@ -1025,6 +1027,7 @@  discard block
 block discarded – undo
1025 1027
     /**
1026 1028
      * Enable a user
1027 1029
      * @param int User id
1030
+     * @param integer $user_id
1028 1031
      * @return bool
1029 1032
      * @uses UserManager::change_active_state() to actually disable the user
1030 1033
      * @assert (0) === false
@@ -1189,6 +1192,7 @@  discard block
 block discarded – undo
1189 1192
      * Checks whether the user id exists in the database
1190 1193
      *
1191 1194
      * @param int User id
1195
+     * @param integer $userId
1192 1196
      * @return bool True if user id was found, false otherwise
1193 1197
      */
1194 1198
     public static function is_user_id_valid($userId)
@@ -1386,7 +1390,7 @@  discard block
 block discarded – undo
1386 1390
      * @param   array $userInfo user information to avoid query the DB
1387 1391
      * returns the /main/img/unknown.jpg image set it at true
1388 1392
      *
1389
-     * @return    array     Array of 2 elements: 'dir' and 'file' which contain
1393
+     * @return    integer     Array of 2 elements: 'dir' and 'file' which contain
1390 1394
      * the dir and file as the name implies if image does not exist it will
1391 1395
      * return the unknow image if anonymous parameter is true if not it returns an empty array
1392 1396
      */
@@ -1754,7 +1758,7 @@  discard block
 block discarded – undo
1754 1758
      * @param    int $user_id    User id
1755 1759
      * @param    $force    Optional parameter to force building after a removal request
1756 1760
      *
1757
-     * @return    A string containing the XHTML code to dipslay the production list, or FALSE
1761
+     * @return    boolean|string string containing the XHTML code to dipslay the production list, or FALSE
1758 1762
      */
1759 1763
     public static function build_production_list($user_id, $force = false, $showdelete = false)
1760 1764
     {
@@ -1790,7 +1794,7 @@  discard block
 block discarded – undo
1790 1794
     /**
1791 1795
      * Returns an array with the user's productions.
1792 1796
      *
1793
-     * @param    $user_id    User id
1797
+     * @param    integer $user_id    User id
1794 1798
      * @return   array  An array containing the user's productions
1795 1799
      */
1796 1800
     public static function get_user_productions($user_id)
@@ -1945,7 +1949,7 @@  discard block
 block discarded – undo
1945 1949
 
1946 1950
     /**
1947 1951
      * Build a list of extra file already uploaded in $user_folder/{$extra_field}/
1948
-     * @param $user_id
1952
+     * @param integer $user_id
1949 1953
      * @param $extra_field
1950 1954
      * @param bool $force
1951 1955
      * @param bool $showdelete
@@ -2050,7 +2054,7 @@  discard block
 block discarded – undo
2050 2054
      * @param    int       $fieldType  Field's type
2051 2055
      * @param    string    $displayText Field's language var name
2052 2056
      * @param    string    $default Field's default value
2053
-     * @return int
2057
+     * @return boolean
2054 2058
      */
2055 2059
     public static function create_extra_field($variable, $fieldType, $displayText, $default)
2056 2060
     {
@@ -2084,6 +2088,7 @@  discard block
 block discarded – undo
2084 2088
      * @param    boolean    Whether to prefix the fields indexes with "extra_" (might be used by formvalidator)
2085 2089
      * @param    boolean    Whether to return invisible fields as well
2086 2090
      * @param    boolean    Whether to split multiple-selection fields or not
2091
+     * @param boolean $field_filter
2087 2092
      * @return    array    Array of fields => value for the given user
2088 2093
      */
2089 2094
     public static function get_extra_user_data(
@@ -2315,6 +2320,7 @@  discard block
 block discarded – undo
2315 2320
     /**
2316 2321
      * Get extra user data by field variable
2317 2322
      * @param string    field variable
2323
+     * @param string $field_variable
2318 2324
      * @return array    data
2319 2325
      */
2320 2326
     public static function get_extra_user_data_by_field_variable($field_variable)
@@ -2864,7 +2870,7 @@  discard block
 block discarded – undo
2864 2870
      * @param    string    User ID
2865 2871
      * @param   string  course directory
2866 2872
      * @param   string  resourcetype: images, all
2867
-     * @return    int        User ID (or false if not found)
2873
+     * @return    string        User ID (or false if not found)
2868 2874
      */
2869 2875
     public static function get_user_upload_files_by_course($user_id, $course, $resourcetype = 'all')
2870 2876
     {
@@ -2944,7 +2950,7 @@  discard block
 block discarded – undo
2944 2950
     /**
2945 2951
      * Adds a new API key to the users' account
2946 2952
      * @param   int     Optional user ID (defaults to the results of api_get_user_id())
2947
-     * @return  boolean True on success, false on failure
2953
+     * @return  false|string True on success, false on failure
2948 2954
      */
2949 2955
     public static function add_api_key($user_id = null, $api_service = 'dokeos')
2950 2956
     {
@@ -2999,6 +3005,7 @@  discard block
 block discarded – undo
2999 3005
      * Regenerate an API key from the user's account
3000 3006
      * @param   int     user ID (defaults to the results of api_get_user_id())
3001 3007
      * @param   string  API key's internal ID
3008
+     * @param string $api_service
3002 3009
      * @return  int        num
3003 3010
      */
3004 3011
     public static function update_api_key($user_id, $api_service)
@@ -3028,6 +3035,7 @@  discard block
 block discarded – undo
3028 3035
     /**
3029 3036
      * @param   int     user ID (defaults to the results of api_get_user_id())
3030 3037
      * @param   string    API key's internal ID
3038
+     * @param string $api_service
3031 3039
      * @return  int    row ID, or return false if not found
3032 3040
      */
3033 3041
     public static function get_api_key_id($user_id, $api_service)
@@ -3239,7 +3247,8 @@  discard block
 block discarded – undo
3239 3247
      * @param int user_id
3240 3248
      * @param int field_id
3241 3249
      * @param bool show links or not
3242
-     * @return array
3250
+     * @param integer $user_id
3251
+     * @return string
3243 3252
      */
3244 3253
     public static function get_user_tags_to_string($user_id, $field_id, $show_links = true)
3245 3254
     {
@@ -3284,6 +3293,8 @@  discard block
 block discarded – undo
3284 3293
      * Get the tag id
3285 3294
      * @param int tag
3286 3295
      * @param int field_id
3296
+     * @param string $tag
3297
+     * @param integer $field_id
3287 3298
      * @return int returns 0 if fails otherwise the tag id
3288 3299
      */
3289 3300
     public static function get_tag_id($tag, $field_id)
@@ -3330,7 +3341,9 @@  discard block
 block discarded – undo
3330 3341
      * @param mixed tag
3331 3342
      * @param int The user id
3332 3343
      * @param int field id of the tag
3333
-     * @return bool
3344
+     * @param integer $user_id
3345
+     * @param integer $field_id
3346
+     * @return boolean|null
3334 3347
      */
3335 3348
     public static function add_tag($tag, $user_id, $field_id)
3336 3349
     {
@@ -4148,7 +4161,7 @@  discard block
 block discarded – undo
4148 4161
      * Add subscribed users to a user by relation type
4149 4162
      * @param int $userId The user id
4150 4163
      * @param array $subscribedUsersId The id of suscribed users
4151
-     * @param action $relationType The relation type
4164
+     * @param integer $relationType The relation type
4152 4165
      */
4153 4166
     public static function subscribeUsersToUser($userId, $subscribedUsersId, $relationType, $deleteUsersBeforeInsert = false)
4154 4167
     {
@@ -4213,6 +4226,8 @@  discard block
 block discarded – undo
4213 4226
      * This function check if an user is followed by human resources manager
4214 4227
      * @param     int     User id
4215 4228
      * @param    int        Human resources manager
4229
+     * @param integer $user_id
4230
+     * @param integer $hr_dept_id
4216 4231
      * @return    bool
4217 4232
      */
4218 4233
     public static function is_user_followed_by_drh($user_id, $hr_dept_id)
@@ -4285,6 +4300,8 @@  discard block
 block discarded – undo
4285 4300
      * Determines if a user is a gradebook certified
4286 4301
      * @param int The category id of gradebook
4287 4302
      * @param int The user id
4303
+     * @param integer $cat_id
4304
+     * @param integer $user_id
4288 4305
      * @return boolean
4289 4306
      */
4290 4307
     public static function is_user_certified($cat_id, $user_id)
@@ -4307,6 +4324,8 @@  discard block
 block discarded – undo
4307 4324
      * Gets the info about a gradebook certificate for a user by course
4308 4325
      * @param string The course code
4309 4326
      * @param int The user id
4327
+     * @param integer $course_code
4328
+     * @param integer $user_id
4310 4329
      * @return array  if there is not information return false
4311 4330
      */
4312 4331
     public static function get_info_gradebook_certificate($course_code, $user_id)
@@ -4770,7 +4789,7 @@  discard block
 block discarded – undo
4770 4789
     }
4771 4790
 
4772 4791
     /**
4773
-     * @return array
4792
+     * @return string[]
4774 4793
      */
4775 4794
     static function get_user_field_types()
4776 4795
     {
@@ -5063,7 +5082,7 @@  discard block
 block discarded – undo
5063 5082
 
5064 5083
     /**
5065 5084
      * Get the boss user ID from a followed user id
5066
-     * @param $userId
5085
+     * @param integer $userId
5067 5086
      * @return bool
5068 5087
      */
5069 5088
     public static function getStudentBossList($userId)
@@ -5115,7 +5134,7 @@  discard block
 block discarded – undo
5115 5134
      * Get either a Gravatar URL or complete image tag for a specified email address.
5116 5135
      *
5117 5136
      * @param string $email The email address
5118
-     * @param string $s Size in pixels, defaults to 80px [ 1 - 2048 ]
5137
+     * @param integer $s Size in pixels, defaults to 80px [ 1 - 2048 ]
5119 5138
      * @param string $d Default imageset to use [ 404 | mm | identicon | monsterid | wavatar ]
5120 5139
      * @param string $r Maximum rating (inclusive) [ g | pg | r | x ]
5121 5140
      * @param boole $img True to return a complete IMG tag False for just the URL
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
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      * This function is used with $extraField->addElements()
74 74
      * @param array $params array for the insertion into the *_field_values table
75 75
      *
76
-     * @return mixed false on empty params, void otherwise
76
+     * @return false|null false on empty params, void otherwise
77 77
      * @assert (array()) === false
78 78
      */
79 79
     public function saveFieldValues($params)
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
      * @param int $item_id Item ID (It could be a session_id, course_id or user_id)
531 531
      * @param int $field_id Field ID (the ID from the *_field table)
532 532
      * @param bool $transform Whether to transform the result to a human readable strings
533
-     * @return mixed A structured array with the field_id and field_value, or false on error
533
+     * @return string A structured array with the field_id and field_value, or false on error
534 534
      * @assert (-1,-1) === false
535 535
      */
536 536
     public function get_values_by_handler_and_field_id($item_id, $field_id, $transform = false)
@@ -623,7 +623,7 @@  discard block
 block discarded – undo
623 623
      * @param int $item_id Item ID from the original table
624 624
      * @param string $field_variable The name of the field we are looking for
625 625
      * @param bool $transform
626
-     * @param bool $allVisibility
626
+     * @param bool $visibility
627 627
      *
628 628
      * @return mixed Array of results, or false on error or not found
629 629
      * @assert (-1,'') === false
Please login to merge, or discard this patch.
main/inc/lib/fileUpload.lib.php 1 patch
Doc Comments   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
  * Returns the name without extension, used for the title
74 74
  *
75 75
  * @param string $name
76
- * @return name without the extension
76
+ * @return string without the extension
77 77
  */
78 78
 function get_document_title($name) {
79 79
     // If they upload .htaccess...
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
  * This function checks if the upload succeeded
87 87
  *
88 88
  * @param array $uploaded_file ($_FILES)
89
- * @return true if upload succeeded
89
+ * @return boolean if upload succeeded
90 90
  */
91 91
 function process_uploaded_file($uploaded_file, $show_output = true)
92 92
 {
@@ -1019,7 +1019,7 @@  discard block
 block discarded – undo
1019 1019
  * @param array  $courseInfo
1020 1020
  * @param array  $userInfo
1021 1021
  * @param array  $uploaded_file - follows the $_FILES Structure
1022
- * @param string $upload_path   - destination of the upload.
1022
+ * @param string $uploadPath   - destination of the upload.
1023 1023
  *                               This path is to append to $base_work_dir
1024 1024
  * @param string $base_work_dir  - base working directory of the module
1025 1025
  * @param int    $maxFilledSpace  - amount of bytes to not exceed in the base
@@ -1200,7 +1200,7 @@  discard block
 block discarded – undo
1200 1200
  * @param int $session_id Session ID, if any
1201 1201
  * @param int $userId creator id
1202 1202
  * 
1203
- * @return int id if inserted document
1203
+ * @return string|false id if inserted document
1204 1204
  */
1205 1205
 function add_document(
1206 1206
     $_course,
@@ -1334,7 +1334,7 @@  discard block
 block discarded – undo
1334 1334
  *
1335 1335
  * @author	Olivier Cauberghe <[email protected]>
1336 1336
  * @param	path+filename eg: /main/document/document.php
1337
- * @return	The directory depth
1337
+ * @return	integer directory depth
1338 1338
  */
1339 1339
 function get_levels($filename) {
1340 1340
     $levels = explode('/', $filename);
@@ -1351,6 +1351,8 @@  discard block
 block discarded – undo
1351 1351
  * @author	Olivier Cauberghe <[email protected]>
1352 1352
  * @param	path,filename
1353 1353
  * action:	Adds an entry to the document table with the default settings.
1354
+ * @param string $upload_path
1355
+ * @param string $filename
1354 1356
  */
1355 1357
 function set_default_settings($upload_path, $filename, $filetype = 'file')
1356 1358
 {
@@ -1777,6 +1779,7 @@  discard block
 block discarded – undo
1777 1779
 
1778 1780
 @author Roan Embrechts
1779 1781
 @version 0.6
1782
+ * @param string $buffer
1780 1783
  */
1781 1784
 function api_replace_links_in_string($upload_path, $buffer) {
1782 1785
     // Search for hyperlinks
@@ -2012,7 +2015,6 @@  discard block
 block discarded – undo
2012 2015
  * @param int $groupId
2013 2016
  * @param bool $output
2014 2017
  * @param array $parent
2015
- * @param string $uploadPath
2016 2018
  *
2017 2019
  */
2018 2020
 function add_all_documents_in_folder_to_database(
Please login to merge, or discard this patch.
main/inc/lib/formvalidator/Rule/HTML.php 1 patch
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,6 @@
 block discarded – undo
25 25
      * Get allowed tags
26 26
      * @param int $mode NO_HTML, STUDENT_HTML, TEACHER_HTML,
27 27
      * STUDENT_HTML_FULLPAGE or TEACHER_HTML_FULLPAGE
28
-     * @param boolean $fullpage If true, the allowed tags for full-page editing
29
-     * are returned.
30 28
      */
31 29
     static function get_allowed_tags($mode)
32 30
     {
Please login to merge, or discard this patch.
main/inc/lib/nusoap/class.soap_parser.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 	* @param    string $encoding character encoding scheme of message
53 53
 	* @param    string $method method for which XML is parsed (unused?)
54 54
 	* @param    bool $decode_utf8 whether to decode UTF-8 to ISO-8859-1
55
-	* @return void|bool
55
+	* @return false|null
56 56
 	* @access   public
57 57
 	*/
58 58
 	function nusoap_parser($xml,$encoding='UTF-8',$method='',$decode_utf8=true){
Please login to merge, or discard this patch.