@@ -164,6 +164,9 @@ discard block |
||
164 | 164 | self::set_is_sending( null ); |
165 | 165 | } |
166 | 166 | |
167 | + /** |
|
168 | + * @param boolean|null $is_importing |
|
169 | + */ |
|
167 | 170 | static function set_importing( $is_importing ) { |
168 | 171 | // set to NULL to revert to WP_IMPORTING, the standard behavior |
169 | 172 | self::$is_importing = $is_importing; |
@@ -198,6 +201,9 @@ discard block |
||
198 | 201 | return (bool) self::$is_syncing || ( defined( 'REST_API_REQUEST' ) && REST_API_REQUEST ); |
199 | 202 | } |
200 | 203 | |
204 | + /** |
|
205 | + * @param boolean|null $is_syncing |
|
206 | + */ |
|
201 | 207 | static function set_is_syncing( $is_syncing ) { |
202 | 208 | self::$is_syncing = $is_syncing; |
203 | 209 | } |
@@ -206,6 +212,9 @@ discard block |
||
206 | 212 | return (bool) self::$is_sending; |
207 | 213 | } |
208 | 214 | |
215 | + /** |
|
216 | + * @param null|boolean $is_sending |
|
217 | + */ |
|
209 | 218 | static function set_is_sending( $is_sending ) { |
210 | 219 | self::$is_sending = $is_sending; |
211 | 220 | } |
@@ -73,6 +73,9 @@ discard block |
||
73 | 73 | return (float) get_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, 0 ); |
74 | 74 | } |
75 | 75 | |
76 | + /** |
|
77 | + * @param integer $time |
|
78 | + */ |
|
76 | 79 | public function set_next_sync_time( $time, $queue_name ) { |
77 | 80 | return update_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, $time, true ); |
78 | 81 | } |
@@ -103,6 +106,9 @@ discard block |
||
103 | 106 | return $this->do_sync_and_set_delays( $this->sync_queue ); |
104 | 107 | } |
105 | 108 | |
109 | + /** |
|
110 | + * @param \Jetpack_Sync_Queue $queue |
|
111 | + */ |
|
106 | 112 | public function do_sync_and_set_delays( $queue ) { |
107 | 113 | // don't sync if importing |
108 | 114 | if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) { |
@@ -360,6 +366,10 @@ discard block |
||
360 | 366 | } |
361 | 367 | |
362 | 368 | // in seconds |
369 | + |
|
370 | + /** |
|
371 | + * @param double $seconds |
|
372 | + */ |
|
363 | 373 | function set_max_dequeue_time( $seconds ) { |
364 | 374 | $this->max_dequeue_time = $seconds; |
365 | 375 | } |
@@ -99,6 +99,9 @@ |
||
99 | 99 | return $user; |
100 | 100 | } |
101 | 101 | |
102 | + /** |
|
103 | + * @param \WP_User|null $user |
|
104 | + */ |
|
102 | 105 | public function expand_user( $user ) { |
103 | 106 | if ( ! is_object( $user ) ) { |
104 | 107 | return null; |
@@ -177,6 +177,9 @@ |
||
177 | 177 | $queue->add_all( $data_to_enqueue ); |
178 | 178 | } |
179 | 179 | |
180 | + /** |
|
181 | + * @param \Jetpack_Sync_Queue $queue |
|
182 | + */ |
|
180 | 183 | function enqueue_action( $current_filter, $args, $queue ) { |
181 | 184 | // don't enqueue an action during the outbound http request - this prevents recursion |
182 | 185 | if ( \Jetpack_Sync_Settings::is_sending() ) { |