@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | |
119 | 119 | /** |
120 | 120 | * This function retrieves the existing permissions of a user, group or role. |
121 | -* @param $content are we retrieving the rights of a user, a group or a role (the database depends on it) |
|
121 | +* @param string $content are we retrieving the rights of a user, a group or a role (the database depends on it) |
|
122 | 122 | * @param $id the id of the user, group or role |
123 | 123 | * @author Patrick Cool <[email protected]>, Ghent University |
124 | 124 | * @version 1.0 |
@@ -526,7 +526,7 @@ discard block |
||
526 | 526 | |
527 | 527 | /** |
528 | 528 | * This function gets all the roles that are defined |
529 | -* @param $content are we finding the roles for a user or a group (the database depends on it) |
|
529 | +* @param string $content are we finding the roles for a user or a group (the database depends on it) |
|
530 | 530 | * @param $id the id of the user or group |
531 | 531 | * @param string Deprecated parameter allowing use of 'platform' scope - the corresponding tables don't exist anymore so the scope is always set to 'course' |
532 | 532 | * @return array that contains the name of the roles the user has |
@@ -735,7 +735,6 @@ |
||
735 | 735 | * lock = the user can no longer use this account |
736 | 736 | * @author Patrick Cool <[email protected]>, Ghent University |
737 | 737 | * @param int $active the current state of the account |
738 | - * @param int $user_id The user id |
|
739 | 738 | * @param string $urlParams |
740 | 739 | * |
741 | 740 | * @return string Some HTML-code with the lock/unlock button |
@@ -84,7 +84,7 @@ |
||
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |
87 | - * @param $directoryPath |
|
87 | + * @param string $directoryPath |
|
88 | 88 | * @return bool |
89 | 89 | */ |
90 | 90 | function deleteDirectory($directoryPath) |
@@ -204,6 +204,9 @@ |
||
204 | 204 | |
205 | 205 | } |
206 | 206 | |
207 | + /** |
|
208 | + * @param integer $user_id |
|
209 | + */ |
|
207 | 210 | protected function set_message_as_read($user_id, $message_id){ |
208 | 211 | $table_message = Database::get_main_table(TABLE_MESSAGE); |
209 | 212 | $query = "UPDATE $table_message SET msg_status = '".MESSAGE_STATUS_NEW."' WHERE user_receiver_id=".$user_id." AND id='".$message_id."';"; |
@@ -137,7 +137,7 @@ |
||
137 | 137 | /** |
138 | 138 | * Get a list of users of which the given conditions match with a LIKE '%cond%' |
139 | 139 | * @param array $conditions a list of condition (exemple : status=>STUDENT) |
140 | - * @param array $order_by a list of fields on which sort |
|
140 | + * @param string[] $order_by a list of fields on which sort |
|
141 | 141 | * @return array An array with all users of the platform. |
142 | 142 | * @todo optional course code parameter, optional sorting parameters... |
143 | 143 | *@todo Use the UserManager class |
@@ -20,6 +20,9 @@ |
||
20 | 20 | |
21 | 21 | define('WS_ERROR_SECRET_KEY', 1); |
22 | 22 | |
23 | +/** |
|
24 | + * @param integer $code |
|
25 | + */ |
|
23 | 26 | function return_error($code) { |
24 | 27 | $fault = null; |
25 | 28 | switch ($code) { |
@@ -2617,6 +2617,9 @@ |
||
2617 | 2617 | ) |
2618 | 2618 | ); |
2619 | 2619 | |
2620 | +/** |
|
2621 | + * @param string $type |
|
2622 | + */ |
|
2620 | 2623 | function WSHelperActionOnUsers($params, $type) { |
2621 | 2624 | if(!WSHelperVerifyKey($params)) { |
2622 | 2625 | return returnError(WS_ERROR_SECRET_KEY); |
@@ -37,6 +37,8 @@ discard block |
||
37 | 37 | * |
38 | 38 | * @param int Error code |
39 | 39 | * @param string Error message |
40 | + * @param integer $code |
|
41 | + * @param string $message |
|
40 | 42 | */ |
41 | 43 | public function __construct($code, $message) { |
42 | 44 | $this->code = $code; |
@@ -47,6 +49,7 @@ discard block |
||
47 | 49 | * Sets the error handler |
48 | 50 | * |
49 | 51 | * @param WSErrorHandler Error handler |
52 | + * @param WSSoapErrorHandler $handler |
|
50 | 53 | */ |
51 | 54 | public static function setErrorHandler($handler) { |
52 | 55 | if($handler instanceof WSErrorHandler) { |
@@ -81,6 +84,7 @@ discard block |
||
81 | 84 | * Handle method |
82 | 85 | * |
83 | 86 | * @param WSError Error |
87 | + * @return void |
|
84 | 88 | */ |
85 | 89 | public function handle($error); |
86 | 90 | } |
@@ -107,7 +111,7 @@ discard block |
||
107 | 111 | * Verifies the API key |
108 | 112 | * |
109 | 113 | * @param string Secret key |
110 | - * @return mixed WSError in case of failure, null in case of success |
|
114 | + * @return WSError|null WSError in case of failure, null in case of success |
|
111 | 115 | */ |
112 | 116 | protected function verifyKey($secret_key) { |
113 | 117 | $ip = trim($_SERVER['REMOTE_ADDR']); |
@@ -453,6 +453,7 @@ |
||
453 | 453 | * @param string Session id field name |
454 | 454 | * @param string Session id value |
455 | 455 | * @param int State (1 to subscribe, 0 to unsubscribe) |
456 | + * @param integer $state |
|
456 | 457 | * @return mixed True on success, WSError otherwise |
457 | 458 | */ |
458 | 459 | protected function changeCourseSubscription($course_id_field_name, $course_id_value, $session_id_field_name, $session_id_value, $state) { |