| @@ -10,9 +10,8 @@ | ||
| 10 | 10 | |
| 11 | 11 | namespace Parsely\RemoteAPI; |
| 12 | 12 | |
| 13 | 13 | use WP_Error; |
| 14 | -use WP_REST_Request; | |
| 15 | 14 | |
| 16 | 15 | /** |
| 17 | 16 | * Remote API Interface. |
| 18 | 17 | */ |
| @@ -20,22 +19,17 @@ | ||
| 20 | 19 | /** |
| 21 | 20 | * Returns the items provided by this interface. |
| 22 | 21 | * |
| 23 | 22 | * @param array<string, mixed> $query The query arguments to send to the remote API. |
| 24 | - * @param bool $associative (optional) When TRUE, returned objects will be converted into | |
| 25 | - * associative arrays. | |
| 26 | - * @return array<string, mixed>|object|WP_Error | |
| 23 | + * @param bool $associative (optional) When TRUE, returned objects will be converted into associative arrays. | |
| 24 | + * | |
| 25 | + * @return WP_Error|array<string, mixed>|false | |
| 27 | 26 | */ |
| 28 | - public function get_items( array $query, bool $associative = false ); | |
| 27 | + public function get_items( $query, $associative = false ); | |
| 29 | 28 | |
| 30 | 29 | /** |
| 31 | - * Returns whether the endpoint is available for access by the current | |
| 32 | - * user. | |
| 30 | + * Checks if the current user is allowed to make the API call. | |
| 33 | 31 | * |
| 34 | - * @since 3.14.0 Renamed from `is_user_allowed_to_make_api_call()`. | |
| 35 | - * @since 3.16.0 Added the `$request` parameter. | |
| 36 | - * | |
| 37 | - * @param WP_REST_Request|null $request The request object. | |
| 38 | 32 | * @return bool |
| 39 | 33 | */ |
| 40 | - public function is_available_to_current_user( $request = null ): bool; | |
| 34 | + public function is_user_allowed_to_make_api_call(): bool; | |
| 41 | 35 | } |