Completed
Pull Request — 1.11.x (#1586)
by José
39:35 queued 15:29
created
main/inc/lib/sessionmanager.lib.php 1 patch
Doc Comments   +19 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1532,7 +1532,7 @@  discard block
 block discarded – undo
1532 1532
      * @param	array	$id_checked an array to delete sessions
1533 1533
      * @param   boolean  $from_ws optional, true if the function is called
1534 1534
      * by a webservice, false otherwise.
1535
-     * @return	void	Nothing, or false on error
1535
+     * @return	boolean	Nothing, or false on error
1536 1536
      * */
1537 1537
     public static function delete($id_checked, $from_ws = false)
1538 1538
     {
@@ -1669,7 +1669,7 @@  discard block
 block discarded – undo
1669 1669
      * @param array $user_list
1670 1670
      * @param int $session_visibility
1671 1671
      * @param bool $empty_users
1672
-     * @return bool
1672
+     * @return false|null
1673 1673
      */
1674 1674
     public static function subscribe_users_to_session(
1675 1675
         $id_session,
@@ -1942,7 +1942,7 @@  discard block
 block discarded – undo
1942 1942
      * @param array $courseInfo
1943 1943
      * @param int $status
1944 1944
      * @param bool $updateTotal
1945
-     * @return bool
1945
+     * @return false|null
1946 1946
      */
1947 1947
     public static function removeUsersFromCourseSession(
1948 1948
         $userList,
@@ -2008,7 +2008,7 @@  discard block
 block discarded – undo
2008 2008
      * @param string $course_code
2009 2009
      * @param int $session_visibility
2010 2010
      * @param bool $removeUsersNotInList
2011
-     * @return bool
2011
+     * @return false|null
2012 2012
      */
2013 2013
     public static function subscribe_users_to_session_course(
2014 2014
         $user_list,
@@ -2192,7 +2192,7 @@  discard block
 block discarded – undo
2192 2192
      * @param	bool	$removeExistingCoursesWithUsers Whether to unsubscribe
2193 2193
      * existing courses and users (true, default) or not (false)
2194 2194
      * @param $copyEvaluation from base course to session course
2195
-     * @return	void	Nothing, or false on error
2195
+     * @return	false|null	Nothing, or false on error
2196 2196
      * */
2197 2197
     public static function add_courses_to_session(
2198 2198
         $sessionId,
@@ -2441,7 +2441,7 @@  discard block
 block discarded – undo
2441 2441
      * @param	string	$variable Field's internal variable name
2442 2442
      * @param	int		$fieldType Field's type
2443 2443
      * @param	string	$displayText Field's language var name
2444
-     * @return int     new extra field id
2444
+     * @return boolean     new extra field id
2445 2445
      */
2446 2446
     public static function create_session_extra_field($variable, $fieldType, $displayText)
2447 2447
     {
@@ -2670,7 +2670,7 @@  discard block
 block discarded – undo
2670 2670
      * @param	array	id_checked
2671 2671
      * @param	bool	include delete session
2672 2672
      * @param	bool	optional, true if the function is called by a webservice, false otherwise.
2673
-     * @return	void	Nothing, or false on error
2673
+     * @return	boolean	Nothing, or false on error
2674 2674
      * The parameters is a array to delete sessions
2675 2675
      * */
2676 2676
     public static function delete_session_category($id_checked, $delete_session = false, $from_ws = false)
@@ -3436,8 +3436,8 @@  discard block
 block discarded – undo
3436 3436
     /**
3437 3437
      * Gets the list of courses by session filtered by access_url
3438 3438
      *
3439
-     * @param $userId
3440
-     * @param $sessionId
3439
+     * @param integer $userId
3440
+     * @param null|integer $sessionId
3441 3441
      * @param null $from
3442 3442
      * @param null $limit
3443 3443
      * @param null $column
@@ -3562,6 +3562,7 @@  discard block
 block discarded – undo
3562 3562
     /**
3563 3563
      * Gets the count of courses by session filtered by access_url
3564 3564
      * @param int session id
3565
+     * @param integer $session_id
3565 3566
      * @return array list of courses
3566 3567
      */
3567 3568
     public static function getCourseCountBySessionId($session_id, $keyword = null)
@@ -3820,6 +3821,7 @@  discard block
 block discarded – undo
3820 3821
      * Updates a session status
3821 3822
      * @param	int 	session id
3822 3823
      * @param	int 	status
3824
+     * @param integer $status
3823 3825
      */
3824 3826
     public static function set_session_status($session_id, $status)
3825 3827
     {
@@ -4028,7 +4030,7 @@  discard block
 block discarded – undo
4028 4030
      * Protect a session to be edited.
4029 4031
      * @param int $id
4030 4032
      * @param bool $checkSession
4031
-     * @return mixed | bool true if pass the check, api_not_allowed otherwise
4033
+     * @return boolean|null | bool true if pass the check, api_not_allowed otherwise
4032 4034
      */
4033 4035
     public static function protectSession($id, $checkSession = true)
4034 4036
     {
@@ -4136,7 +4138,7 @@  discard block
 block discarded – undo
4136 4138
 
4137 4139
     /**
4138 4140
      * @param $id
4139
-     * @return bool
4141
+     * @return null|boolean
4140 4142
      */
4141 4143
     public static function protect_teacher_session_edit($id)
4142 4144
     {
@@ -4201,7 +4203,7 @@  discard block
 block discarded – undo
4201 4203
      *  true: if the session exists it will be updated.
4202 4204
      *  false: if session exists a new session will be created adding a counter session1, session2, etc
4203 4205
      * @param int $defaultUserId
4204
-     * @param mixed $logger
4206
+     * @param Logger $logger
4205 4207
      * @param array $extraFields convert a file row to an extra field. Example in CSV file there's a SessionID then it will
4206 4208
      * converted to extra_external_session_id if you set this: array('SessionId' => 'extra_external_session_id')
4207 4209
      * @param string $extraFieldId
@@ -5504,7 +5506,6 @@  discard block
 block discarded – undo
5504 5506
      * @param string $lastConnectionDate
5505 5507
      * @param array $sessionIdList
5506 5508
      * @param array $studentIdList
5507
-     * @param int $userStatus STUDENT|COURSEMANAGER constants
5508 5509
      *
5509 5510
      * @return array|int
5510 5511
      */
@@ -5656,7 +5657,7 @@  discard block
 block discarded – undo
5656 5657
     /**
5657 5658
      * Get the list of course tools that have to be dealt with in case of
5658 5659
      * registering any course to a session
5659
-     * @return array The list of tools to be dealt with (literal names)
5660
+     * @return string[] The list of tools to be dealt with (literal names)
5660 5661
      */
5661 5662
     public static function getCourseToolToBeManaged()
5662 5663
     {
@@ -5670,7 +5671,7 @@  discard block
 block discarded – undo
5670 5671
      * Calls the methods bound to each tool when a course is registered into a session
5671 5672
      * @param int $sessionId
5672 5673
      * @param int $courseId
5673
-     * @return void
5674
+     * @return boolean|null
5674 5675
      */
5675 5676
     public static function installCourse($sessionId, $courseId)
5676 5677
     {
@@ -6320,6 +6321,7 @@  discard block
 block discarded – undo
6320 6321
      * @param int $categoryId The internal ID of the session category
6321 6322
      * @param string $target Value to search for in the session field values
6322 6323
      * @param array $extraFields A list of fields to be scanned and returned
6324
+     * @param DateTime $publicationDate
6323 6325
      * @return mixed
6324 6326
      */
6325 6327
     public static function getShortSessionListAndExtraByCategory(
@@ -7656,7 +7658,7 @@  discard block
 block discarded – undo
7656 7658
     /**
7657 7659
      * Get link to the admin page for this session
7658 7660
      * @param   int $id Session ID
7659
-     * @return mixed    URL to the admin page to manage the session, or false on error
7661
+     * @return false|string    URL to the admin page to manage the session, or false on error
7660 7662
      */
7661 7663
     public static function getAdminPath($id)
7662 7664
     {
@@ -7673,7 +7675,7 @@  discard block
 block discarded – undo
7673 7675
      * If a course is provided, build the link to the course
7674 7676
      * @param   int $id Session ID
7675 7677
      * @param   int $courseId Course ID (optional) in case the link has to send straight to the course
7676
-     * @return mixed    URL to the page to use the session, or false on error
7678
+     * @return false|string    URL to the page to use the session, or false on error
7677 7679
      */
7678 7680
     public static function getPath($id, $courseId = 0)
7679 7681
     {
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Entity/Repository/SequenceRepository.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
      *
76 76
      * @param int $resourceId
77 77
      * @param int $type
78
-     * @return boolean
78
+     * @return boolean|null
79 79
      */
80 80
     public function deleteResource($resourceId, $type)
81 81
     {
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Basic.php 1 patch
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,6 +71,8 @@  discard block
 block discarded – undo
71 71
 
72 72
     /**
73 73
      * @inheritdoc
74
+     * @param string $toolbar
75
+     * @param string $prefix
74 76
      */
75 77
     public function __construct(
76 78
         $toolbar = null,
@@ -253,7 +255,7 @@  discard block
 block discarded – undo
253 255
     }
254 256
 
255 257
     /**
256
-     * @return array
258
+     * @return string[]
257 259
      */
258 260
     public function getNewPageBlock()
259 261
     {
Please login to merge, or discard this patch.
main/inc/lib/attendance.lib.php 1 patch
Doc Comments   +24 added lines, -6 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)
@@ -478,7 +480,7 @@  discard block
 block discarded – undo
478 480
 
479 481
     /**
480 482
      * Delete attendances
481
-     * @param 	int|array	$attendance_id   one or many attendances id
483
+     * @param 	integer	$attendance_id   one or many attendances id
482 484
      * @return 	int    		   affected rows
483 485
      */
484 486
     public function attendance_delete($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,11 @@  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_date
926
+     * @param string $lastedit_type
927
+     * @param integer $lastedit_user_id
928
+     * @return  false|string     Affected rows
922 929
      */
923 930
     public function save_attendance_sheet_log(
924 931
         $attendance_id,
@@ -963,6 +970,7 @@  discard block
 block discarded – undo
963 970
     /**
964 971
      * Get number of done attendances inside current sheet
965 972
      * @param	int	   attendance id
973
+     * @param integer $attendance_id
966 974
      * @return 	int	   number of done attendances
967 975
      */
968 976
     public static function get_done_attendance_calendar($attendance_id)
@@ -1198,6 +1206,7 @@  discard block
 block discarded – undo
1198 1206
     /**
1199 1207
      * Get next attendance calendar without presences (done attendances)
1200 1208
      * @param	int	attendance id
1209
+     * @param integer $attendance_id
1201 1210
      * @return 	int attendance calendar id
1202 1211
      */
1203 1212
     public function get_next_attendance_calendar_id($attendance_id)
@@ -1226,6 +1235,7 @@  discard block
 block discarded – undo
1226 1235
     /**
1227 1236
      * Get next attendance calendar datetime without presences (done attendances)
1228 1237
      * @param	int	attendance id
1238
+     * @param integer $attendance_id
1229 1239
      * @return 	int UNIX time format datetime
1230 1240
      */
1231 1241
     public function get_next_attendance_calendar_datetime($attendance_id)
@@ -1254,6 +1264,7 @@  discard block
 block discarded – undo
1254 1264
      * Get user' score from current attendance
1255 1265
      * @param	int	$user_id
1256 1266
      * @param	int $attendance_id
1267
+     * @param integer $groupId
1257 1268
      * @return	int score
1258 1269
      */
1259 1270
     public function get_user_score($user_id, $attendance_id, $groupId = null)
@@ -1301,6 +1312,7 @@  discard block
 block discarded – undo
1301 1312
     /**
1302 1313
      * Get attendance calendar data by id
1303 1314
      * @param	int	attendance calendar id
1315
+     * @param integer $calendar_id
1304 1316
      * @return	array attendance calendar data
1305 1317
      */
1306 1318
     public function get_attendance_calendar_by_id($calendar_id)
@@ -1423,6 +1435,7 @@  discard block
 block discarded – undo
1423 1435
      * Get number of attendance calendar inside current attendance
1424 1436
      * @param	int	$attendance_id
1425 1437
      * @param	int	$groupId
1438
+     * @param boolean $done_attendance
1426 1439
      * @return	int number of dates in attendance calendar
1427 1440
      */
1428 1441
     public static function get_number_of_attendance_calendar($attendance_id, $groupId = 0, $done_attendance = NULL, $userId = 0)
@@ -1648,7 +1661,6 @@  discard block
 block discarded – undo
1648 1661
     /**
1649 1662
      * @param int $calendarId
1650 1663
      * @param int $courseId
1651
-     * @param int $groupId
1652 1664
      * @return array
1653 1665
      */
1654 1666
     public function getGroupListByAttendanceCalendar($calendarId, $courseId)
@@ -1688,7 +1700,6 @@  discard block
 block discarded – undo
1688 1700
     /**
1689 1701
      * @param int $calendarId
1690 1702
      * @param int $courseId
1691
-     * @param int $groupId
1692 1703
      *
1693 1704
      * @return array
1694 1705
      */
@@ -1789,6 +1800,8 @@  discard block
 block discarded – undo
1789 1800
      * edit a datetime inside attendance calendar table
1790 1801
      * @param	int	attendance calendar id
1791 1802
      * @param	int	attendance id
1803
+     * @param integer $calendar_id
1804
+     * @param integer $attendance_id
1792 1805
      * @return	int affected rows
1793 1806
      */
1794 1807
     public function attendance_calendar_edit($calendar_id, $attendance_id)
@@ -1828,6 +1841,8 @@  discard block
 block discarded – undo
1828 1841
      * @param	int		attendance calendar id
1829 1842
      * @param	int		attendance id
1830 1843
      * @param	bool	true for removing all calendar inside current attendance, false for removing by calendar id
1844
+     * @param integer $calendar_id
1845
+     * @param integer $attendance_id
1831 1846
      * @return	int affected rows
1832 1847
      */
1833 1848
     public function attendance_calendar_delete($calendar_id, $attendance_id , $all_delete = false)
@@ -1890,6 +1905,9 @@  discard block
 block discarded – undo
1890 1905
         $this->course_id = $course_id;
1891 1906
     }
1892 1907
 
1908
+    /**
1909
+     * @param string $datetime
1910
+     */
1893 1911
     public function set_date_time($datetime)
1894 1912
     {
1895 1913
         $this->date_time = $datetime;
Please login to merge, or discard this patch.
plugin/buycourses/src/buy_course_plugin.class.php 1 patch
Doc Comments   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
     /**
47 47
      *
48
-     * @return StaticPlugin
48
+     * @return BuyCoursesPlugin
49 49
      */
50 50
     static function create()
51 51
     {
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
     /**
269 269
      * Save a transfer account information
270 270
      * @param array $params The transfer account
271
-     * @return int Rows affected. Otherwise return false
271
+     * @return false|string Rows affected. Otherwise return false
272 272
      */
273 273
     public function saveTransferAccount($params)
274 274
     {
@@ -680,7 +680,7 @@  discard block
 block discarded – undo
680 680
     /**
681 681
      * Get session info
682 682
      * @param array $sessionId The session ID
683
-     * @return array
683
+     * @return Session
684 684
      */
685 685
     public function getSessionInfo($sessionId)
686 686
     {
@@ -773,7 +773,7 @@  discard block
 block discarded – undo
773 773
      * Register a sale
774 774
      * @param int $itemId The product ID
775 775
      * @param int $paymentType The payment type
776
-     * @return boolean
776
+     * @return false|string
777 777
      */
778 778
     public function registerSale($itemId, $paymentType)
779 779
     {
@@ -955,7 +955,7 @@  discard block
 block discarded – undo
955 955
 
956 956
     /**
957 957
      * Get payment types
958
-     * @return array
958
+     * @return string[]
959 959
      */
960 960
     public function getPaymentTypes()
961 961
     {
@@ -994,7 +994,7 @@  discard block
 block discarded – undo
994 994
 
995 995
     /**
996 996
      * Get the statuses for sales
997
-     * @return array
997
+     * @return string[]
998 998
      */
999 999
     public function getSaleStatuses()
1000 1000
     {
@@ -1007,7 +1007,7 @@  discard block
 block discarded – undo
1007 1007
 
1008 1008
     /**
1009 1009
      * Get the statuses for Payouts
1010
-     * @return array
1010
+     * @return string[]
1011 1011
      */
1012 1012
     public function getPayoutStatuses()
1013 1013
     {
@@ -1020,7 +1020,7 @@  discard block
 block discarded – undo
1020 1020
 
1021 1021
     /**
1022 1022
      * Get the list of product types
1023
-     * @return array
1023
+     * @return string[]
1024 1024
      */
1025 1025
     public function getProductTypes()
1026 1026
     {
@@ -1401,7 +1401,7 @@  discard block
 block discarded – undo
1401 1401
     /**
1402 1402
      * Register a item
1403 1403
      * @param array $itemData The item data
1404
-     * @return int The item ID. Otherwise return false
1404
+     * @return false|string The item ID. Otherwise return false
1405 1405
      */
1406 1406
     public function registerItem(array $itemData)
1407 1407
     {
@@ -1559,7 +1559,7 @@  discard block
 block discarded – undo
1559 1559
     /**
1560 1560
      * Verify if the beneficiary have a paypal account
1561 1561
      * @param int $userId
1562
-     * @return true if the user have a paypal account, false if not
1562
+     * @return boolean if the user have a paypal account, false if not
1563 1563
      */
1564 1564
     public function verifyPaypalAccountByBeneficiary($userId)
1565 1565
     {
@@ -1681,7 +1681,7 @@  discard block
 block discarded – undo
1681 1681
     /**
1682 1682
      * Register addicional service
1683 1683
      * @param array params $service
1684
-     * @return mixed response
1684
+     * @return string|false response
1685 1685
      */
1686 1686
     public function storeService($service)
1687 1687
     {
@@ -1838,7 +1838,7 @@  discard block
 block discarded – undo
1838 1838
 
1839 1839
     /**
1840 1840
      * Get the statuses for sales
1841
-     * @return array
1841
+     * @return string[]
1842 1842
      */
1843 1843
     public function getServiceSaleStatuses()
1844 1844
     {
@@ -2094,7 +2094,7 @@  discard block
 block discarded – undo
2094 2094
      * @param int $paymentType The payment type
2095 2095
      * @param int $infoSelect The ID for Service Type
2096 2096
      * @param int $trial trial mode
2097
-     * @return boolean
2097
+     * @return false|string
2098 2098
      */
2099 2099
     public function registerServiceSale($serviceId, $paymentType, $infoSelect, $trial = null)
2100 2100
     {
Please login to merge, or discard this patch.