Completed
Pull Request — master (#1537)
by José
29:27
created
src/Chamilo/CoreBundle/Entity/Session.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
     }
397 397
 
398 398
     /**
399
-     * @param $courses
399
+     * @param ArrayCollection $courses
400 400
      */
401 401
     public function setCourses($courses)
402 402
     {
@@ -875,7 +875,7 @@  discard block
 block discarded – undo
875 875
     }
876 876
 
877 877
     /**
878
-     * @return array
878
+     * @return string[]
879 879
      */
880 880
     public static function getStatusList()
881 881
     {
Please login to merge, or discard this patch.
main/inc/lib/attendance.lib.php 1 patch
Doc Comments   +19 added lines, -5 removed lines patch added patch discarded remove patch
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
      * Add attendances sheet inside table. This is the *list of* dates, not
278 278
      * a specific date in itself.
279 279
      * @param  bool   true for adding link in gradebook or false otherwise (optional)
280
-     * @return int    last attendance id
280
+     * @return false|string    last attendance id
281 281
      */
282 282
     public function attendance_add($link_to_gradebook = false)
283 283
     {
@@ -354,6 +354,7 @@  discard block
 block discarded – undo
354 354
      * edit attendances inside table
355 355
      * @param 	int	   attendance id
356 356
      * @param  	bool   true for adding link in gradebook or false otherwise (optional)
357
+     * @param integer $attendance_id
357 358
      * @return 	int    last id
358 359
      */
359 360
     public function attendance_edit($attendance_id, $link_to_gradebook = false)
@@ -429,6 +430,7 @@  discard block
 block discarded – undo
429 430
     /**
430 431
      * Restore attendance
431 432
      * @param 	int|array	   one or many attendances id
433
+     * @param integer $attendance_id
432 434
      * @return 	int    		   affected rows
433 435
      */
434 436
     public function attendance_restore($attendance_id)
@@ -530,7 +532,7 @@  discard block
 block discarded – undo
530 532
 
531 533
     /**
532 534
      * Changes visibility
533
-     * @param int|array	$attendanceId   one or many attendances id
535
+     * @param integer	$attendanceId   one or many attendances id
534 536
      * @param int status
535 537
      *
536 538
      * @return 	int affected rows
@@ -585,6 +587,7 @@  discard block
 block discarded – undo
585 587
      * Lock or unlock an attendance
586 588
      * @param   int     attendance id
587 589
      * @param   bool    True to lock or false otherwise
590
+     * @param integer $attendance_id
588 591
      */
589 592
     public function lock_attendance($attendance_id, $lock = true)
590 593
     {
@@ -918,7 +921,10 @@  discard block
 block discarded – undo
918 921
      * @param   string  Event type ('locked_attendance', 'done_attendance_sheet' ...)
919 922
      * @param   int     Last edit user id
920 923
      * @param   string  Calendar datetime value (optional, when event type is 'done_attendance_sheet')
921
-     * @return  int     Affected rows
924
+     * @param integer $attendance_id
925
+     * @param string $lastedit_type
926
+     * @param integer $lastedit_user_id
927
+     * @return  false|string     Affected rows
922 928
      */
923 929
     public function save_attendance_sheet_log(
924 930
         $attendance_id,
@@ -963,6 +969,7 @@  discard block
 block discarded – undo
963 969
     /**
964 970
      * Get number of done attendances inside current sheet
965 971
      * @param	int	   attendance id
972
+     * @param integer $attendance_id
966 973
      * @return 	int	   number of done attendances
967 974
      */
968 975
     public static function get_done_attendance_calendar($attendance_id)
@@ -1198,6 +1205,7 @@  discard block
 block discarded – undo
1198 1205
     /**
1199 1206
      * Get next attendance calendar without presences (done attendances)
1200 1207
      * @param	int	attendance id
1208
+     * @param integer $attendance_id
1201 1209
      * @return 	int attendance calendar id
1202 1210
      */
1203 1211
     public function get_next_attendance_calendar_id($attendance_id)
@@ -1226,6 +1234,7 @@  discard block
 block discarded – undo
1226 1234
     /**
1227 1235
      * Get next attendance calendar datetime without presences (done attendances)
1228 1236
      * @param	int	attendance id
1237
+     * @param integer $attendance_id
1229 1238
      * @return 	int UNIX time format datetime
1230 1239
      */
1231 1240
     public function get_next_attendance_calendar_datetime($attendance_id)
@@ -1254,6 +1263,7 @@  discard block
 block discarded – undo
1254 1263
      * Get user' score from current attendance
1255 1264
      * @param	int	$user_id
1256 1265
      * @param	int $attendance_id
1266
+     * @param integer $groupId
1257 1267
      * @return	int score
1258 1268
      */
1259 1269
     public function get_user_score($user_id, $attendance_id, $groupId = null)
@@ -1301,6 +1311,7 @@  discard block
 block discarded – undo
1301 1311
     /**
1302 1312
      * Get attendance calendar data by id
1303 1313
      * @param	int	attendance calendar id
1314
+     * @param integer $calendar_id
1304 1315
      * @return	array attendance calendar data
1305 1316
      */
1306 1317
     public function get_attendance_calendar_by_id($calendar_id)
@@ -1423,6 +1434,7 @@  discard block
 block discarded – undo
1423 1434
      * Get number of attendance calendar inside current attendance
1424 1435
      * @param	int	$attendance_id
1425 1436
      * @param	int	$groupId
1437
+     * @param boolean $done_attendance
1426 1438
      * @return	int number of dates in attendance calendar
1427 1439
      */
1428 1440
     public static function get_number_of_attendance_calendar($attendance_id, $groupId = 0, $done_attendance = NULL, $userId = 0)
@@ -1648,7 +1660,6 @@  discard block
 block discarded – undo
1648 1660
     /**
1649 1661
      * @param int $calendarId
1650 1662
      * @param int $courseId
1651
-     * @param int $groupId
1652 1663
      * @return array
1653 1664
      */
1654 1665
     public function getGroupListByAttendanceCalendar($calendarId, $courseId)
@@ -1688,7 +1699,6 @@  discard block
 block discarded – undo
1688 1699
     /**
1689 1700
      * @param int $calendarId
1690 1701
      * @param int $courseId
1691
-     * @param int $groupId
1692 1702
      *
1693 1703
      * @return array
1694 1704
      */
@@ -1789,6 +1799,8 @@  discard block
 block discarded – undo
1789 1799
      * edit a datetime inside attendance calendar table
1790 1800
      * @param	int	attendance calendar id
1791 1801
      * @param	int	attendance id
1802
+     * @param integer $calendar_id
1803
+     * @param integer $attendance_id
1792 1804
      * @return	int affected rows
1793 1805
      */
1794 1806
     public function attendance_calendar_edit($calendar_id, $attendance_id)
@@ -1828,6 +1840,8 @@  discard block
 block discarded – undo
1828 1840
      * @param	int		attendance calendar id
1829 1841
      * @param	int		attendance id
1830 1842
      * @param	bool	true for removing all calendar inside current attendance, false for removing by calendar id
1843
+     * @param integer $calendar_id
1844
+     * @param integer $attendance_id
1831 1845
      * @return	int affected rows
1832 1846
      */
1833 1847
     public function attendance_calendar_delete($calendar_id, $attendance_id , $all_delete = false)
Please login to merge, or discard this patch.
main/inc/lib/tracking.lib.php 1 patch
Doc Comments   +11 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1440,7 +1440,7 @@  discard block
 block discarded – undo
1440 1440
      * Get first connection date for a student
1441 1441
      * @param    int $student_id
1442 1442
      *
1443
-     * @return    string|bool Date format long without day or false if there are no connections
1443
+     * @return    string|false Date format long without day or false if there are no connections
1444 1444
      */
1445 1445
     public static function get_first_connection_date($student_id)
1446 1446
     {
@@ -1470,7 +1470,7 @@  discard block
 block discarded – undo
1470 1470
      * @param int $student_id
1471 1471
      * @param bool $warning_message Show a warning message (optional)
1472 1472
      * @param bool $return_timestamp True for returning results in timestamp (optional)
1473
-     * @return string|int|bool Date format long without day, false if there are no connections or
1473
+     * @return string Date format long without day, false if there are no connections or
1474 1474
      * timestamp if parameter $return_timestamp is true
1475 1475
      */
1476 1476
     public static function get_last_connection_date($student_id, $warning_message = false, $return_timestamp = false)
@@ -2795,6 +2795,9 @@  discard block
 block discarded – undo
2795 2795
      * @param     array         Limit average to listed lp ids
2796 2796
      * @param     int            Session id (optional), if param $session_id is
2797 2797
      * null(default) it'll return results including sessions, 0 = session is not filtered
2798
+     * @param integer $student_id
2799
+     * @param string $course_code
2800
+     * @param integer $session_id
2798 2801
      * @return     int         Total time
2799 2802
      */
2800 2803
     public static function get_time_spent_in_lp($student_id, $course_code, $lp_ids = array(), $session_id = null)
@@ -2864,6 +2867,8 @@  discard block
 block discarded – undo
2864 2867
      * @param     int|array    Student id(s)
2865 2868
      * @param     string         Course code
2866 2869
      * @param     int         Learning path id
2870
+     * @param integer $student_id
2871
+     * @param string $course_code
2867 2872
      * @return     int         Total time
2868 2873
      */
2869 2874
     public static function get_last_connection_time_in_lp($student_id, $course_code, $lp_id, $session_id = 0)
@@ -5586,7 +5591,7 @@  discard block
 block discarded – undo
5586 5591
 
5587 5592
     /**
5588 5593
     * @param FormValidator $form
5589
-    * @return mixed
5594
+    * @return FormValidator
5590 5595
     */
5591 5596
     public static function setUserSearchForm($form)
5592 5597
     {
@@ -7187,7 +7192,7 @@  discard block
 block discarded – undo
7187 7192
      * @param int $user_id
7188 7193
      * @param int $course_id
7189 7194
      * @param int $session_id
7190
-     * @return array
7195
+     * @return string[]
7191 7196
      */
7192 7197
     public function display_login_tracking_info($view, $user_id, $course_id, $session_id = 0)
7193 7198
     {
@@ -7233,9 +7238,9 @@  discard block
 block discarded – undo
7233 7238
     /**
7234 7239
      * Displays the exercise results for a specific user in a specific course.
7235 7240
      * @param   string $view
7236
-     * @param   int $user_id    User ID
7241
+     * @param   int $userId    User ID
7237 7242
      * @param   string  $courseCode Course code
7238
-     * @return array
7243
+     * @return string[]
7239 7244
      * @todo remove globals
7240 7245
      */
7241 7246
     public function display_exercise_tracking_info($view, $userId, $courseCode)
Please login to merge, or discard this patch.
src/Chamilo/SettingsBundle/Twig/SettingsExtension.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      *
43 43
      * @param string $namespace
44 44
      *
45
-     * @return array
45
+     * @return \Sylius\Bundle\SettingsBundle\Model\SettingsInterface
46 46
      */
47 47
     public function getSettings($namespace)
48 48
     {
Please login to merge, or discard this patch.
main/inc/lib/course_request.lib.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,8 @@
 block discarded – undo
51 51
      * @param string $objetives
52 52
      * @param string $target_audience
53 53
      * @param int $user_id
54
-     * @return mixed The database id of the newly created course request or FALSE on failure.
54
+     * @param boolean $exemplary_content
55
+     * @return false|string The database id of the newly created course request or FALSE on failure.
55 56
      */
56 57
     public static function create_course_request(
57 58
         $wanted_code,
Please login to merge, or discard this patch.
main/inc/lib/grade_model.lib.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     }
39 39
 
40 40
     /**
41
-     * @return bool
41
+     * @return false|null
42 42
      */
43 43
     public function create_user_folder()
44 44
     {
Please login to merge, or discard this patch.
main/inc/lib/message.lib.php 1 patch
Doc Comments   +8 added lines, -5 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
     {
@@ -1541,7 +1544,7 @@  discard block
 block discarded – undo
1541 1544
     }
1542 1545
 
1543 1546
     /**
1544
-     * @param $id
1547
+     * @param string $id
1545 1548
      * @param array $params
1546 1549
      * @return string
1547 1550
      */
@@ -1555,7 +1558,7 @@  discard block
 block discarded – undo
1555 1558
     }
1556 1559
 
1557 1560
     /**
1558
-     * @param $id
1561
+     * @param string $id
1559 1562
      * @param array $params
1560 1563
      * @return string
1561 1564
      */
Please login to merge, or discard this patch.
src/Chamilo/UserBundle/Entity/User.php 1 patch
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
     }
644 644
 
645 645
     /**
646
-     * @param $portal
646
+     * @param AccessUrlRelUser $portal
647 647
      */
648 648
     public function setPortal($portal)
649 649
     {
@@ -1003,7 +1003,7 @@  discard block
 block discarded – undo
1003 1003
     /**
1004 1004
      * Get pictureUri
1005 1005
      *
1006
-     * @return Media
1006
+     * @return string
1007 1007
      */
1008 1008
     public function getPictureUri()
1009 1009
     {
@@ -1311,7 +1311,7 @@  discard block
 block discarded – undo
1311 1311
     }
1312 1312
 
1313 1313
     /**
1314
-     * @return Media
1314
+     * @return string
1315 1315
      */
1316 1316
     public function getAvatar()
1317 1317
     {
@@ -2088,7 +2088,7 @@  discard block
 block discarded – undo
2088 2088
     }
2089 2089
 
2090 2090
     /**
2091
-     * @return mixed
2091
+     * @return string|null
2092 2092
      */
2093 2093
     public function getPlainPassword()
2094 2094
     {
@@ -2100,7 +2100,7 @@  discard block
 block discarded – undo
2100 2100
       /**
2101 2101
      * Returns the user roles
2102 2102
      *
2103
-     * @return array The roles
2103
+     * @return string[] The roles
2104 2104
      */
2105 2105
     public function getRoles()
2106 2106
     {
@@ -2425,7 +2425,7 @@  discard block
 block discarded – undo
2425 2425
     /**
2426 2426
      * Check if the user has the skill
2427 2427
      * @param Skill $skill The skill
2428
-     * @return boolean
2428
+     * @return boolean|null
2429 2429
      */
2430 2430
     public function hasSkill(Skill $skill)
2431 2431
     {
Please login to merge, or discard this patch.
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|null $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.