@@ -249,6 +249,9 @@ |
||
249 | 249 | } |
250 | 250 | } |
251 | 251 | |
252 | + /** |
|
253 | + * @param string $access_token |
|
254 | + */ |
|
252 | 255 | private static function verify_token( $access_token ) { |
253 | 256 | $request = array( |
254 | 257 | 'headers' => array( |
@@ -199,7 +199,7 @@ |
||
199 | 199 | * @param string $type Test type, async or direct. Optional, direct all tests. |
200 | 200 | * @param string $group Testing group to check status of. Optional, default all tests. |
201 | 201 | * |
202 | - * @return true|array True if all tests pass. Array of failed tests. |
|
202 | + * @return boolean True if all tests pass. Array of failed tests. |
|
203 | 203 | */ |
204 | 204 | public function pass( $type = 'all', $group = 'all' ) { |
205 | 205 | $results = $this->raw_results( $type, $group ); |
@@ -1540,6 +1540,7 @@ discard block |
||
1540 | 1540 | * timezone set in the options table for the blog or the GMT offset. |
1541 | 1541 | * |
1542 | 1542 | * @param datetime string $date_string Date to parse. |
1543 | + * @param string $date_string |
|
1543 | 1544 | * |
1544 | 1545 | * @return array( $local_time_string, $gmt_time_string ) |
1545 | 1546 | */ |
@@ -1649,6 +1650,10 @@ discard block |
||
1649 | 1650 | do_action( 'restapi_theme_init' ); |
1650 | 1651 | } |
1651 | 1652 | |
1653 | + /** |
|
1654 | + * @param string $from_hook |
|
1655 | + * @param string $to_hook |
|
1656 | + */ |
|
1652 | 1657 | function copy_hooks( $from_hook, $to_hook, $base_paths ) { |
1653 | 1658 | global $wp_filter; |
1654 | 1659 | foreach ( $wp_filter as $hook => $actions ) { |
@@ -2073,7 +2078,7 @@ discard block |
||
2073 | 2078 | * Get an array of all valid AMP origins for a blog's siteurl. |
2074 | 2079 | * |
2075 | 2080 | * @param string $siteurl Origin url of the API request. |
2076 | - * @return array |
|
2081 | + * @return string[] |
|
2077 | 2082 | */ |
2078 | 2083 | public function get_amp_cache_origins( $siteurl ) { |
2079 | 2084 | $host = parse_url( $siteurl, PHP_URL_HOST ); |
@@ -58,7 +58,7 @@ |
||
58 | 58 | * Loads an RSS feed using `fetch_feed`. |
59 | 59 | * |
60 | 60 | * @param string $feed The RSS feed URL to load. |
61 | - * @return SimplePie|WP_Error The RSS object or error. |
|
61 | + * @return string The RSS object or error. |
|
62 | 62 | */ |
63 | 63 | private static function load_feed( $feed ) { |
64 | 64 | $rss = fetch_feed( esc_url_raw( $feed ) ); |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | * Get Stats Options. |
291 | 291 | * |
292 | 292 | * @access public |
293 | - * @param mixed $option Option. |
|
293 | + * @param string $option Option. |
|
294 | 294 | * @return mixed|null. |
295 | 295 | */ |
296 | 296 | function stats_get_option( $option ) { |
@@ -744,7 +744,7 @@ discard block |
||
744 | 744 | * Stats Convert Chart URLs. |
745 | 745 | * |
746 | 746 | * @access public |
747 | - * @param mixed $html HTML. |
|
747 | + * @param string $html HTML. |
|
748 | 748 | * @return string |
749 | 749 | */ |
750 | 750 | function stats_convert_chart_urls( $html ) { |
@@ -1414,7 +1414,7 @@ discard block |
||
1414 | 1414 | * |
1415 | 1415 | * @access public |
1416 | 1416 | * @param mixed $get Get. |
1417 | - * @param mixed $url URL. |
|
1417 | + * @param string $url URL. |
|
1418 | 1418 | * @return void |
1419 | 1419 | */ |
1420 | 1420 | function stats_print_wp_remote_error( $get, $url ) { |
@@ -1556,7 +1556,7 @@ discard block |
||
1556 | 1556 | * Stats get remote CSV. |
1557 | 1557 | * |
1558 | 1558 | * @access public |
1559 | - * @param mixed $url URL. |
|
1559 | + * @param string $url URL. |
|
1560 | 1560 | * @return array |
1561 | 1561 | */ |
1562 | 1562 | function stats_get_remote_csv( $url ) { |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | /** |
314 | 314 | * Verifies the signature of the current request. |
315 | 315 | * |
316 | - * @return false|array |
|
316 | + * @return boolean |
|
317 | 317 | */ |
318 | 318 | public function verify_xml_rpc_signature() { |
319 | 319 | if ( is_null( $this->xmlrpc_verification ) ) { |
@@ -1286,6 +1286,7 @@ discard block |
||
1286 | 1286 | * @param String $action The action name. |
1287 | 1287 | * @param Integer $user_id The user identifier. |
1288 | 1288 | * @param Integer $exp Expiration time in seconds. |
1289 | + * @return string |
|
1289 | 1290 | */ |
1290 | 1291 | public function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
1291 | 1292 | if ( false === $user_id ) { |
@@ -2242,7 +2243,7 @@ discard block |
||
2242 | 2243 | * |
2243 | 2244 | * @param int|false $user_id false: Return the Blog Token. int: Return that user's User Token. |
2244 | 2245 | * @param string|false $token_key If provided, check that the token matches the provided input. |
2245 | - * @param bool|true $suppress_errors If true, return a falsy value when the token isn't found; When false, return a descriptive WP_Error when the token isn't found. |
|
2246 | + * @param boolean $suppress_errors If true, return a falsy value when the token isn't found; When false, return a descriptive WP_Error when the token isn't found. |
|
2246 | 2247 | * |
2247 | 2248 | * @return object|false |
2248 | 2249 | */ |
@@ -2626,7 +2627,7 @@ discard block |
||
2626 | 2627 | * Fetches a signed token. |
2627 | 2628 | * |
2628 | 2629 | * @param object $token the token. |
2629 | - * @return WP_Error|string a signed token |
|
2630 | + * @return string a signed token |
|
2630 | 2631 | */ |
2631 | 2632 | public function get_signed_token( $token ) { |
2632 | 2633 | if ( ! isset( $token->secret ) || empty( $token->secret ) ) { |
@@ -220,7 +220,7 @@ |
||
220 | 220 | * Also used by @see self::test_request_port_constants |
221 | 221 | * |
222 | 222 | * @param mixed $http_x_forwarded_port value of $_SERVER[ 'HTTP_X_FORWARDED_PORT' ]. |
223 | - * @param mixed $server_port value of $_SERVER[ 'SERVER_PORT' ]. Null will unset the value. |
|
223 | + * @param string $server_port value of $_SERVER[ 'SERVER_PORT' ]. Null will unset the value. |
|
224 | 224 | * @param string $expeceted The expected output. Null will unset the value. |
225 | 225 | * @param boolean $ssl Whether to consider current request using SSL or not. |
226 | 226 | * |
@@ -228,7 +228,7 @@ |
||
228 | 228 | * |
229 | 229 | * @param string $notify_moderator The value of the moderation_notify option. |
230 | 230 | * @param int $comment_id Comment ID. |
231 | - * @return boolean Returns false to shortcircuit the execution of wp_notify_moderator |
|
231 | + * @return string|false Returns false to shortcircuit the execution of wp_notify_moderator |
|
232 | 232 | */ |
233 | 233 | function jetpack_notify_moderator( $notify_moderator, $comment_id ) { |
234 | 234 |
@@ -294,7 +294,7 @@ |
||
294 | 294 | /** |
295 | 295 | * Mock $wpdb->get_var() and make it return a certain value. |
296 | 296 | * |
297 | - * @param mixed $return_value Return value of the function. |
|
297 | + * @param integer $return_value Return value of the function. |
|
298 | 298 | * |
299 | 299 | * PHPUnit\Framework\MockObject\MockObject The mock object. |
300 | 300 | */ |