@@ -7,6 +7,9 @@ discard block |
||
7 | 7 | public $id; |
8 | 8 | public $items_with_ids; |
9 | 9 | |
10 | + /** |
|
11 | + * @param string $id |
|
12 | + */ |
|
10 | 13 | public function __construct( $id, $items_with_ids ) { |
11 | 14 | $this->id = $id; |
12 | 15 | $this->items_with_ids = $items_with_ids; |
@@ -31,6 +34,9 @@ discard block |
||
31 | 34 | public $id; |
32 | 35 | private $row_iterator; |
33 | 36 | |
37 | + /** |
|
38 | + * @param string $id |
|
39 | + */ |
|
34 | 40 | function __construct( $id ) { |
35 | 41 | $this->id = str_replace( '-', '_', $id ); // necessary to ensure we don't have ID collisions in the SQL |
36 | 42 | $this->row_iterator = 0; |
@@ -227,6 +233,9 @@ discard block |
||
227 | 233 | return true; |
228 | 234 | } |
229 | 235 | |
236 | + /** |
|
237 | + * @param integer $num_items_to_remove |
|
238 | + */ |
|
230 | 239 | function close( $buffer, $num_items_to_remove = null ) { |
231 | 240 | $is_valid = $this->validate_checkout( $buffer ); |
232 | 241 | |
@@ -308,6 +317,9 @@ discard block |
||
308 | 317 | return get_transient( $this->get_checkout_transient_name() ); |
309 | 318 | } |
310 | 319 | |
320 | + /** |
|
321 | + * @param string $checkout_id |
|
322 | + */ |
|
311 | 323 | private function set_checkout_id( $checkout_id ) { |
312 | 324 | return set_transient( $this->get_checkout_transient_name(), $checkout_id, 5*60 ); // 5 minute timeout |
313 | 325 | } |