@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | * Save a participant in a meeting room |
280 | 280 | * @param int $meetingId |
281 | 281 | * @param int $participantId |
282 | - * @return false|int The last inserted ID. Otherwise return false |
|
282 | + * @return false|string The last inserted ID. Otherwise return false |
|
283 | 283 | */ |
284 | 284 | public function saveParticipant($meetingId, $participantId) |
285 | 285 | { |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | /** |
353 | 353 | * Returns a meeting "join" URL |
354 | 354 | * @param string The name of the meeting (usually the course code) |
355 | - * @return mixed The URL to join the meeting, or false on error |
|
355 | + * @return false|string The URL to join the meeting, or false on error |
|
356 | 356 | * @todo implement moderator pass |
357 | 357 | * @assert ('') === false |
358 | 358 | * @assert ('abcdefghijklmnopqrstuvwxyzabcdefghijklmno') === false |
@@ -660,7 +660,7 @@ discard block |
||
660 | 660 | * Closes a meeting (usually when the user click on the close button from |
661 | 661 | * the conferences listing. |
662 | 662 | * @param string The internal ID of the meeting (id field for this meeting) |
663 | - * @return void |
|
663 | + * @return false|null |
|
664 | 664 | * @assert (0) === false |
665 | 665 | */ |
666 | 666 | public function endMeeting($id) |
@@ -1077,7 +1077,7 @@ discard block |
||
1077 | 1077 | * @param array $recordInfo |
1078 | 1078 | * @param bool $isGlobal |
1079 | 1079 | * @param bool $isAdminReport |
1080 | - * @return array |
|
1080 | + * @return string[] |
|
1081 | 1081 | */ |
1082 | 1082 | private function getActionLinks($meetingInfo, $recordInfo, $isGlobal = false, $isAdminReport = false) |
1083 | 1083 | { |
@@ -218,7 +218,7 @@ |
||
218 | 218 | /** |
219 | 219 | * Displays the tools of a certain category. |
220 | 220 | * |
221 | - * @return void |
|
221 | + * @return string |
|
222 | 222 | * @param string $course_tool_category contains the category of tools to display: |
223 | 223 | * "Public", "PublicButHide", "courseAdmin", "claroAdmin" |
224 | 224 | */ |
@@ -67,6 +67,8 @@ discard block |
||
67 | 67 | * @param int user id |
68 | 68 | * @param int user friend id |
69 | 69 | * @param string |
70 | + * @param integer $user_id |
|
71 | + * @param integer $user_friend |
|
70 | 72 | * @author isaac flores paz |
71 | 73 | */ |
72 | 74 | public static function get_relation_between_contacts($user_id, $user_friend) |
@@ -98,6 +100,8 @@ discard block |
||
98 | 100 | * @param int group id |
99 | 101 | * @param string name to search |
100 | 102 | * @param bool true will load firstname, lastname, and image name |
103 | + * @param integer $user_id |
|
104 | + * @param integer $id_group |
|
101 | 105 | * @return array |
102 | 106 | * @author Julio Montoya <[email protected]> Cleaning code, function renamed, $load_extra_info option added |
103 | 107 | * @author isaac flores paz |
@@ -174,6 +178,9 @@ discard block |
||
174 | 178 | * @param int user friend id |
175 | 179 | * @param string title of the message |
176 | 180 | * @param string content of the message |
181 | + * @param integer $user_id |
|
182 | + * @param string $message_title |
|
183 | + * @param string $message_content |
|
177 | 184 | * @return boolean |
178 | 185 | * @author isaac flores paz |
179 | 186 | * @author Julio Montoya <[email protected]> Cleaning code |
@@ -248,6 +255,7 @@ discard block |
||
248 | 255 | * Get number messages of the inbox |
249 | 256 | * @author isaac flores paz |
250 | 257 | * @param int user receiver id |
258 | + * @param integer $user_receiver_id |
|
251 | 259 | * @return int |
252 | 260 | */ |
253 | 261 | public static function get_message_number_invitation_by_user_id($user_receiver_id) |
@@ -290,6 +298,7 @@ discard block |
||
290 | 298 | * Get invitation list sent by user |
291 | 299 | * @author Julio Montoya <[email protected]> |
292 | 300 | * @param int user id |
301 | + * @param integer $user_id |
|
293 | 302 | * @return array() |
294 | 303 | */ |
295 | 304 | public static function get_list_invitation_sent_by_user_id($user_id) |
@@ -332,6 +341,7 @@ discard block |
||
332 | 341 | * Denies invitation |
333 | 342 | * @param int user sender id |
334 | 343 | * @param int user receiver id |
344 | + * @param integer $user_receiver_id |
|
335 | 345 | * @author isaac flores paz |
336 | 346 | * @author Julio Montoya <[email protected]> Cleaning code |
337 | 347 | */ |
@@ -426,7 +436,7 @@ discard block |
||
426 | 436 | * @param string $subject |
427 | 437 | * @param string $content |
428 | 438 | * |
429 | - * @return string message invitation |
|
439 | + * @return false|null message invitation |
|
430 | 440 | */ |
431 | 441 | public static function sendInvitationToUser($userId, $subject = '', $content = '') |
432 | 442 | { |
@@ -1223,7 +1233,7 @@ discard block |
||
1223 | 1233 | * @param string $messageContent of the message |
1224 | 1234 | * @param int $messageId id parent |
1225 | 1235 | * @param string $messageStatus status type of message |
1226 | - * @return boolean |
|
1236 | + * @return false|string |
|
1227 | 1237 | * @author Yannick Warnier |
1228 | 1238 | */ |
1229 | 1239 | public static function sendWallMessage($userId, $friendId, $messageContent, $messageId = 0, $messageStatus = '') |
@@ -1315,7 +1325,7 @@ discard block |
||
1315 | 1325 | * Gets all messages from someone's wall (within specific limits) |
1316 | 1326 | * @param int $userId id of wall shown |
1317 | 1327 | * @param string $messageStatus status wall message |
1318 | - * @param int|string $parentId id message (Post main) |
|
1328 | + * @param integer|null $parentId id message (Post main) |
|
1319 | 1329 | * @param date $start Date from which we want to show the messages, in UTC time |
1320 | 1330 | * @param int $limit Limit for the number of parent messages we want to show |
1321 | 1331 | * @param int $offset Wall message query offset |
@@ -1600,7 +1610,7 @@ discard block |
||
1600 | 1610 | |
1601 | 1611 | /** |
1602 | 1612 | * verify if Url Exist - Using Curl |
1603 | - * @param $uri url |
|
1613 | + * @param string $uri url |
|
1604 | 1614 | * |
1605 | 1615 | * @return boolean |
1606 | 1616 | */ |
@@ -1626,7 +1636,7 @@ discard block |
||
1626 | 1636 | /** |
1627 | 1637 | * Delete messages delete logic |
1628 | 1638 | * @param int $id id message to delete. |
1629 | - * @return bool status query |
|
1639 | + * @return Statement|null status query |
|
1630 | 1640 | */ |
1631 | 1641 | public static function deleteMessage($id) |
1632 | 1642 | { |
@@ -209,11 +209,11 @@ discard block |
||
209 | 209 | /** |
210 | 210 | * Gives a list of people online now (and in the last $valid minutes) |
211 | 211 | * |
212 | - * @param $from |
|
212 | + * @param integer $from |
|
213 | 213 | * @param $number_of_items |
214 | 214 | * @param null $column |
215 | 215 | * @param null $direction |
216 | - * @param null $time_limit |
|
216 | + * @param integer $time_limit |
|
217 | 217 | * @param bool $friends |
218 | 218 | * @return array|bool For each line, a list of user IDs and login dates, or FALSE on error or empty results |
219 | 219 | */ |
@@ -320,6 +320,9 @@ discard block |
||
320 | 320 | } |
321 | 321 | } |
322 | 322 | |
323 | +/** |
|
324 | + * @param string $time_limit |
|
325 | + */ |
|
323 | 326 | function who_is_online_count($time_limit = null, $friends = false) |
324 | 327 | { |
325 | 328 | if (empty($time_limit)) { |
@@ -436,6 +439,10 @@ discard block |
||
436 | 439 | } |
437 | 440 | } |
438 | 441 | |
442 | +/** |
|
443 | + * @param integer $uid |
|
444 | + * @param string $time_limit |
|
445 | + */ |
|
439 | 446 | function who_is_online_in_this_course_count($uid, $time_limit, $coursecode=null) |
440 | 447 | { |
441 | 448 | if (empty($coursecode)) { |
@@ -640,10 +640,10 @@ discard block |
||
640 | 640 | /** |
641 | 641 | * Insert message between Users and Admins |
642 | 642 | * @param $ticket_id |
643 | - * @param $subject |
|
644 | - * @param $content |
|
643 | + * @param string $subject |
|
644 | + * @param string $content |
|
645 | 645 | * @param $file_attachments |
646 | - * @param $user_id |
|
646 | + * @param integer $user_id |
|
647 | 647 | * @param string $status |
648 | 648 | * @param bool $sendConfirmation |
649 | 649 | * @return bool |
@@ -737,9 +737,9 @@ discard block |
||
737 | 737 | /** |
738 | 738 | * Attachment files when a message is sent |
739 | 739 | * @param $file_attach |
740 | - * @param $ticket_id |
|
741 | - * @param $message_id |
|
742 | - * @param $message_attch_id |
|
740 | + * @param integer $ticket_id |
|
741 | + * @param integer $message_id |
|
742 | + * @param integer $message_attch_id |
|
743 | 743 | * @return array |
744 | 744 | */ |
745 | 745 | public static function save_message_attachment_file( |
@@ -2017,7 +2017,7 @@ discard block |
||
2017 | 2017 | } |
2018 | 2018 | |
2019 | 2019 | /** |
2020 | - * @param $id |
|
2020 | + * @param integer $id |
|
2021 | 2021 | * @return Project |
2022 | 2022 | */ |
2023 | 2023 | public static function getProject($id) |
@@ -2137,7 +2137,7 @@ discard block |
||
2137 | 2137 | } |
2138 | 2138 | |
2139 | 2139 | /** |
2140 | - * @param $id |
|
2140 | + * @param integer $id |
|
2141 | 2141 | * @return Project |
2142 | 2142 | */ |
2143 | 2143 | public static function getStatus($id) |
@@ -2260,7 +2260,7 @@ discard block |
||
2260 | 2260 | } |
2261 | 2261 | |
2262 | 2262 | /** |
2263 | - * @param $id |
|
2263 | + * @param integer $id |
|
2264 | 2264 | * @return Priority |
2265 | 2265 | */ |
2266 | 2266 | public static function getPriority($id) |
@@ -2330,7 +2330,7 @@ discard block |
||
2330 | 2330 | } |
2331 | 2331 | |
2332 | 2332 | /** |
2333 | - * @return array |
|
2333 | + * @return string[] |
|
2334 | 2334 | */ |
2335 | 2335 | public static function getDefaultStatusList() { |
2336 | 2336 | return [ |
@@ -2343,7 +2343,7 @@ discard block |
||
2343 | 2343 | } |
2344 | 2344 | |
2345 | 2345 | /** |
2346 | - * @return array |
|
2346 | + * @return string[] |
|
2347 | 2347 | */ |
2348 | 2348 | public static function getDefaultPriorityList() { |
2349 | 2349 | return [ |
@@ -498,7 +498,7 @@ |
||
498 | 498 | * @param int User id |
499 | 499 | * @param string plugin path |
500 | 500 | * @param integer $user_id |
501 | - * @return bool |
|
501 | + * @return false|string |
|
502 | 502 | */ |
503 | 503 | public static function close_user_block($user_id, $path) |
504 | 504 | { |
@@ -599,6 +599,8 @@ discard block |
||
599 | 599 | * @param int message id |
600 | 600 | * @param int message user id (receiver user id or sender user id) |
601 | 601 | * @param int group id (optional) |
602 | + * @param integer $message_id |
|
603 | + * @param integer $message_uid |
|
602 | 604 | * @return void |
603 | 605 | */ |
604 | 606 | public static function delete_message_attachment_file($message_id, $message_uid, $group_id = 0) |
@@ -643,7 +645,7 @@ discard block |
||
643 | 645 | * update messages by user id and message id |
644 | 646 | * @param int $user_id |
645 | 647 | * @param int $message_id |
646 | - * @return resource |
|
648 | + * @return false|null |
|
647 | 649 | */ |
648 | 650 | public static function update_message($user_id, $message_id) |
649 | 651 | { |
@@ -663,7 +665,7 @@ discard block |
||
663 | 665 | * @param int $user_id |
664 | 666 | * @param int $message_id |
665 | 667 | * @param string $type |
666 | - * @return bool |
|
668 | + * @return false|null |
|
667 | 669 | */ |
668 | 670 | public static function update_message_status($user_id, $message_id, $type) |
669 | 671 | { |
@@ -701,6 +703,7 @@ discard block |
||
701 | 703 | /** |
702 | 704 | * get messages by group id |
703 | 705 | * @param int group id |
706 | + * @param integer $group_id |
|
704 | 707 | * @return array |
705 | 708 | */ |
706 | 709 | public static function get_messages_by_group($group_id) |
@@ -1479,7 +1482,7 @@ discard block |
||
1479 | 1482 | * Sort date by desc from a multi-dimensional array |
1480 | 1483 | * @param array $array1 first array to compare |
1481 | 1484 | * @param array $array2 second array to compare |
1482 | - * @return bool |
|
1485 | + * @return integer |
|
1483 | 1486 | */ |
1484 | 1487 | public function order_desc_date($array1, $array2) |
1485 | 1488 | { |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
23 | - * @return array |
|
23 | + * @return string[] |
|
24 | 24 | */ |
25 | 25 | public static function get_tags() |
26 | 26 | { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * @param string $course_code |
43 | 43 | * @param int $session_id |
44 | 44 | * |
45 | - * @return mixed |
|
45 | + * @return string |
|
46 | 46 | */ |
47 | 47 | public static function parse_content($userId, $content, $course_code, $session_id = 0) |
48 | 48 | { |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | * @param int $courseId |
192 | 192 | * @param int $userId |
193 | 193 | * |
194 | - * @return array |
|
194 | + * @return integer |
|
195 | 195 | */ |
196 | 196 | public static function getAnnouncementInfoById($announcementId, $courseId, $userId) |
197 | 197 | { |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | * @param string $file_comment Comment describing the attachment |
401 | 401 | * @param string $end_date |
402 | 402 | * @param bool $sendToUsersInSession |
403 | - * @return int false on failure, ID of the announcement on success |
|
403 | + * @return false|string false on failure, ID of the announcement on success |
|
404 | 404 | */ |
405 | 405 | public static function add_announcement( |
406 | 406 | $emailTitle, |
@@ -511,7 +511,7 @@ discard block |
||
511 | 511 | * @param string $file_comment |
512 | 512 | * @param bool $sendToUsersInSession |
513 | 513 | * |
514 | - * @return bool|int |
|
514 | + * @return false|string |
|
515 | 515 | */ |
516 | 516 | public static function add_group_announcement( |
517 | 517 | $emailTitle, |
@@ -753,7 +753,7 @@ discard block |
||
753 | 753 | |
754 | 754 | /** |
755 | 755 | * @param int $insert_id |
756 | - * @return bool |
|
756 | + * @return false|null |
|
757 | 757 | */ |
758 | 758 | public static function update_mail_sent($insert_id) |
759 | 759 | { |
@@ -773,6 +773,7 @@ discard block |
||
773 | 773 | * Gets all announcements from a user by course |
774 | 774 | * @param string course db |
775 | 775 | * @param int user id |
776 | + * @param integer $user_id |
|
776 | 777 | * @return array html with the content and count of announcements or false otherwise |
777 | 778 | */ |
778 | 779 | public static function get_all_annoucement_by_user_course($course_code, $user_id) |
@@ -1018,6 +1019,7 @@ discard block |
||
1018 | 1019 | * has been sent to |
1019 | 1020 | * @param string The tool (announcement, agenda, ...) |
1020 | 1021 | * @param int ID of the element of the corresponding type |
1022 | + * @param string $tool |
|
1021 | 1023 | * @return array Array of users and groups to whom the element has been sent |
1022 | 1024 | */ |
1023 | 1025 | public static function sent_to($tool, $id) |
@@ -1088,6 +1090,7 @@ discard block |
||
1088 | 1090 | * @param int announcement id |
1089 | 1091 | * @param string file comment |
1090 | 1092 | * @param array uploaded file $_FILES |
1093 | + * @param string|null $file_comment |
|
1091 | 1094 | * @return int -1 if failed, 0 if unknown (should not happen), 1 if success |
1092 | 1095 | */ |
1093 | 1096 | public static function add_announcement_attachment_file($announcement_id, $file_comment, $file) |
@@ -1146,6 +1149,8 @@ discard block |
||
1146 | 1149 | * @param int attach id |
1147 | 1150 | * @param array uploaded file $_FILES |
1148 | 1151 | * @param string file comment |
1152 | + * @param integer $id_attach |
|
1153 | + * @param string $file_comment |
|
1149 | 1154 | * @return int |
1150 | 1155 | */ |
1151 | 1156 | public static function edit_announcement_attachment_file($id_attach, $file, $file_comment) |
@@ -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 |
@@ -686,7 +686,7 @@ discard block |
||
686 | 686 | * @param string $field_value Data we are looking for in the given field |
687 | 687 | * @param bool $transform Whether to transform the result to a human readable strings |
688 | 688 | * @param bool $last Whether to return the last element or simply the first one we get |
689 | - * @return mixed Give the ID if found, or false on failure or not found |
|
689 | + * @return string|null Give the ID if found, or false on failure or not found |
|
690 | 690 | * @assert (-1,-1) === false |
691 | 691 | */ |
692 | 692 | public function get_item_id_from_field_variable_and_field_value( |