Completed
Pull Request — 1.11.x (#1285)
by José
46:22
created
app/check.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -96,6 +96,9 @@
 block discarded – undo
96 96
     echo PHP_EOL;
97 97
 }
98 98
 
99
+/**
100
+ * @param string $message
101
+ */
99 102
 function echo_style($style, $message)
100 103
 {
101 104
     // ANSI color codes
Please login to merge, or discard this patch.
main/inc/lib/sessionmanager.lib.php 1 patch
Doc Comments   +25 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1336,7 +1336,7 @@  discard block
 block discarded – undo
1336 1336
      * @param string    $description
1337 1337
      * @param int       $showDescription
1338 1338
      * @param int       $duration
1339
-     * @param array     $extraFields
1339
+     * @param boolean|null     $extraFields
1340 1340
      * @param int       $sessionAdminId
1341 1341
      * @param boolean $sendSubscriptionNotification Optional.
1342 1342
      *          Whether send a mail notification to users being subscribed
@@ -1565,7 +1565,7 @@  discard block
 block discarded – undo
1565 1565
      * @param array $user_list
1566 1566
      * @param int $session_visibility
1567 1567
      * @param bool $empty_users
1568
-     * @return bool
1568
+     * @return false|null
1569 1569
      */
1570 1570
     public static function suscribe_users_to_session(
1571 1571
         $id_session,
@@ -1837,7 +1837,7 @@  discard block
 block discarded – undo
1837 1837
      * @param array $courseInfo
1838 1838
      * @param int $status
1839 1839
      * @param bool $updateTotal
1840
-     * @return bool
1840
+     * @return false|null
1841 1841
      */
1842 1842
     public static function removeUsersFromCourseSession(
1843 1843
         $userList,
@@ -1903,7 +1903,7 @@  discard block
 block discarded – undo
1903 1903
      * @param string $course_code
1904 1904
      * @param int $session_visibility
1905 1905
      * @param bool $removeUsersNotInList
1906
-     * @return bool
1906
+     * @return false|null
1907 1907
      */
1908 1908
     public static function subscribe_users_to_session_course(
1909 1909
         $user_list,
@@ -2086,7 +2086,7 @@  discard block
 block discarded – undo
2086 2086
      * @param	bool	$removeExistingCoursesWithUsers Whether to unsubscribe
2087 2087
      * existing courses and users (true, default) or not (false)
2088 2088
      * @param $copyEvaluation from base course to session course
2089
-     * @return	void	Nothing, or false on error
2089
+     * @return	false|null	Nothing, or false on error
2090 2090
      * */
2091 2091
     public static function add_courses_to_session(
2092 2092
         $sessionId,
@@ -2282,6 +2282,8 @@  discard block
 block discarded – undo
2282 2282
      *
2283 2283
      * @param int Session id
2284 2284
      * @param int Course id
2285
+     * @param integer $session_id
2286
+     * @param integer $course_id
2285 2287
      * @return bool True in case of success, false otherwise
2286 2288
      */
2287 2289
     public static function unsubscribe_course_from_session($session_id, $course_id)
@@ -2337,7 +2339,7 @@  discard block
 block discarded – undo
2337 2339
      * @param	string	$variable Field's internal variable name
2338 2340
      * @param	int		$fieldType Field's type
2339 2341
      * @param	string	$displayText Field's language var name
2340
-     * @return int     new extra field id
2342
+     * @return boolean     new extra field id
2341 2343
      */
2342 2344
     public static function create_session_extra_field($variable, $fieldType, $displayText)
2343 2345
     {
@@ -2561,7 +2563,7 @@  discard block
 block discarded – undo
2561 2563
      * @param	array	id_checked
2562 2564
      * @param	bool	include delete session
2563 2565
      * @param	bool	optional, true if the function is called by a webservice, false otherwise.
2564
-     * @return	void	Nothing, or false on error
2566
+     * @return	boolean	Nothing, or false on error
2565 2567
      * The parameters is a array to delete sessions
2566 2568
      * */
2567 2569
     public static function delete_session_category($id_checked, $delete_session = false, $from_ws = false)
@@ -3056,6 +3058,7 @@  discard block
 block discarded – undo
3056 3058
      * @param string $orderCondition
3057 3059
      * @param string $keyword
3058 3060
      * @param string $description
3061
+     * @param integer $status
3059 3062
      * @return array sessions
3060 3063
      */
3061 3064
     public static function getSessionsFollowedByUser(
@@ -3268,8 +3271,8 @@  discard block
 block discarded – undo
3268 3271
     /**
3269 3272
      * Gets the list of courses by session filtered by access_url
3270 3273
      *
3271
-     * @param $userId
3272
-     * @param $sessionId
3274
+     * @param integer $userId
3275
+     * @param null|integer $sessionId
3273 3276
      * @param null $from
3274 3277
      * @param null $limit
3275 3278
      * @param null $column
@@ -3394,6 +3397,7 @@  discard block
 block discarded – undo
3394 3397
     /**
3395 3398
      * Gets the count of courses by session filtered by access_url
3396 3399
      * @param int session id
3400
+     * @param integer $session_id
3397 3401
      * @return array list of courses
3398 3402
      */
3399 3403
     public static function getCourseCountBySessionId($session_id, $keyword = null)
@@ -3645,6 +3649,7 @@  discard block
 block discarded – undo
3645 3649
      * Updates a session status
3646 3650
      * @param	int 	session id
3647 3651
      * @param	int 	status
3652
+     * @param integer $status
3648 3653
      */
3649 3654
     public static function set_session_status($session_id, $status)
3650 3655
     {
@@ -3853,7 +3858,7 @@  discard block
 block discarded – undo
3853 3858
      * Protect a session to be edited.
3854 3859
      * @param int $id
3855 3860
      * @param bool $checkSession
3856
-     * @return mixed | bool true if pass the check, api_not_allowed otherwise
3861
+     * @return boolean|null | bool true if pass the check, api_not_allowed otherwise
3857 3862
      */
3858 3863
     public static function protectSession($id, $checkSession = true)
3859 3864
     {
@@ -3961,7 +3966,7 @@  discard block
 block discarded – undo
3961 3966
 
3962 3967
     /**
3963 3968
      * @param $id
3964
-     * @return bool
3969
+     * @return null|boolean
3965 3970
      */
3966 3971
     public static function protect_teacher_session_edit($id)
3967 3972
     {
@@ -4025,7 +4030,7 @@  discard block
 block discarded – undo
4025 4030
      *  true: if the session exists it will be updated.
4026 4031
      *  false: if session exists a new session will be created adding a counter session1, session2, etc
4027 4032
      * @param int $defaultUserId
4028
-     * @param mixed $logger
4033
+     * @param Logger $logger
4029 4034
      * @param array $extraFields convert a file row to an extra field. Example in CSV file there's a SessionID then it will
4030 4035
      * converted to extra_external_session_id if you set this: array('SessionId' => 'extra_external_session_id')
4031 4036
      * @param string $extraFieldId
@@ -5273,7 +5278,6 @@  discard block
 block discarded – undo
5273 5278
      * @param string $lastConnectionDate
5274 5279
      * @param array $sessionIdList
5275 5280
      * @param array $studentIdList
5276
-     * @param int $userStatus STUDENT|COURSEMANAGER constants
5277 5281
      *
5278 5282
      * @return array|int
5279 5283
      */
@@ -5425,7 +5429,7 @@  discard block
 block discarded – undo
5425 5429
     /**
5426 5430
      * Get the list of course tools that have to be dealt with in case of
5427 5431
      * registering any course to a session
5428
-     * @return array The list of tools to be dealt with (literal names)
5432
+     * @return string[] The list of tools to be dealt with (literal names)
5429 5433
      */
5430 5434
     public static function getCourseToolToBeManaged()
5431 5435
     {
@@ -5439,7 +5443,7 @@  discard block
 block discarded – undo
5439 5443
      * Calls the methods bound to each tool when a course is registered into a session
5440 5444
      * @param int $sessionId
5441 5445
      * @param int $courseId
5442
-     * @return void
5446
+     * @return boolean|null
5443 5447
      */
5444 5448
     public static function installCourse($sessionId, $courseId)
5445 5449
     {
@@ -6079,6 +6083,7 @@  discard block
 block discarded – undo
6079 6083
      * @param int $categoryId The internal ID of the session category
6080 6084
      * @param string $target Value to search for in the session field values
6081 6085
      * @param array $extraFields A list of fields to be scanned and returned
6086
+     * @param DateTime $publicationDate
6082 6087
      * @return mixed
6083 6088
      */
6084 6089
     public static function getShortSessionListAndExtraByCategory($categoryId, $target, $extraFields = null, $publicationDate = null)
@@ -6591,6 +6596,8 @@  discard block
 block discarded – undo
6591 6596
      * Converts "start date" and "end date" to "From start date to end date" string
6592 6597
      * @param string $startDate
6593 6598
      * @param string $endDate
6599
+     * @param boolean $showTime
6600
+     * @param boolean $dateHuman
6594 6601
      *
6595 6602
      * @return string
6596 6603
      */
@@ -7407,7 +7414,7 @@  discard block
 block discarded – undo
7407 7414
     /**
7408 7415
      * Get link to the admin page for this session
7409 7416
      * @param   int $id Session ID
7410
-     * @return mixed    URL to the admin page to manage the session, or false on error
7417
+     * @return false|string    URL to the admin page to manage the session, or false on error
7411 7418
      */
7412 7419
     public static function getAdminPath($id)
7413 7420
     {
@@ -7424,7 +7431,7 @@  discard block
 block discarded – undo
7424 7431
      * If a course is provided, build the link to the course
7425 7432
      * @param   int $id Session ID
7426 7433
      * @param   int $courseId Course ID (optional) in case the link has to send straight to the course
7427
-     * @return mixed    URL to the page to use the session, or false on error
7434
+     * @return false|string    URL to the page to use the session, or false on error
7428 7435
      */
7429 7436
     public static function getPath($id, $courseId = 0)
7430 7437
     {
@@ -7522,7 +7529,7 @@  discard block
 block discarded – undo
7522 7529
     /**
7523 7530
      * Return true if coach is allowed to access this session
7524 7531
      * @param int $sessionId
7525
-     * @return bool
7532
+     * @return integer
7526 7533
      */
7527 7534
     public static function isSessionDateOkForCoach($sessionId)
7528 7535
     {
Please login to merge, or discard this patch.
main/inc/lib/course_home.lib.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
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
      */
@@ -1210,6 +1210,7 @@  discard block
 block discarded – undo
1210 1210
 
1211 1211
     /**
1212 1212
      * Show a toolbar with shortcuts to the course tool
1213
+     * @param integer $orientation
1213 1214
      */
1214 1215
     public static function show_navigation_tool_shortcuts($orientation = SHORTCUTS_HORIZONTAL)
1215 1216
     {
Please login to merge, or discard this patch.
main/inc/lib/MoodleImport.lib.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
      * Read and validate the quiz module XML
307 307
      *
308 308
      * @param resource $moduleXml XML file
309
-     * @return mixed | array if is a valid xml file, false otherwise
309
+     * @return string | array if is a valid xml file, false otherwise
310 310
      */
311 311
     public function readQuizModule($moduleXml)
312 312
     {
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
     /**
522 522
      * Process Chamilo Unique Answer
523 523
      *
524
-     * @param object $objAnswer
524
+     * @param Answer $objAnswer
525 525
      * @param array $answerValues
526 526
      * @param integer $position
527 527
      * @return integer db response
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
      * Litle utility to delete the unuseful tags
559 559
      *
560 560
      * @param $array
561
-     * @param $keys
561
+     * @param string[] $keys
562 562
      */
563 563
     public function traverseArray(&$array, $keys) {
564 564
         foreach ($array as $key => &$value) {
Please login to merge, or discard this patch.