@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | /** |
127 | 127 | * This method returns an error message set by PGTStorage::setErrorMessage(). |
128 | 128 | * |
129 | - * @return an error message when set by PGTStorage::setErrorMessage(), FALSE |
|
129 | + * @return boolean error message when set by PGTStorage::setErrorMessage(), FALSE |
|
130 | 130 | * otherwise. |
131 | 131 | * |
132 | 132 | * @public |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | /** |
154 | 154 | * This method tells if the storage has already been intialized. |
155 | 155 | * |
156 | - * @return a boolean |
|
156 | + * @return boolean boolean |
|
157 | 157 | * |
158 | 158 | * @protected |
159 | 159 | */ |
@@ -33,6 +33,7 @@ discard block |
||
33 | 33 | * render to courses_list view |
34 | 34 | * @param string action |
35 | 35 | * @param string confirmation message(optional) |
36 | + * @param string $action |
|
36 | 37 | */ |
37 | 38 | public function courses_list($action, $message = '') |
38 | 39 | { |
@@ -79,7 +80,7 @@ discard block |
||
79 | 80 | /** |
80 | 81 | * It's used for listing courses with categories, |
81 | 82 | * render to courses_categories view |
82 | - * @param $action |
|
83 | + * @param string $action |
|
83 | 84 | * @param string $category_code |
84 | 85 | * @param string $message |
85 | 86 | * @param string $error |
@@ -62,6 +62,7 @@ discard block |
||
62 | 62 | * @param string $accessToken |
63 | 63 | * @param int $expiresAt |
64 | 64 | * @param string|null machineId |
65 | + * @param string $machineId |
|
65 | 66 | */ |
66 | 67 | public function __construct($accessToken, $expiresAt = 0, $machineId = null) |
67 | 68 | { |
@@ -97,7 +98,7 @@ discard block |
||
97 | 98 | /** |
98 | 99 | * Getter for machineId. |
99 | 100 | * |
100 | - * @return string|null |
|
101 | + * @return string |
|
101 | 102 | */ |
102 | 103 | public function getMachineId() |
103 | 104 | { |
@@ -191,11 +192,11 @@ discard block |
||
191 | 192 | /** |
192 | 193 | * Get a valid code from an access token. |
193 | 194 | * |
194 | - * @param AccessToken|string $accessToken |
|
195 | + * @param AccessToken $accessToken |
|
195 | 196 | * @param string|null $appId |
196 | 197 | * @param string|null $appSecret |
197 | 198 | * |
198 | - * @return AccessToken |
|
199 | + * @return string |
|
199 | 200 | */ |
200 | 201 | public static function getCodeFromAccessToken($accessToken, $appId = null, $appSecret = null) |
201 | 202 | { |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | /** |
64 | 64 | * Returns the raw signed request data. |
65 | 65 | * |
66 | - * @return string|null |
|
66 | + * @return string |
|
67 | 67 | */ |
68 | 68 | public function getRawSignedRequest() |
69 | 69 | { |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | * Returns a property from the signed request data if available. |
85 | 85 | * |
86 | 86 | * @param string $key |
87 | - * @param mixed|null $default |
|
87 | + * @param integer $default |
|
88 | 88 | * |
89 | 89 | * @return mixed|null |
90 | 90 | */ |
@@ -148,7 +148,7 @@ |
||
148 | 148 | * - language |
149 | 149 | * - courses : string of all courses code separated by '|' |
150 | 150 | * - admin : boolean |
151 | - * @return boolean |
|
151 | + * @return boolean|null |
|
152 | 152 | * @author ndiechburg <[email protected]> |
153 | 153 | * */ |
154 | 154 | function external_update_user($new_user) { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | /** |
29 | 29 | * Establishes a connection to the LDAP server and sets the protocol version |
30 | 30 | * |
31 | - * @return resource ldap link identifier or false |
|
31 | + * @return boolean ldap link identifier or false |
|
32 | 32 | * @author ndiechburg <[email protected]> |
33 | 33 | * */ |
34 | 34 | function extldap_connect() |
@@ -77,6 +77,7 @@ discard block |
||
77 | 77 | /** |
78 | 78 | * Authenticate user on external ldap server and return user ldap entry if that succeeds |
79 | 79 | * |
80 | + * @param string $password |
|
80 | 81 | * @return mixed false if user cannot authenticate on ldap, user ldap entry if tha succeeds |
81 | 82 | * @author ndiechburg <[email protected]> |
82 | 83 | * Modified by [email protected] |
@@ -237,7 +238,7 @@ discard block |
||
237 | 238 | |
238 | 239 | /** |
239 | 240 | * Imports all LDAP users into Chamilo |
240 | - * @return bool false on error, true otherwise |
|
241 | + * @return false|null false on error, true otherwise |
|
241 | 242 | */ |
242 | 243 | function extldap_import_all_users() |
243 | 244 | { |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | require 'ldap_var.inc.php'; |
68 | 68 | /** |
69 | 69 | * Check login and password with LDAP |
70 | - * @return true when login & password both OK, false otherwise |
|
70 | + * @return boolean when login & password both OK, false otherwise |
|
71 | 71 | * @author Roan Embrechts (based on code from Universit� Jean Monet) |
72 | 72 | */ |
73 | 73 | |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | } // end of check |
306 | 306 | /** |
307 | 307 | * Set the protocol version with version from config file (enables LDAP version 3) |
308 | - * @param resource The LDAP connexion resource, passed by reference. |
|
308 | + * @param resource resource LDAP connexion resource, passed by reference. |
|
309 | 309 | * @return void |
310 | 310 | */ |
311 | 311 | function ldap_set_version(&$resource) { |
@@ -323,6 +323,7 @@ discard block |
||
323 | 323 | * Handle bind (whether authenticated or not) |
324 | 324 | * @param resource The LDAP handler to which we are connecting (by reference) |
325 | 325 | * @param resource The LDAP bind handler we will be modifying |
326 | + * @param boolean $ldap_bind |
|
326 | 327 | * @return boolean Status of the bind assignment. True for success, false for failure. |
327 | 328 | */ |
328 | 329 | function ldap_handle_bind(&$ldap_handler,&$ldap_bind) { |
@@ -337,6 +337,7 @@ |
||
337 | 337 | |
338 | 338 | /** |
339 | 339 | * Make a HTTP request - This function has been copied straight over from Drupal 6 code (drupal_http_request) |
340 | + * @param string $data |
|
340 | 341 | */ |
341 | 342 | function openid_http_request($url, $headers = array(), $method = 'GET', $data = NULL, $retry = 3) { |
342 | 343 | $result = new stdClass(); |
@@ -121,6 +121,7 @@ discard block |
||
121 | 121 | |
122 | 122 | /** |
123 | 123 | * Encode a message from _openid_create_message for HTTP Post |
124 | + * @param null|string $message |
|
124 | 125 | */ |
125 | 126 | function _openid_encode_message($message) { |
126 | 127 | $encoded_message = ''; |
@@ -173,6 +174,7 @@ discard block |
||
173 | 174 | |
174 | 175 | /** |
175 | 176 | * Pull the href attribute out of an html link element. |
177 | + * @param string $rel |
|
176 | 178 | */ |
177 | 179 | function _openid_link_href($rel, $html) { |
178 | 180 | $rel = preg_quote($rel); |
@@ -186,6 +188,7 @@ discard block |
||
186 | 188 | |
187 | 189 | /** |
188 | 190 | * Pull the http-equiv attribute out of an html meta element |
191 | + * @param string $equiv |
|
189 | 192 | */ |
190 | 193 | function _openid_meta_httpequiv($equiv, $html) { |
191 | 194 | preg_match('|<meta\s+http-equiv=["\']' . $equiv . '["\'](.*)/?>|iU', $html, $matches); |
@@ -221,6 +224,10 @@ discard block |
||
221 | 224 | return base64_encode($signature); |
222 | 225 | } |
223 | 226 | |
227 | +/** |
|
228 | + * @param string $key |
|
229 | + * @param null|string $text |
|
230 | + */ |
|
224 | 231 | function _openid_hmac($key, $text) { |
225 | 232 | if (strlen($key) > OPENID_SHA1_BLOCKSIZE) { |
226 | 233 | $key = _openid_sha1($key, true); |
@@ -256,6 +263,9 @@ discard block |
||
256 | 263 | return base64_encode(_openid_dh_long_to_binary($str)); |
257 | 264 | } |
258 | 265 | |
266 | +/** |
|
267 | + * @param string $str |
|
268 | + */ |
|
259 | 269 | function _openid_dh_binary_to_long($str) { |
260 | 270 | $bytes = array_merge(unpack('C*', $str)); |
261 | 271 | |
@@ -297,6 +307,9 @@ discard block |
||
297 | 307 | return $string; |
298 | 308 | } |
299 | 309 | |
310 | +/** |
|
311 | + * @param string $secret |
|
312 | + */ |
|
300 | 313 | function _openid_dh_xorsecret($shared, $secret) { |
301 | 314 | $dh_shared_str = _openid_dh_long_to_binary($shared); |
302 | 315 | $sha1_dh_shared = _openid_sha1($dh_shared_str); |
@@ -308,6 +321,9 @@ discard block |
||
308 | 321 | return $xsecret; |
309 | 322 | } |
310 | 323 | |
324 | +/** |
|
325 | + * @param string $stop |
|
326 | + */ |
|
311 | 327 | function _openid_dh_rand($stop) { |
312 | 328 | static $duplicate_cache = array(); |
313 | 329 |