@@ -115,7 +115,7 @@ |
||
| 115 | 115 | * Mock a global function and make it return a certain value. |
| 116 | 116 | * |
| 117 | 117 | * @param string $function_name Name of the function. |
| 118 | - * @param mixed $return_value Return value of the function. |
|
| 118 | + * @param integer $return_value Return value of the function. |
|
| 119 | 119 | * @return phpmock\Mock The mock object. |
| 120 | 120 | */ |
| 121 | 121 | protected function mock_function( $function_name, $return_value = null ) { |
@@ -103,7 +103,7 @@ |
||
| 103 | 103 | * |
| 104 | 104 | * @param string $content The current message. |
| 105 | 105 | * |
| 106 | - * @return array The new message. |
|
| 106 | + * @return string The new message. |
|
| 107 | 107 | */ |
| 108 | 108 | public static function jitm_woocommerce_services_msg( $content ) { |
| 109 | 109 | if ( ! function_exists( 'wc_get_base_location' ) ) { |
@@ -43,6 +43,9 @@ discard block |
||
| 43 | 43 | return array( 'scheduled' => Actions::do_full_sync( $modules ) ); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | + /** |
|
| 47 | + * @return string |
|
| 48 | + */ |
|
| 46 | 49 | protected function validate_queue( $query ) { |
| 47 | 50 | if ( ! isset( $query ) ) { |
| 48 | 51 | return new WP_Error( 'invalid_queue', 'Queue name is required', 400 ); |
@@ -233,6 +236,9 @@ discard block |
||
| 233 | 236 | ); |
| 234 | 237 | } |
| 235 | 238 | |
| 239 | + /** |
|
| 240 | + * @param Queue $queue |
|
| 241 | + */ |
|
| 236 | 242 | protected function get_buffer( $queue, $number_of_items ) { |
| 237 | 243 | $start = time(); |
| 238 | 244 | $max_duration = 5; // this will try to get the buffer |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * |
| 28 | 28 | * @param string $type The type of option to return. Defaults to 'compact'. |
| 29 | 29 | * |
| 30 | - * @return array |
|
| 30 | + * @return string[] |
|
| 31 | 31 | */ |
| 32 | 32 | public static function get_option_names( $type = 'compact' ) { |
| 33 | 33 | switch ( $type ) { |
@@ -505,7 +505,7 @@ discard block |
||
| 505 | 505 | * @since 5.4.0 |
| 506 | 506 | * |
| 507 | 507 | * @param boolean $strip_unsafe_options If true, and by default, will strip out options necessary for the connection to WordPress.com. |
| 508 | - * @return array An array of all options managed via the Jetpack_Options class. |
|
| 508 | + * @return string[] An array of all options managed via the Jetpack_Options class. |
|
| 509 | 509 | */ |
| 510 | 510 | public static function get_all_jetpack_options( $strip_unsafe_options = true ) { |
| 511 | 511 | $jetpack_options = self::get_option_names(); |
@@ -548,7 +548,7 @@ discard block |
||
| 548 | 548 | * |
| 549 | 549 | * @since 5.4.0 |
| 550 | 550 | * |
| 551 | - * @return array |
|
| 551 | + * @return string[] |
|
| 552 | 552 | */ |
| 553 | 553 | public static function get_all_wp_options() { |
| 554 | 554 | // A manual build of the wp options. |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | /** |
| 77 | 77 | * Wraps JSON |
| 78 | 78 | * |
| 79 | - * @param object|array $any Wrapping value. |
|
| 79 | + * @param string $any Wrapping value. |
|
| 80 | 80 | * @param array $seen_nodes Seen nodes. |
| 81 | 81 | * @return array |
| 82 | 82 | */ |
@@ -374,7 +374,7 @@ |
||
| 374 | 374 | /** |
| 375 | 375 | * Close the buffer. |
| 376 | 376 | * |
| 377 | - * @param Automattic\Jetpack\Sync\Queue_Buffer $buffer Queue_Buffer object. |
|
| 377 | + * @param Queue_Buffer $buffer Queue_Buffer object. |
|
| 378 | 378 | * @param null|array $ids_to_remove Ids to remove from the queue. |
| 379 | 379 | * |
| 380 | 380 | * @return bool|\WP_Error |