@@ -164,6 +164,9 @@ |
||
| 164 | 164 | $queue->add_all( $data_to_enqueue ); |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | + /** |
|
| 168 | + * @param Jetpack_Sync_Queue $queue |
|
| 169 | + */ |
|
| 167 | 170 | function enqueue_action( $current_filter, $args, $queue ) { |
| 168 | 171 | // don't enqueue an action during the outbound http request - this prevents recursion |
| 169 | 172 | if ( Jetpack_Sync_Settings::is_sending() ) { |
@@ -246,6 +246,9 @@ discard block |
||
| 246 | 246 | return true; |
| 247 | 247 | } |
| 248 | 248 | |
| 249 | + /** |
|
| 250 | + * @param Jetpack_Sync_Queue_Buffer $buffer |
|
| 251 | + */ |
|
| 249 | 252 | function close( $buffer, $ids_to_remove = null ) { |
| 250 | 253 | $is_valid = $this->validate_checkout( $buffer ); |
| 251 | 254 | |
@@ -339,6 +342,9 @@ discard block |
||
| 339 | 342 | return false; |
| 340 | 343 | } |
| 341 | 344 | |
| 345 | + /** |
|
| 346 | + * @param string $checkout_id |
|
| 347 | + */ |
|
| 342 | 348 | private function set_checkout_id( $checkout_id ) { |
| 343 | 349 | global $wpdb; |
| 344 | 350 | |
@@ -141,6 +141,9 @@ discard block |
||
| 141 | 141 | return $value; |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | + /** |
|
| 145 | + * @param string $name |
|
| 146 | + */ |
|
| 144 | 147 | private static function update_grouped_option( $group, $name, $value ) { |
| 145 | 148 | $options = get_option( self::$grouped_options[ $group ] ); |
| 146 | 149 | if ( ! is_array( $options ) ) { |
@@ -232,6 +235,9 @@ discard block |
||
| 232 | 235 | return $result; |
| 233 | 236 | } |
| 234 | 237 | |
| 238 | + /** |
|
| 239 | + * @param string $name |
|
| 240 | + */ |
|
| 235 | 241 | private static function get_grouped_option( $group, $name, $default ) { |
| 236 | 242 | $options = get_option( self::$grouped_options[ $group ] ); |
| 237 | 243 | if ( is_array( $options ) && isset( $options[ $name ] ) ) { |
@@ -234,6 +234,9 @@ discard block |
||
| 234 | 234 | $listener->get_full_sync_queue()->reset(); |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | + /** |
|
| 238 | + * @param integer $default |
|
| 239 | + */ |
|
| 237 | 240 | private function get_status_option( $option, $default = null ) { |
| 238 | 241 | $prefix = self::STATUS_OPTION_PREFIX; |
| 239 | 242 | |
@@ -270,6 +273,9 @@ discard block |
||
| 270 | 273 | $this->queue_items_added( 1 ); |
| 271 | 274 | } |
| 272 | 275 | |
| 276 | + /** |
|
| 277 | + * @param integer $item_count |
|
| 278 | + */ |
|
| 273 | 279 | public function queue_items_added( $item_count ) { |
| 274 | 280 | // jpsq_item_added and jpsq_items_added both exec 1 db query, |
| 275 | 281 | // so we ignore $item_count and treat it as always 1 |