@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | /** |
21 | 21 | * Jetpack_Sync_Listener constructor. |
22 | 22 | * |
23 | - * @param $sync \Automattic\Jetpack\Sync object |
|
23 | + * @param Automattic\Jetpack\Sync $sync \Automattic\Jetpack\Sync object |
|
24 | 24 | */ |
25 | 25 | public function __construct( $sync ) { |
26 | 26 | $this->sync = $sync; |
@@ -173,6 +173,9 @@ discard block |
||
173 | 173 | $queue->add_all( $data_to_enqueue ); |
174 | 174 | } |
175 | 175 | |
176 | + /** |
|
177 | + * @param Jetpack_Sync_Queue $queue |
|
178 | + */ |
|
176 | 179 | function enqueue_action( $current_filter, $args, $queue ) { |
177 | 180 | // don't enqueue an action during the outbound http request - this prevents recursion |
178 | 181 | if ( Jetpack_Sync_Settings::is_sending() ) { |
@@ -71,6 +71,9 @@ discard block |
||
71 | 71 | return (float) get_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, 0 ); |
72 | 72 | } |
73 | 73 | |
74 | + /** |
|
75 | + * @param integer $time |
|
76 | + */ |
|
74 | 77 | public function set_next_sync_time( $time, $queue_name ) { |
75 | 78 | return update_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, $time, true ); |
76 | 79 | } |
@@ -101,6 +104,9 @@ discard block |
||
101 | 104 | return $this->do_sync_and_set_delays( $this->sync_queue ); |
102 | 105 | } |
103 | 106 | |
107 | + /** |
|
108 | + * @param Jetpack_Sync_Queue $queue |
|
109 | + */ |
|
104 | 110 | public function do_sync_and_set_delays( $queue ) { |
105 | 111 | |
106 | 112 | // don't sync if importing |
@@ -359,6 +365,10 @@ discard block |
||
359 | 365 | } |
360 | 366 | |
361 | 367 | // in seconds |
368 | + |
|
369 | + /** |
|
370 | + * @param double $seconds |
|
371 | + */ |
|
362 | 372 | function set_max_dequeue_time( $seconds ) { |
363 | 373 | $this->max_dequeue_time = $seconds; |
364 | 374 | } |
@@ -356,6 +356,9 @@ discard block |
||
356 | 356 | return $sync_modules; |
357 | 357 | } |
358 | 358 | |
359 | + /** |
|
360 | + * @return string |
|
361 | + */ |
|
359 | 362 | function sanitize_filtered_sync_cron_schedule( $schedule ) { |
360 | 363 | $schedule = sanitize_key( $schedule ); |
361 | 364 | $schedules = wp_get_schedules(); |
@@ -393,6 +396,9 @@ discard block |
||
393 | 396 | ); |
394 | 397 | } |
395 | 398 | |
399 | + /** |
|
400 | + * @param string $hook |
|
401 | + */ |
|
396 | 402 | function maybe_schedule_sync_cron( $schedule, $hook ) { |
397 | 403 | if ( ! $hook ) { |
398 | 404 | return; |
@@ -53,7 +53,6 @@ |
||
53 | 53 | /** |
54 | 54 | * Mock a set of filters. |
55 | 55 | * |
56 | - * @param array $args Array of filters with their arguments. |
|
57 | 56 | * @return phpmock\Mock The mock object. |
58 | 57 | */ |
59 | 58 | protected function mock_filters( $filters = array() ) { |