@@ -129,7 +129,7 @@ |
||
| 129 | 129 | * |
| 130 | 130 | * @param string $group Testing group to check status of. Optional, default all tests. |
| 131 | 131 | * |
| 132 | - * @return true|array True if all tests pass. Array of failed tests. |
|
| 132 | + * @return boolean True if all tests pass. Array of failed tests. |
|
| 133 | 133 | */ |
| 134 | 134 | public function pass( $group = 'default' ) { |
| 135 | 135 | $results = $this->raw_results( $group ); |
@@ -363,7 +363,7 @@ |
||
| 363 | 363 | * Only enqueue block assets when needed. |
| 364 | 364 | * |
| 365 | 365 | * @param string $type slug of the block. |
| 366 | - * @param array $script_dependencies An array of view-side Javascript dependencies to be enqueued. |
|
| 366 | + * @param string[] $script_dependencies An array of view-side Javascript dependencies to be enqueued. |
|
| 367 | 367 | * |
| 368 | 368 | * @return void |
| 369 | 369 | */ |
@@ -415,7 +415,7 @@ |
||
| 415 | 415 | * |
| 416 | 416 | * @param array $connections_data |
| 417 | 417 | * |
| 418 | - * @return array { |
|
| 418 | + * @return string { |
|
| 419 | 419 | * Array of content for generating connection form. |
| 420 | 420 | * |
| 421 | 421 | * @type string HTML content of form |
@@ -213,7 +213,6 @@ discard block |
||
| 213 | 213 | /** |
| 214 | 214 | * Inject image sizes to Jetpack REST API responses. This wraps the filter_photon_norezise_maybe_inject_sizes function. |
| 215 | 215 | * |
| 216 | - * @param array $data Attachment sizes data. |
|
| 217 | 216 | * @param int $attachment_id Attachment's post ID. |
| 218 | 217 | * |
| 219 | 218 | * @return array Attachment sizes array. |
@@ -1257,7 +1256,7 @@ discard block |
||
| 1257 | 1256 | * after ourselves without breaking anyone else's filters. |
| 1258 | 1257 | * |
| 1259 | 1258 | * @internal |
| 1260 | - * @return true |
|
| 1259 | + * @return boolean |
|
| 1261 | 1260 | */ |
| 1262 | 1261 | public function _override_image_downsize_in_rest_edit_context() { |
| 1263 | 1262 | return true; |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | /** |
| 53 | 53 | * Helper function to look up the expected master user and return the local WP_User. |
| 54 | 54 | * |
| 55 | - * @return WP_User Jetpack's expected master user. |
|
| 55 | + * @return string Jetpack's expected master user. |
|
| 56 | 56 | */ |
| 57 | 57 | protected function helper_retrieve_local_master_user() { |
| 58 | 58 | $master_user = Jetpack_Options::get_option( 'master_user' ); |
@@ -321,6 +321,9 @@ discard block |
||
| 321 | 321 | return $sync_modules; |
| 322 | 322 | } |
| 323 | 323 | |
| 324 | + /** |
|
| 325 | + * @return string |
|
| 326 | + */ |
|
| 324 | 327 | static function sanitize_filtered_sync_cron_schedule( $schedule ) { |
| 325 | 328 | $schedule = sanitize_key( $schedule ); |
| 326 | 329 | $schedules = wp_get_schedules(); |
@@ -358,6 +361,9 @@ discard block |
||
| 358 | 361 | ); |
| 359 | 362 | } |
| 360 | 363 | |
| 364 | + /** |
|
| 365 | + * @param string $hook |
|
| 366 | + */ |
|
| 361 | 367 | static function maybe_schedule_sync_cron( $schedule, $hook ) { |
| 362 | 368 | if ( ! $hook ) { |
| 363 | 369 | return; |
@@ -76,6 +76,9 @@ discard block |
||
| 76 | 76 | return (float) get_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, 0 ); |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | + /** |
|
| 80 | + * @param integer $time |
|
| 81 | + */ |
|
| 79 | 82 | public function set_next_sync_time( $time, $queue_name ) { |
| 80 | 83 | return update_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, $time, true ); |
| 81 | 84 | } |
@@ -106,6 +109,9 @@ discard block |
||
| 106 | 109 | return $this->do_sync_and_set_delays( $this->sync_queue ); |
| 107 | 110 | } |
| 108 | 111 | |
| 112 | + /** |
|
| 113 | + * @param Jetpack_Sync_Queue $queue |
|
| 114 | + */ |
|
| 109 | 115 | public function do_sync_and_set_delays( $queue ) { |
| 110 | 116 | // don't sync if importing |
| 111 | 117 | if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) { |
@@ -354,6 +360,10 @@ discard block |
||
| 354 | 360 | } |
| 355 | 361 | |
| 356 | 362 | // in seconds |
| 363 | + |
|
| 364 | + /** |
|
| 365 | + * @param double $seconds |
|
| 366 | + */ |
|
| 357 | 367 | function set_max_dequeue_time( $seconds ) { |
| 358 | 368 | $this->max_dequeue_time = $seconds; |
| 359 | 369 | } |
@@ -162,6 +162,7 @@ discard block |
||
| 162 | 162 | /** |
| 163 | 163 | * Get attachment images for a specified post and return them. Also make sure |
| 164 | 164 | * their dimensions are at or above a required minimum. |
| 165 | + * @param integer $post_id |
|
| 165 | 166 | */ |
| 166 | 167 | static function from_attachment( $post_id, $width = 200, $height = 200 ) { |
| 167 | 168 | $images = array(); |
@@ -224,7 +225,7 @@ discard block |
||
| 224 | 225 | * Check if a Featured Image is set for this post, and return it in a similar |
| 225 | 226 | * format to the other images?_from_*() methods. |
| 226 | 227 | * @param int $post_id The post ID to check |
| 227 | - * @return Array containing details of the Featured Image, or empty array if none. |
|
| 228 | + * @return integer|null containing details of the Featured Image, or empty array if none. |
|
| 228 | 229 | */ |
| 229 | 230 | static function from_thumbnail( $post_id, $width = 200, $height = 200 ) { |
| 230 | 231 | $images = array(); |
@@ -668,7 +669,6 @@ discard block |
||
| 668 | 669 | * resized and cropped image. |
| 669 | 670 | * |
| 670 | 671 | * @param string $src |
| 671 | - * @param int $dimension |
|
| 672 | 672 | * @return string Transformed image URL |
| 673 | 673 | */ |
| 674 | 674 | static function fit_image_url( $src, $width, $height ) { |
@@ -715,7 +715,7 @@ discard block |
||
| 715 | 715 | * |
| 716 | 716 | * @param mixed $html_or_id The HTML string to parse for images, or a post id. |
| 717 | 717 | * |
| 718 | - * @return array $html_info { |
|
| 718 | + * @return integer $html_info { |
|
| 719 | 719 | * @type string $html Post content. |
| 720 | 720 | * @type string $post_url Post URL. |
| 721 | 721 | * } |
@@ -682,6 +682,9 @@ |
||
| 682 | 682 | $this->options_save_other( 'linkedin' ); |
| 683 | 683 | } |
| 684 | 684 | |
| 685 | + /** |
|
| 686 | + * @param string $service_name |
|
| 687 | + */ |
|
| 685 | 688 | function options_save_other( $service_name ) { |
| 686 | 689 | // Nonce check |
| 687 | 690 | check_admin_referer( 'save_' . $service_name . '_token_' . $_REQUEST['connection'] ); |