@@ -30,6 +30,9 @@ discard block |
||
30 | 30 | public $id; |
31 | 31 | private $checkout_size; |
32 | 32 | |
33 | + /** |
|
34 | + * @param string $id |
|
35 | + */ |
|
33 | 36 | function __construct( $id, $checkout_size = 10 ) { |
34 | 37 | $this->id = str_replace( '-', '_', $id); // necessary to ensure we don't have ID collisions in the SQL |
35 | 38 | $this->checkout_size = $checkout_size; |
@@ -127,6 +130,9 @@ discard block |
||
127 | 130 | return get_option( "jetpack_sync_queue_{$this->id}-checkout", false ); |
128 | 131 | } |
129 | 132 | |
133 | + /** |
|
134 | + * @param string $checkout_id |
|
135 | + */ |
|
130 | 136 | private function set_checkout_id( $checkout_id ) { |
131 | 137 | return add_option( "jetpack_sync_queue_{$this->id}-checkout", $checkout_id, null, true ); // this one we should autoload |
132 | 138 | } |
@@ -145,6 +151,9 @@ discard block |
||
145 | 151 | return 'jetpack_sync_queue_'.$this->id.'-'.$timestamp.'-'.getmypid(); |
146 | 152 | } |
147 | 153 | |
154 | + /** |
|
155 | + * @param integer $limit |
|
156 | + */ |
|
148 | 157 | private function fetch_items( $limit = null ) { |
149 | 158 | global $wpdb; |
150 | 159 |
@@ -467,6 +467,9 @@ discard block |
||
467 | 467 | } |
468 | 468 | } |
469 | 469 | |
470 | + /** |
|
471 | + * @param string $action_name |
|
472 | + */ |
|
470 | 473 | private function buffer_includes_action( $buffer, $action_name ) { |
471 | 474 | foreach( $buffer->get_items() as $item ) { |
472 | 475 | if ( $item[0] === $action_name ) { |
@@ -476,6 +479,9 @@ discard block |
||
476 | 479 | return false; |
477 | 480 | } |
478 | 481 | |
482 | + /** |
|
483 | + * @param string $when |
|
484 | + */ |
|
479 | 485 | private function schedule_sync( $when ) { |
480 | 486 | wp_schedule_single_event( strtotime( $when ), 'jetpack_sync_actions' ); |
481 | 487 | } |
@@ -188,6 +188,9 @@ discard block |
||
188 | 188 | ); |
189 | 189 | } |
190 | 190 | |
191 | + /** |
|
192 | + * @param string $meta_type |
|
193 | + */ |
|
191 | 194 | private function get_metadata( $ids, $meta_type ) { |
192 | 195 | global $wpdb; |
193 | 196 | $table = _get_meta_table( $meta_type ); |
@@ -214,6 +217,10 @@ discard block |
||
214 | 217 | $this->set_status("updates", 100); |
215 | 218 | } |
216 | 219 | |
220 | + /** |
|
221 | + * @param string $name |
|
222 | + * @param integer $percent |
|
223 | + */ |
|
217 | 224 | private function set_status( $name, $percent, $count = 1, $total =1 ) { |
218 | 225 | set_transient( self::$status_transient_name.'_'.$name, |
219 | 226 | array( |