1 | <?php |
||
13 | class Rest_Authentication { |
||
14 | |||
15 | /** |
||
16 | * The rest authentication status. |
||
17 | * |
||
18 | * @since 8.9.0 |
||
19 | * @var boolean |
||
20 | */ |
||
21 | private $rest_authentication_status = null; |
||
22 | |||
23 | /** |
||
24 | * The Manager object. |
||
25 | * |
||
26 | * @since 8.9.0 |
||
27 | * @var Object |
||
28 | */ |
||
29 | private $connection_manager = null; |
||
30 | |||
31 | /** |
||
32 | * Holds the singleton instance of this class |
||
33 | * |
||
34 | * @since 8.9.0 |
||
35 | * @var Object |
||
36 | */ |
||
37 | private static $instance = false; |
||
38 | |||
39 | /** |
||
40 | * The constructor. |
||
41 | */ |
||
42 | private function __construct() { |
||
45 | |||
46 | /** |
||
47 | * Controls the single instance of this class. |
||
48 | * |
||
49 | * @static |
||
50 | */ |
||
51 | public static function init() { |
||
61 | |||
62 | /** |
||
63 | * Authenticates requests from Jetpack server to WP REST API endpoints. |
||
64 | * Uses the existing XMLRPC request signing implementation. |
||
65 | * |
||
66 | * @param int|bool $user User ID if one has been determined, false otherwise. |
||
67 | * |
||
68 | * @return int|null The user id or null if the request was not authenticated. |
||
69 | */ |
||
70 | public function wp_rest_authenticate( $user ) { |
||
139 | |||
140 | /** |
||
141 | * Report authentication status to the WP REST API. |
||
142 | * |
||
143 | * @param WP_Error|mixed $value Error from another authentication handler, null if we should handle it, or another value if not. |
||
144 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
||
145 | */ |
||
146 | public function wp_rest_authentication_errors( $value ) { |
||
152 | |||
153 | /** |
||
154 | * Resets the saved authentication state in between testing requests. |
||
155 | */ |
||
156 | public function reset_saved_auth_state() { |
||
160 | } |
||
161 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..