@@ -75,7 +75,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
@@ -39,8 +39,8 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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) |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | * Returns the name without extension, used for the title |
| 54 | 54 | * |
| 55 | 55 | * @param string $name |
| 56 | - * @return name without the extension |
|
| 56 | + * @return string without the extension |
|
| 57 | 57 | */ |
| 58 | 58 | function get_document_title($name) |
| 59 | 59 | { |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | * This function checks if the upload succeeded |
| 68 | 68 | * |
| 69 | 69 | * @param array $uploaded_file ($_FILES) |
| 70 | - * @return true if upload succeeded |
|
| 70 | + * @return boolean if upload succeeded |
|
| 71 | 71 | */ |
| 72 | 72 | function process_uploaded_file($uploaded_file, $show_output = true) |
| 73 | 73 | { |
@@ -1032,7 +1032,7 @@ discard block |
||
| 1032 | 1032 | * @param array $courseInfo |
| 1033 | 1033 | * @param array $userInfo |
| 1034 | 1034 | * @param array $uploaded_file - follows the $_FILES Structure |
| 1035 | - * @param string $upload_path - destination of the upload. |
|
| 1035 | + * @param string $uploadPath - destination of the upload. |
|
| 1036 | 1036 | * This path is to append to $base_work_dir |
| 1037 | 1037 | * @param string $base_work_dir - base working directory of the module |
| 1038 | 1038 | * @param int $maxFilledSpace - amount of bytes to not exceed in the base |
@@ -1219,7 +1219,7 @@ discard block |
||
| 1219 | 1219 | * @param int $session_id Session ID, if any |
| 1220 | 1220 | * @param int $userId creator id |
| 1221 | 1221 | * |
| 1222 | - * @return int id if inserted document |
|
| 1222 | + * @return string|false id if inserted document |
|
| 1223 | 1223 | */ |
| 1224 | 1224 | function add_document( |
| 1225 | 1225 | $_course, |
@@ -1360,7 +1360,7 @@ discard block |
||
| 1360 | 1360 | * |
| 1361 | 1361 | * @author Olivier Cauberghe <[email protected]> |
| 1362 | 1362 | * @param path+filename eg: /main/document/document.php |
| 1363 | - * @return The directory depth |
|
| 1363 | + * @return integer directory depth |
|
| 1364 | 1364 | */ |
| 1365 | 1365 | function get_levels($filename) { |
| 1366 | 1366 | $levels = explode('/', $filename); |
@@ -1377,6 +1377,8 @@ discard block |
||
| 1377 | 1377 | * @author Olivier Cauberghe <[email protected]> |
| 1378 | 1378 | * @param path,filename |
| 1379 | 1379 | * action: Adds an entry to the document table with the default settings. |
| 1380 | + * @param string $upload_path |
|
| 1381 | + * @param string $filename |
|
| 1380 | 1382 | */ |
| 1381 | 1383 | function set_default_settings($upload_path, $filename, $filetype = 'file') |
| 1382 | 1384 | { |
@@ -1838,7 +1840,6 @@ discard block |
||
| 1838 | 1840 | * @param int $groupId group.id |
| 1839 | 1841 | * @param bool $output |
| 1840 | 1842 | * @param array $parent |
| 1841 | - * @param string $uploadPath |
|
| 1842 | 1843 | * |
| 1843 | 1844 | */ |
| 1844 | 1845 | function add_all_documents_in_folder_to_database( |
@@ -433,6 +433,7 @@ discard block |
||
| 433 | 433 | * If null, the timezone will be determined based on user preference, |
| 434 | 434 | * or timezone chosen by the admin for the platform. |
| 435 | 435 | * @param string The timezone to be converted from. If null, UTC will be assumed. |
| 436 | + * @param string $to_timezone |
|
| 436 | 437 | * @return string The converted time formatted as Y-m-d H:i:s |
| 437 | 438 | * |
| 438 | 439 | * @author Guillaume Viguier <[email protected]> |
@@ -691,6 +692,8 @@ discard block |
||
| 691 | 692 | * @param mixed The time to be converted |
| 692 | 693 | * @param mixed Format to be used (TIME_NO_SEC_FORMAT, DATE_FORMAT_SHORT, DATE_FORMAT_LONG, DATE_TIME_FORMAT_LONG) |
| 693 | 694 | * @param string Timezone to be converted from. If null, UTC will be assumed. |
| 695 | + * @param integer $format |
|
| 696 | + * @param string $from_timezone |
|
| 694 | 697 | * @return string Converted and localized date |
| 695 | 698 | * |
| 696 | 699 | * @author Guillaume Viguier <[email protected]> |
@@ -760,7 +763,7 @@ discard block |
||
| 760 | 763 | * @param int|string $format (optional) The person name format. It may be a pattern-string (for example '%t %l, %f' or '%T %F %L', ...) or some of the constants PERSON_NAME_COMMON_CONVENTION (default), PERSON_NAME_WESTERN_ORDER, PERSON_NAME_EASTERN_ORDER, PERSON_NAME_LIBRARY_ORDER. |
| 761 | 764 | * @param string $language (optional) The language id. If it is omitted, the current interface language is assumed. This parameter has meaning with the format PERSON_NAME_COMMON_CONVENTION only. |
| 762 | 765 | * @param string $encoding (optional) The used internally by this function character encoding. If it is omitted, the platform character set will be used by default. |
| 763 | - * @return bool The result is sort of full name of the person. |
|
| 766 | + * @return string The result is sort of full name of the person. |
|
| 764 | 767 | * Sample results: |
| 765 | 768 | * Peter Ustinoff or Dr. Peter Ustinoff - the Western order |
| 766 | 769 | * Ustinoff Peter or Dr. Ustinoff Peter - the Eastern order |
@@ -1081,8 +1084,8 @@ discard block |
||
| 1081 | 1084 | |
| 1082 | 1085 | /** |
| 1083 | 1086 | * This function returns a string or an array with all occurrences of search in subject (ignoring case) replaced with the given replace value. |
| 1084 | - * @param mixed $search String or array of strings to be found. |
|
| 1085 | - * @param mixed $replace String or array of strings used for replacement. |
|
| 1087 | + * @param string $search String or array of strings to be found. |
|
| 1088 | + * @param string $replace String or array of strings used for replacement. |
|
| 1086 | 1089 | * @param mixed $subject String or array of strings being searched. |
| 1087 | 1090 | * @param int $count (optional) The number of matched and replaced needles will be returned in count, which is passed by reference. |
| 1088 | 1091 | * @param string $encoding (optional) The used internally by this function character encoding. |
@@ -1145,10 +1148,10 @@ discard block |
||
| 1145 | 1148 | /** |
| 1146 | 1149 | * Finds first occurrence of a string within another, case insensitive. |
| 1147 | 1150 | * @param string $haystack The string from which to get the first occurrence. |
| 1148 | - * @param mixed $needle The string to be found. |
|
| 1151 | + * @param string $needle The string to be found. |
|
| 1149 | 1152 | * @param bool $before_needle (optional) Determines which portion of $haystack this function returns. The default value is FALSE. |
| 1150 | 1153 | * @param string $encoding (optional) The used internally by this function character encoding. If it is omitted, the platform character set will be used by default. |
| 1151 | - * @return mixed Returns the portion of $haystack, or FALSE if $needle is not found. |
|
| 1154 | + * @return false|string Returns the portion of $haystack, or FALSE if $needle is not found. |
|
| 1152 | 1155 | * Notes: |
| 1153 | 1156 | * If $needle is not a string, it is converted to an integer and applied as the ordinal value (codepoint if the encoding is UTF-8) of a character. |
| 1154 | 1157 | * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence of $needle. |
@@ -1204,7 +1207,7 @@ discard block |
||
| 1204 | 1207 | * @param mixed $needle The string which first character is to be found. |
| 1205 | 1208 | * @param bool $before_needle (optional) Determines which portion of $haystack this function returns. The default value is FALSE. |
| 1206 | 1209 | * @param string $encoding (optional) The used internally by this function character encoding. If it is omitted, the platform character set will be used by default. |
| 1207 | - * @return mixed Returns the portion of $haystack, or FALSE if the first character from $needle is not found. |
|
| 1210 | + * @return false|string Returns the portion of $haystack, or FALSE if the first character from $needle is not found. |
|
| 1208 | 1211 | * Notes: |
| 1209 | 1212 | * If $needle is not a string, it is converted to an integer and applied as the ordinal value (codepoint if the encoding is UTF-8) of a character. |
| 1210 | 1213 | * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence. |
@@ -1271,7 +1274,7 @@ discard block |
||
| 1271 | 1274 | * @param mixed $needle The string to be found. |
| 1272 | 1275 | * @param bool $before_needle (optional) Determines which portion of $haystack this function returns. The default value is FALSE. |
| 1273 | 1276 | * @param string $encoding (optional) The used internally by this function character encoding. If it is omitted, the platform character set will be used by default. |
| 1274 | - * @return mixed Returns the portion of $haystack, or FALSE if $needle is not found. |
|
| 1277 | + * @return false|string Returns the portion of $haystack, or FALSE if $needle is not found. |
|
| 1275 | 1278 | * Notes: |
| 1276 | 1279 | * If $needle is not a string, it is converted to an integer and applied as the ordinal value (codepoint if the encoding is UTF-8) of a character. |
| 1277 | 1280 | * If $before_needle is set to TRUE, the function returns all of $haystack from the beginning to the first occurrence of $needle. |
@@ -1452,8 +1455,8 @@ discard block |
||
| 1452 | 1455 | |
| 1453 | 1456 | /** |
| 1454 | 1457 | * Performs a regular expression search and replace, UTF-8 aware when it is applicable. |
| 1455 | - * @param string|array $pattern The pattern to search for. It can be either a string or an array with strings. |
|
| 1456 | - * @param string|array $replacement The string or an array with strings to replace. |
|
| 1458 | + * @param string $pattern The pattern to search for. It can be either a string or an array with strings. |
|
| 1459 | + * @param string $replacement The string or an array with strings to replace. |
|
| 1457 | 1460 | * @param string|array $subject The string or an array with strings to search and replace. |
| 1458 | 1461 | * @param int $limit The maximum possible replacements for each pattern in each subject string. Defaults to -1 (no limit). |
| 1459 | 1462 | * @param int &$count If specified, this variable will be filled with the number of replacements done. |
@@ -1601,7 +1604,7 @@ discard block |
||
| 1601 | 1604 | |
| 1602 | 1605 | /** |
| 1603 | 1606 | * This function checks whether two $encoding are equal (same, equvalent). |
| 1604 | - * @param string|array $encoding1 The first encoding |
|
| 1607 | + * @param string $encoding1 The first encoding |
|
| 1605 | 1608 | * @param string|array $encoding2 The second encoding |
| 1606 | 1609 | * @param bool $strict When this parameter is TRUE the comparison ignores aliases of encodings. |
| 1607 | 1610 | * When the parameter is FALSE, aliases are taken into account. |
@@ -1705,6 +1708,7 @@ discard block |
||
| 1705 | 1708 | /** |
| 1706 | 1709 | * Checks a string for UTF-8 validity. |
| 1707 | 1710 | * |
| 1711 | + * @param string $string |
|
| 1708 | 1712 | */ |
| 1709 | 1713 | function api_is_valid_utf8($string) |
| 1710 | 1714 | { |
@@ -1847,7 +1851,7 @@ discard block |
||
| 1847 | 1851 | /** |
| 1848 | 1852 | * Replaces non-valid formats for person names with the default (English) format. |
| 1849 | 1853 | * @param string $format The input format to be verified. |
| 1850 | - * @return bool Returns the same format if is is valid, otherwise returns a valid English format. |
|
| 1854 | + * @return string Returns the same format if is is valid, otherwise returns a valid English format. |
|
| 1851 | 1855 | */ |
| 1852 | 1856 | function _api_validate_person_name_format($format) { |
| 1853 | 1857 | if (empty($format) || stripos($format, '%f') === false || stripos($format, '%l') === false) { |
@@ -1976,6 +1980,9 @@ discard block |
||
| 1976 | 1980 | |
| 1977 | 1981 | // This function checks whether the function _api_convert_encoding() (the php- |
| 1978 | 1982 | // implementation) is able to convert from/to a given encoding. |
| 1983 | +/** |
|
| 1984 | + * @param string $encoding |
|
| 1985 | + */ |
|
| 1979 | 1986 | function _api_convert_encoding_supports($encoding) |
| 1980 | 1987 | { |
| 1981 | 1988 | static $supports = array(); |
@@ -1987,7 +1994,7 @@ discard block |
||
| 1987 | 1994 | |
| 1988 | 1995 | /** |
| 1989 | 1996 | * Given a date object, return a human or ISO format, with or without h:m:s |
| 1990 | - * @param object $date The Date object |
|
| 1997 | + * @param DateTime $date The Date object |
|
| 1991 | 1998 | * @param bool $showTime Whether to show the time and date (true) or only the date (false) |
| 1992 | 1999 | * @param bool $humanForm Whether to show day-month-year (true) or year-month-day (false) |
| 1993 | 2000 | * @return string Formatted date |
@@ -679,7 +679,6 @@ discard block |
||
| 679 | 679 | * @param int $sessionId The session ID |
| 680 | 680 | * @param int $courseId The course ID |
| 681 | 681 | * @param int $exerciseId The quiz ID |
| 682 | - * @param int $answer Answer status (0 = incorrect, 1 = correct, 2 = both) |
|
| 683 | 682 | * @return string HTML array of results formatted for gridJS |
| 684 | 683 | * @author César Perales <[email protected]>, Beeznest Team |
| 685 | 684 | */ |
@@ -898,6 +897,7 @@ discard block |
||
| 898 | 897 | * @param int Number of items to select |
| 899 | 898 | * @param string Column to order on |
| 900 | 899 | * @param string Order direction |
| 900 | + * @param integer $number_of_items |
|
| 901 | 901 | * @return array Results |
| 902 | 902 | */ |
| 903 | 903 | public static function get_course_data_tracking_overview($from, $number_of_items, $column, $direction) |
@@ -1235,6 +1235,7 @@ discard block |
||
| 1235 | 1235 | * @param int Number of items to select |
| 1236 | 1236 | * @param string Column to order on |
| 1237 | 1237 | * @param string Order direction |
| 1238 | + * @param integer $number_of_items |
|
| 1238 | 1239 | * @return array Results |
| 1239 | 1240 | */ |
| 1240 | 1241 | public static function get_session_data_tracking_overview($from, $number_of_items, $column, $direction) |
@@ -1255,7 +1256,6 @@ discard block |
||
| 1255 | 1256 | /** |
| 1256 | 1257 | * Fills in session reporting data |
| 1257 | 1258 | * |
| 1258 | - * @param integer $user_id the id of the user |
|
| 1259 | 1259 | * @param array $url_params additonal url parameters |
| 1260 | 1260 | * @param array $row the row information (the other columns) |
| 1261 | 1261 | * @return string html code |
@@ -1888,6 +1888,7 @@ discard block |
||
| 1888 | 1888 | * @author Patrick Cool <[email protected]>, Ghent University, Belgium |
| 1889 | 1889 | * @version Dokeos 1.8.6 |
| 1890 | 1890 | * @since October 2008 |
| 1891 | + * @param integer $number_of_items |
|
| 1891 | 1892 | */ |
| 1892 | 1893 | public static function get_user_data_tracking_overview($from, $number_of_items, $column, $direction) |
| 1893 | 1894 | { |
@@ -1990,7 +1991,6 @@ discard block |
||
| 1990 | 1991 | /** |
| 1991 | 1992 | * Checks if there are repeted users in a given array |
| 1992 | 1993 | * @param array $usernames list of the usernames in the uploaded file |
| 1993 | - * @param array $user_array['username'] and $user_array['sufix'] where sufix is the number part in a login i.e -> jmontoya2 |
|
| 1994 | 1994 | * @return array with the $usernames array and the $user_array array |
| 1995 | 1995 | * @author Julio Montoya |
| 1996 | 1996 | */ |
@@ -2165,6 +2165,7 @@ discard block |
||
| 2165 | 2165 | |
| 2166 | 2166 | /** |
| 2167 | 2167 | * Adds missing user-information (which isn't required, like password, etc). |
| 2168 | + * @return integer |
|
| 2168 | 2169 | */ |
| 2169 | 2170 | function complete_missing_data($user) { |
| 2170 | 2171 | // 1. Generate a password if it is necessary. |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | * @param string $faultcode (SOAP-ENV:Client | SOAP-ENV:Server) |
| 42 | 42 | * @param string $faultactor only used when msg routed between multiple actors |
| 43 | 43 | * @param string $faultstring human readable error message |
| 44 | - * @param mixed $faultdetail detail, typically a string or array of string |
|
| 44 | + * @param string $faultdetail detail, typically a string or array of string |
|
| 45 | 45 | */ |
| 46 | 46 | public function __construct($faultcode,$faultactor='',$faultstring='',$faultdetail=''){
|
| 47 | 47 | parent::__construct(); |
@@ -52,7 +52,7 @@ |
||
| 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 __construct($xml,$encoding='UTF-8',$method='',$decode_utf8=true) |
@@ -46,6 +46,8 @@ discard block |
||
| 46 | 46 | * @param string Absolute path to be checked (with trailing slash) |
| 47 | 47 | * @param string Checker path under which the path |
| 48 | 48 | * should be (absolute path, with trailing slash, get it from api_get_path(SYS_COURSE_PATH)) |
| 49 | + * @param string $abs_path |
|
| 50 | + * @param string $checker_path |
|
| 49 | 51 | * @return bool True if the path is under the checker, false otherwise |
| 50 | 52 | */ |
| 51 | 53 | public static function check_abs_path($abs_path, $checker_path) |
@@ -257,6 +259,7 @@ discard block |
||
| 257 | 259 | * @param string The variable to filter for XSS, this params can be a string or an array (example : array(x,y)) |
| 258 | 260 | * @param int The user status,constant allowed (STUDENT, COURSEMANAGER, ANONYMOUS, COURSEMANAGERLOWSECURITY) |
| 259 | 261 | * @param bool $filter_terms |
| 262 | + * @param integer $user_status |
|
| 260 | 263 | * @return mixed Filtered string or array |
| 261 | 264 | */ |
| 262 | 265 | public static function remove_XSS($var, $user_status = null, $filter_terms = false) |
@@ -393,7 +396,7 @@ discard block |
||
| 393 | 396 | * This method provides specific protection (against XSS and other kinds of attacks) for static images (icons) used by the system. |
| 394 | 397 | * Image paths are supposed to be given by programmers - people who know what they do, anyway, this method encourages |
| 395 | 398 | * a safe practice for generating icon paths, without using heavy solutions based on HTMLPurifier for example. |
| 396 | - * @param string $img_path The input path of the image, it could be relative or absolute URL. |
|
| 399 | + * @param string $image_path The input path of the image, it could be relative or absolute URL. |
|
| 397 | 400 | * @return string Returns sanitized image path or an empty string when the image path is not secure. |
| 398 | 401 | * @author Ivan Tcholakov, March 2011 |
| 399 | 402 | */ |
@@ -348,6 +348,7 @@ discard block |
||
| 348 | 348 | |
| 349 | 349 | /** |
| 350 | 350 | * Gets an element |
| 351 | + * @param integer $gradebook_id |
|
| 351 | 352 | */ |
| 352 | 353 | public function get_skill_info($skill_id, $gradebook_id) |
| 353 | 354 | { |
@@ -577,7 +578,7 @@ discard block |
||
| 577 | 578 | * Gets an element |
| 578 | 579 | * @param int $id |
| 579 | 580 | * |
| 580 | - * @return array|mixed |
|
| 581 | + * @return integer |
|
| 581 | 582 | */ |
| 582 | 583 | public function get($id) |
| 583 | 584 | { |
@@ -923,7 +924,7 @@ discard block |
||
| 923 | 924 | /** |
| 924 | 925 | * Get user's skills |
| 925 | 926 | * |
| 926 | - * @param int $userId User's id |
|
| 927 | + * @param integer $user_id User's id |
|
| 927 | 928 | * @param bool $get_skill_data |
| 928 | 929 | */ |
| 929 | 930 | public function get_user_skills($user_id, $get_skill_data = false) |
@@ -1133,7 +1134,7 @@ discard block |
||
| 1133 | 1134 | * @param int skill id |
| 1134 | 1135 | * @param bool return a flat array or not |
| 1135 | 1136 | * @param int depth of the skills |
| 1136 | - * @return json |
|
| 1137 | + * @return string |
|
| 1137 | 1138 | */ |
| 1138 | 1139 | public function get_skills_tree_json( |
| 1139 | 1140 | $user_id = null, |