@@ -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 | |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * |
| 20 | - * @return ShibbolethData |
|
| 20 | + * @return ShibbolethStore |
|
| 21 | 21 | */ |
| 22 | 22 | public static function instance() |
| 23 | 23 | { |
@@ -56,6 +56,9 @@ |
||
| 56 | 56 | return $this->get(array('shibb_unique_id' => $id)); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | + /** |
|
| 60 | + * @param string $id |
|
| 61 | + */ |
|
| 59 | 62 | public function shibboleth_id_exists($id) |
| 60 | 63 | { |
| 61 | 64 | return $this->exist(array('shibb_unique_id' => $id)); |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | |
| 129 | 129 | /** |
| 130 | 130 | * |
| 131 | - * @param ShibbolethUser $user |
|
| 131 | + * @param ShibbolethUser $shibb_user |
|
| 132 | 132 | */ |
| 133 | 133 | public static function save($shibb_user) |
| 134 | 134 | { |
@@ -230,6 +230,7 @@ discard block |
||
| 230 | 230 | * Sends an email to the Chamilo and Shibboleth administrators in the name |
| 231 | 231 | * of the logged-in user. |
| 232 | 232 | * |
| 233 | + * @param string $subject |
|
| 233 | 234 | */ |
| 234 | 235 | public static function email_admin($subject, $message) |
| 235 | 236 | { |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | * Creates the 'shibb_unique_id' field in the table 'user' of the main Chamilo database if it doesn't exist yet |
| 36 | 36 | * |
| 37 | 37 | * @author Nicolas Rod |
| 38 | - * @return void |
|
| 38 | + * @return false|null |
|
| 39 | 39 | */ |
| 40 | 40 | public static function create_shibb_unique_id_field_if_missing() |
| 41 | 41 | { |
@@ -346,6 +346,9 @@ |
||
| 346 | 346 | return $result; |
| 347 | 347 | } |
| 348 | 348 | |
| 349 | + /** |
|
| 350 | + * @param string $sql |
|
| 351 | + */ |
|
| 349 | 352 | protected function execute($sql) |
| 350 | 353 | { |
| 351 | 354 | return Database::query($sql, null, __FILE__); |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | |
| 91 | 91 | /** |
| 92 | 92 | * Validates the received active connection data with the database |
| 93 | - * @return bool Return the loginFailed variable value to local.inc.php |
|
| 93 | + * @return null|false Return the loginFailed variable value to local.inc.php |
|
| 94 | 94 | */ |
| 95 | 95 | public function check_user() |
| 96 | 96 | { |
@@ -327,6 +327,7 @@ discard block |
||
| 327 | 327 | |
| 328 | 328 | /** |
| 329 | 329 | * Serialize the course with the best serializer available |
| 330 | + * @return string |
|
| 330 | 331 | */ |
| 331 | 332 | public static function serialize($course) |
| 332 | 333 | { |
@@ -339,6 +340,7 @@ discard block |
||
| 339 | 340 | |
| 340 | 341 | /** |
| 341 | 342 | * Unserialize the course with the best serializer available |
| 343 | + * @param string $course |
|
| 342 | 344 | */ |
| 343 | 345 | public static function unserialize($course) |
| 344 | 346 | { |
@@ -173,7 +173,7 @@ |
||
| 173 | 173 | |
| 174 | 174 | /** |
| 175 | 175 | * @param array $file |
| 176 | - * @return bool|string |
|
| 176 | + * @return string|false |
|
| 177 | 177 | */ |
| 178 | 178 | public static function import_uploaded_file($file) |
| 179 | 179 | { |