@@ -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 ); |
@@ -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 | } |