@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | * Only enqueue block assets when needed. |
519 | 519 | * |
520 | 520 | * @param string $type Slug of the block. |
521 | - * @param array $script_dependencies Script dependencies. Will be merged with automatically |
|
521 | + * @param string[] $script_dependencies Script dependencies. Will be merged with automatically |
|
522 | 522 | * detected script dependencies from the webpack build. |
523 | 523 | * |
524 | 524 | * @return void |
@@ -866,10 +866,10 @@ discard block |
||
866 | 866 | * @since 8.3.0 |
867 | 867 | * |
868 | 868 | * @param string $url URL saved as an attribute in block. |
869 | - * @param array $allowed Array of allowed hosts for that block, or regexes to check against. |
|
869 | + * @param string[] $allowed Array of allowed hosts for that block, or regexes to check against. |
|
870 | 870 | * @param bool $is_regex Array of regexes matching the URL that could be used in block. |
871 | 871 | * |
872 | - * @return bool|string |
|
872 | + * @return false|string |
|
873 | 873 | */ |
874 | 874 | public static function validate_block_embed_url( $url, $allowed = array(), $is_regex = false ) { |
875 | 875 | if ( |
@@ -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 ) ); |
@@ -165,6 +165,9 @@ discard block |
||
165 | 165 | return $this->get_atomic_cloud_site_option( 'launch-status' ); |
166 | 166 | } |
167 | 167 | |
168 | + /** |
|
169 | + * @param string $option |
|
170 | + */ |
|
168 | 171 | function get_atomic_cloud_site_option( $option ) { |
169 | 172 | if ( ! jetpack_is_atomic_site() ) { |
170 | 173 | return false; |
@@ -233,6 +236,9 @@ discard block |
||
233 | 236 | return false; |
234 | 237 | } |
235 | 238 | |
239 | + /** |
|
240 | + * @param string $role |
|
241 | + */ |
|
236 | 242 | function current_user_can( $role ) { |
237 | 243 | return current_user_can( $role ); |
238 | 244 | } |
@@ -1264,7 +1264,6 @@ |
||
1264 | 1264 | * |
1265 | 1265 | * @since 4.3.0 |
1266 | 1266 | * |
1267 | - * @param WP_REST_Request $request The request sent to the WP REST API. |
|
1268 | 1267 | * |
1269 | 1268 | * @return object |
1270 | 1269 | */ |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * |
46 | 46 | * @param array $allowed_post_types Allowed post types. |
47 | 47 | * |
48 | - * @return array |
|
48 | + * @return string[] |
|
49 | 49 | */ |
50 | 50 | public function allow_bbpress_post_types( $allowed_post_types ) { |
51 | 51 | $allowed_post_types[] = 'forum'; |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * |
60 | 60 | * @param array $allowed_meta_keys Allowed meta keys. |
61 | 61 | * |
62 | - * @return array |
|
62 | + * @return string[] |
|
63 | 63 | */ |
64 | 64 | public function allow_bbpress_public_metadata( $allowed_meta_keys ) { |
65 | 65 | $allowed_meta_keys[] = '_bbp_forum_id'; |
@@ -410,7 +410,7 @@ |
||
410 | 410 | * |
411 | 411 | * @param Mixed $needle the needle. |
412 | 412 | * @param array $haystack the haystack. |
413 | - * @return is the needle not in the haystack? |
|
413 | + * @return boolean the needle not in the haystack? |
|
414 | 414 | */ |
415 | 415 | protected function negative_in_array( $needle, $haystack ) { |
416 | 416 | if ( in_array( $needle, $haystack, true ) ) { |
@@ -348,6 +348,9 @@ discard block |
||
348 | 348 | return call_user_func_array( array( $endpoint, 'callback' ), $path_pieces ); |
349 | 349 | } |
350 | 350 | |
351 | + /** |
|
352 | + * @param integer $status_code |
|
353 | + */ |
|
351 | 354 | function output_early( $status_code, $response = null, $content_type = 'application/json' ) { |
352 | 355 | $exit = $this->exit; |
353 | 356 | $this->exit = false; |
@@ -571,11 +574,18 @@ discard block |
||
571 | 574 | return wp_json_encode( $data ); |
572 | 575 | } |
573 | 576 | |
577 | + /** |
|
578 | + * @param string $needle |
|
579 | + */ |
|
574 | 580 | function ends_with( $haystack, $needle ) { |
575 | 581 | return $needle === substr( $haystack, -strlen( $needle ) ); |
576 | 582 | } |
577 | 583 | |
578 | 584 | // Returns the site's blog_id in the WP.com ecosystem |
585 | + |
|
586 | + /** |
|
587 | + * @return integer |
|
588 | + */ |
|
579 | 589 | function get_blog_id_for_output() { |
580 | 590 | return $this->token_details['blog_id']; |
581 | 591 | } |
@@ -598,6 +608,10 @@ discard block |
||
598 | 608 | } |
599 | 609 | |
600 | 610 | // Returns true if the specified blog ID is a restricted blog |
611 | + |
|
612 | + /** |
|
613 | + * @param integer $blog_id |
|
614 | + */ |
|
601 | 615 | function is_restricted_blog( $blog_id ) { |
602 | 616 | /** |
603 | 617 | * Filters all REST API access and return a 403 unauthorized response for all Restricted blog IDs. |
@@ -647,7 +661,7 @@ discard block |
||
647 | 661 | /** |
648 | 662 | * Counts the number of comments on a site, excluding certain comment types. |
649 | 663 | * |
650 | - * @param $post_id int Post ID. |
|
664 | + * @param integer $post_id int Post ID. |
|
651 | 665 | * @return array Array of counts, matching the output of https://developer.wordpress.org/reference/functions/get_comment_count/. |
652 | 666 | */ |
653 | 667 | public function wp_count_comments( $post_id ) { |
@@ -297,7 +297,7 @@ |
||
297 | 297 | * Returns a download URL, dealing with Google's long file names. |
298 | 298 | * |
299 | 299 | * @param array $guid Media information. |
300 | - * @return string|\WP_Error |
|
300 | + * @return string |
|
301 | 301 | */ |
302 | 302 | public function get_download_url( $guid ) { |
303 | 303 | $this->tmp_name = $guid['name']; |
@@ -143,7 +143,7 @@ |
||
143 | 143 | /** |
144 | 144 | * |
145 | 145 | * Return Whether boolean cached threats exist or null if the state is unknown. |
146 | - * * @return boolean or null |
|
146 | + * * @return null|boolean or null |
|
147 | 147 | */ |
148 | 148 | public function has_threats() { |
149 | 149 | $scan_state = get_transient( 'jetpack_scan_state' ); |