Completed
Pull Request — 1.11.x (#1557)
by José
24:51
created
main/inc/lib/online.inc.php 1 patch
Doc Comments   +9 added lines, -2 removed lines patch added patch discarded remove patch
@@ -209,11 +209,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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)) {
Please login to merge, or discard this patch.
main/inc/lib/TicketManager.php 1 patch
Doc Comments   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -640,10 +640,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
2343 2343
     }
2344 2344
 
2345 2345
         /**
2346
-     * @return array
2346
+     * @return string[]
2347 2347
      */
2348 2348
     public static function getDefaultPriorityList() {
2349 2349
         return [
Please login to merge, or discard this patch.
main/inc/lib/agenda.lib.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -573,14 +573,14 @@
 block discarded – undo
573 573
      * @param int $allDay is all day 'true' or 'false'
574 574
      * @param string $title
575 575
      * @param string $content
576
-     * @param array $usersToSend
576
+     * @param string[] $usersToSend
577 577
      * @param array $attachmentArray
578 578
      * @param array $attachmentCommentList
579 579
      * @param string $comment
580 580
      * @param string $color
581 581
      * @param bool $addAnnouncement
582 582
      *
583
-     * @return null|false
583
+     * @return null|boolean
584 584
      */
585 585
     public function editEvent(
586 586
         $id,
Please login to merge, or discard this patch.
main/inc/lib/dashboard.lib.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -498,7 +498,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
main/inc/lib/message.lib.php 1 patch
Doc Comments   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -599,6 +599,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
main/inc/lib/AnnouncementManager.php 1 patch
Doc Comments   +11 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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)
Please login to merge, or discard this patch.
main/inc/lib/extra_field_value.lib.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * This function is used with $extraField->addElements()
76 76
      * @param array $params array for the insertion into the *_field_values table
77 77
      * @param bool $showQuery
78
-     * @return mixed false on empty params, void otherwise
78
+     * @return false|null false on empty params, void otherwise
79 79
      * @assert (array()) === false
80 80
      */
81 81
     public function saveFieldValues($params, $showQuery = false)
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
      * @param int $item_id Item ID (It could be a session_id, course_id or user_id)
532 532
      * @param int $field_id Field ID (the ID from the *_field table)
533 533
      * @param bool $transform Whether to transform the result to a human readable strings
534
-     * @return mixed A structured array with the field_id and field_value, or false on error
534
+     * @return string A structured array with the field_id and field_value, or false on error
535 535
      * @assert (-1,-1) === false
536 536
      */
537 537
     public function get_values_by_handler_and_field_id($item_id, $field_id, $transform = false)
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
      * @param int $item_id Item ID from the original table
625 625
      * @param string $field_variable The name of the field we are looking for
626 626
      * @param bool $transform
627
-     * @param bool $allVisibility
627
+     * @param bool $visibility
628 628
      *
629 629
      * @return mixed Array of results, or false on error or not found
630 630
      * @assert (-1,'') === false
@@ -686,7 +686,7 @@  discard block
 block discarded – undo
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(
Please login to merge, or discard this patch.
src/Chamilo/UserBundle/Entity/Manager/UserManager.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      *
19 19
      * @param string $token
20 20
      *
21
-     * @return UserInterface
21
+     * @return \FOS\UserBundle\Model\UserInterface|null
22 22
      */
23 23
     public function findUserByConfirmationToken($token)
24 24
     {
Please login to merge, or discard this patch.
main/inc/lib/MoodleImport.php 1 patch
Doc Comments   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
      * Read and validate the quiz module XML
404 404
      *
405 405
      * @param resource $moduleXml XML file
406
-     * @return mixed | array if is a valid xml file, false otherwise
406
+     * @return string | array if is a valid xml file, false otherwise
407 407
      */
408 408
     public function readQuizModule($moduleXml)
409 409
     {
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
      * Fix moodle files that contains spaces
622 622
      * @param array $importedFiles
623 623
      * @param string $text
624
-     * @return mixed
624
+     * @return string
625 625
      */
626 626
     public function fixPathInText($importedFiles, &$text)
627 627
     {
@@ -642,10 +642,10 @@  discard block
 block discarded – undo
642 642
      *
643 643
      * @param array $questionList
644 644
      * @param string $questionType
645
-     * @param object $questionInstance Question/Answer instance
645
+     * @param Question $questionInstance Question/Answer instance
646 646
      * @param array $currentQuestion
647 647
      * @param array $importedFiles
648
-     * @return integer db response
648
+     * @return boolean|null db response
649 649
      */
650 650
     public function processAnswers($questionList, $questionType, $questionInstance, $currentQuestion, $importedFiles)
651 651
     {
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
     /**
801 801
      * Process Chamilo Unique Answer
802 802
      *
803
-     * @param object $objAnswer
803
+     * @param Answer $objAnswer
804 804
      * @param array $answerValues
805 805
      * @param integer $position
806 806
      * @param integer $questionWeighting
@@ -836,7 +836,7 @@  discard block
 block discarded – undo
836 836
     /**
837 837
      * Process Chamilo True False
838 838
      *
839
-     * @param object $objAnswer
839
+     * @param Answer $objAnswer
840 840
      * @param array $answerValues
841 841
      * @param integer $position
842 842
      * @param integer $questionWeighting
@@ -873,7 +873,7 @@  discard block
 block discarded – undo
873 873
     /**
874 874
      * Process Chamilo FillBlanks
875 875
      *
876
-     * @param object $objAnswer
876
+     * @param Answer $objAnswer
877 877
      * @param array $questionType
878 878
      * @param array $answerValues
879 879
      * @param string $placeholder
@@ -1026,7 +1026,7 @@  discard block
 block discarded – undo
1026 1026
      * Litle utility to delete the unuseful tags
1027 1027
      *
1028 1028
      * @param $array
1029
-     * @param $keys
1029
+     * @param string[] $keys
1030 1030
      */
1031 1031
     public function traverseArray(&$array, $keys)
1032 1032
     {
Please login to merge, or discard this patch.