@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | * @param int $user_id The user id. |
| 220 | 220 | * @param string $token The user token. |
| 221 | 221 | * @param bool $is_master_user Whether the user is the master user. |
| 222 | - * @return bool |
|
| 222 | + * @return boolean|null |
|
| 223 | 223 | */ |
| 224 | 224 | public function update_user_token( $user_id, $token, $is_master_user ) { |
| 225 | 225 | // Not designed for concurrent updates. |
@@ -495,7 +495,7 @@ discard block |
||
| 495 | 495 | * Fetches a signed token. |
| 496 | 496 | * |
| 497 | 497 | * @param object $token the token. |
| 498 | - * @return WP_Error|string a signed token |
|
| 498 | + * @return string a signed token |
|
| 499 | 499 | */ |
| 500 | 500 | public function get_signed_token( $token ) { |
| 501 | 501 | if ( ! isset( $token->secret ) || empty( $token->secret ) ) { |
@@ -250,6 +250,9 @@ |
||
| 250 | 250 | } |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | + /** |
|
| 254 | + * @param string $capability |
|
| 255 | + */ |
|
| 253 | 256 | protected function current_user_can( $capability, $plugin = null ) { |
| 254 | 257 | // If this endpoint accepts site based authentication and a blog token is used, skip capabilities check. |
| 255 | 258 | if ( $this->accepts_site_based_authentication() ) { |