@@ -228,6 +228,9 @@ |
||
| 228 | 228 | ); |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | + /** |
|
| 232 | + * @param Queue $queue |
|
| 233 | + */ |
|
| 231 | 234 | protected function get_buffer( $queue, $number_of_items ) { |
| 232 | 235 | $start = time(); |
| 233 | 236 | $max_duration = 5; // this will try to get the buffer |
@@ -177,6 +177,9 @@ |
||
| 177 | 177 | $queue->add_all( $data_to_enqueue ); |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | + /** |
|
| 181 | + * @param 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 ( Settings::is_sending() ) { |
@@ -240,6 +240,9 @@ discard block |
||
| 240 | 240 | return true; |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | + /** |
|
| 244 | + * @param Queue_Buffer $buffer |
|
| 245 | + */ |
|
| 243 | 246 | function close( $buffer, $ids_to_remove = null ) { |
| 244 | 247 | $is_valid = $this->validate_checkout( $buffer ); |
| 245 | 248 | |
@@ -344,6 +347,9 @@ discard block |
||
| 344 | 347 | return false; |
| 345 | 348 | } |
| 346 | 349 | |
| 350 | + /** |
|
| 351 | + * @param string $checkout_id |
|
| 352 | + */ |
|
| 347 | 353 | private function set_checkout_id( $checkout_id ) { |
| 348 | 354 | global $wpdb; |
| 349 | 355 | |
@@ -70,6 +70,9 @@ discard block |
||
| 70 | 70 | return (float) get_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, 0 ); |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | + /** |
|
| 74 | + * @param integer $time |
|
| 75 | + */ |
|
| 73 | 76 | public function set_next_sync_time( $time, $queue_name ) { |
| 74 | 77 | return update_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, $time, true ); |
| 75 | 78 | } |
@@ -100,6 +103,9 @@ discard block |
||
| 100 | 103 | return $this->do_sync_and_set_delays( $this->sync_queue ); |
| 101 | 104 | } |
| 102 | 105 | |
| 106 | + /** |
|
| 107 | + * @param Queue $queue |
|
| 108 | + */ |
|
| 103 | 109 | public function do_sync_and_set_delays( $queue ) { |
| 104 | 110 | // don't sync if importing |
| 105 | 111 | if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) { |
@@ -357,6 +363,10 @@ discard block |
||
| 357 | 363 | } |
| 358 | 364 | |
| 359 | 365 | // in seconds |
| 366 | + |
|
| 367 | + /** |
|
| 368 | + * @param double $seconds |
|
| 369 | + */ |
|
| 360 | 370 | function set_max_dequeue_time( $seconds ) { |
| 361 | 371 | $this->max_dequeue_time = $seconds; |
| 362 | 372 | } |
@@ -194,6 +194,9 @@ discard block |
||
| 194 | 194 | do_action( 'jetpack_full_sync_end', '', $range ); |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | + /** |
|
| 198 | + * @param string $type |
|
| 199 | + */ |
|
| 197 | 200 | function get_range( $type ) { |
| 198 | 201 | global $wpdb; |
| 199 | 202 | if ( ! in_array( $type, array( 'comments', 'posts' ) ) ) { |
@@ -404,6 +407,9 @@ discard block |
||
| 404 | 407 | $listener->get_full_sync_queue()->reset(); |
| 405 | 408 | } |
| 406 | 409 | |
| 410 | + /** |
|
| 411 | + * @param integer $default |
|
| 412 | + */ |
|
| 407 | 413 | private function get_status_option( $name, $default = null ) { |
| 408 | 414 | $value = \Jetpack_Options::get_raw_option( self::STATUS_OPTION_PREFIX . "_$name", $default ); |
| 409 | 415 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | * @param string $vendorPath Path to the vendor directory. |
| 161 | 161 | * @param string $basePath Base Path. |
| 162 | 162 | * |
| 163 | - * @return array $classMap |
|
| 163 | + * @return string $classMap |
|
| 164 | 164 | */ |
| 165 | 165 | private function getClassMap( array $autoloads, Filesystem $filesystem, $vendorPath, $basePath ) { |
| 166 | 166 | $blacklist = null; |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | /** |
| 225 | 225 | * Generate the PHP that will be used in the autoload_classmap_package.php files. |
| 226 | 226 | * |
| 227 | - * @param srting $classMap class map array string that is to be written out to the file. |
|
| 227 | + * @param string $classMap class map array string that is to be written out to the file. |
|
| 228 | 228 | * |
| 229 | 229 | * @return string |
| 230 | 230 | */ |
@@ -14,6 +14,9 @@ |
||
| 14 | 14 | public $line; |
| 15 | 15 | public $func_name; |
| 16 | 16 | |
| 17 | + /** |
|
| 18 | + * @param string $func_name |
|
| 19 | + */ |
|
| 17 | 20 | public function __construct( $path, $line, $func_name ) { |
| 18 | 21 | $this->path = $path; |
| 19 | 22 | $this->line = $line; |
@@ -33,6 +33,9 @@ |
||
| 33 | 33 | } |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | + /** |
|
| 37 | + * @param string $root |
|
| 38 | + */ |
|
| 36 | 39 | public function scan_dir( $root, $exclude = array() ) { |
| 37 | 40 | |
| 38 | 41 | if ( is_null( $exclude ) || ! is_array( $exclude ) ) { |
@@ -37,6 +37,9 @@ |
||
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | + /** |
|
| 41 | + * @param string $root |
|
| 42 | + */ |
|
| 40 | 43 | public function scan_dir( $root, $exclude = array() ) { |
| 41 | 44 | $filter = function ( $file, $key, $iterator ) use ( $exclude ) { |
| 42 | 45 | if ( $iterator->hasChildren() && ! in_array( $file->getFilename(), $exclude ) ) { |