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 | * Flag used to avoid determine_current_user filter to enter an infinite loop |
||
41 | * |
||
42 | * @since 9.7.0 |
||
43 | * @var boolean |
||
44 | */ |
||
45 | private $doing_determine_current_user_filter = false; |
||
46 | |||
47 | /** |
||
48 | * The constructor. |
||
49 | */ |
||
50 | private function __construct() { |
||
53 | |||
54 | /** |
||
55 | * Controls the single instance of this class. |
||
56 | * |
||
57 | * @static |
||
58 | */ |
||
59 | public static function init() { |
||
69 | |||
70 | /** |
||
71 | * Authenticates requests from Jetpack server to WP REST API endpoints. |
||
72 | * Uses the existing XMLRPC request signing implementation. |
||
73 | * |
||
74 | * @param int|bool $user User ID if one has been determined, false otherwise. |
||
75 | * |
||
76 | * @return int|null The user id or null if the request was not authenticated. |
||
77 | */ |
||
78 | public function wp_rest_authenticate( $user ) { |
||
164 | |||
165 | /** |
||
166 | * Report authentication status to the WP REST API. |
||
167 | * |
||
168 | * @param WP_Error|mixed $value Error from another authentication handler, null if we should handle it, or another value if not. |
||
169 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
||
170 | */ |
||
171 | public function wp_rest_authentication_errors( $value ) { |
||
177 | |||
178 | /** |
||
179 | * Resets the saved authentication state in between testing requests. |
||
180 | */ |
||
181 | public function reset_saved_auth_state() { |
||
185 | } |
||
186 |
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..