@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | * @access public |
337 | 337 | * @static |
338 | 338 | * |
339 | - * @return bool|null False if sync is not allowed. |
|
339 | + * @return false|null False if sync is not allowed. |
|
340 | 340 | */ |
341 | 341 | public static function do_initial_sync() { |
342 | 342 | // Lets not sync if we are not suppose to. |
@@ -506,7 +506,7 @@ discard block |
||
506 | 506 | * @static |
507 | 507 | * |
508 | 508 | * @param array $sync_modules The list of sync modules declared prior to this filter. |
509 | - * @return array A list of sync modules that now includes Woo's modules. |
|
509 | + * @return string[] A list of sync modules that now includes Woo's modules. |
|
510 | 510 | */ |
511 | 511 | public static function add_woocommerce_sync_module( $sync_modules ) { |
512 | 512 | $sync_modules[] = 'Automattic\\Jetpack\\Sync\\Modules\\WooCommerce'; |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | * @static |
534 | 534 | * |
535 | 535 | * @param array $sync_modules The list of sync modules declared prior to this filer. |
536 | - * @return array A list of sync modules that now includes WP Super Cache's modules. |
|
536 | + * @return string[] A list of sync modules that now includes WP Super Cache's modules. |
|
537 | 537 | */ |
538 | 538 | public static function add_wp_super_cache_sync_module( $sync_modules ) { |
539 | 539 | $sync_modules[] = 'Automattic\\Jetpack\\Sync\\Modules\\WP_Super_Cache'; |
@@ -181,6 +181,9 @@ discard block |
||
181 | 181 | return $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->comments WHERE $where" ); |
182 | 182 | } |
183 | 183 | |
184 | + /** |
|
185 | + * @param string|null $status |
|
186 | + */ |
|
184 | 187 | private function comment_status_to_approval_value( $status ) { |
185 | 188 | switch ( $status ) { |
186 | 189 | case 'approve': |
@@ -647,6 +650,9 @@ discard block |
||
647 | 650 | ); |
648 | 651 | } |
649 | 652 | |
653 | + /** |
|
654 | + * @param string $object_type |
|
655 | + */ |
|
650 | 656 | function get_checksum_columns_for_object_type( $object_type ) { |
651 | 657 | switch ( $object_type ) { |
652 | 658 | case 'posts': |
@@ -754,6 +760,9 @@ discard block |
||
754 | 760 | return $histogram; |
755 | 761 | } |
756 | 762 | |
763 | + /** |
|
764 | + * @param string|null $id_column |
|
765 | + */ |
|
757 | 766 | private function table_checksum( $table, $columns, $id_column, $where_sql = '1=1', $min_id = null, $max_id = null, $strip_non_ascii = true, $salt = '' ) { |
758 | 767 | global $wpdb; |
759 | 768 | |
@@ -805,6 +814,11 @@ discard block |
||
805 | 814 | return 'sum'; |
806 | 815 | } |
807 | 816 | |
817 | + /** |
|
818 | + * @param string $where_sql |
|
819 | + * @param integer|null $min_id |
|
820 | + * @param integer|null $max_id |
|
821 | + */ |
|
808 | 822 | private function meta_count( $table, $where_sql, $min_id, $max_id ) { |
809 | 823 | global $wpdb; |
810 | 824 |
@@ -20,6 +20,7 @@ discard block |
||
20 | 20 | * Empty and reset the replicastore. |
21 | 21 | * |
22 | 22 | * @access public |
23 | + * @return void |
|
23 | 24 | */ |
24 | 25 | public function reset(); |
25 | 26 | |
@@ -29,6 +30,7 @@ discard block |
||
29 | 30 | * @access public |
30 | 31 | * |
31 | 32 | * @param array $config Full sync configuration for this sync module. |
33 | + * @return void |
|
32 | 34 | */ |
33 | 35 | public function full_sync_start( $config ); |
34 | 36 | |
@@ -38,6 +40,7 @@ discard block |
||
38 | 40 | * @access public |
39 | 41 | * |
40 | 42 | * @param string $checksum Deprecated since 7.3.0. |
43 | + * @return void |
|
41 | 44 | */ |
42 | 45 | public function full_sync_end( $checksum ); |
43 | 46 | |
@@ -81,6 +84,7 @@ discard block |
||
81 | 84 | * |
82 | 85 | * @param \WP_Post $post Post object. |
83 | 86 | * @param bool $silent Whether to perform a silent action. |
87 | + * @return void |
|
84 | 88 | */ |
85 | 89 | public function upsert_post( $post, $silent = false ); |
86 | 90 | |
@@ -90,6 +94,7 @@ discard block |
||
90 | 94 | * @access public |
91 | 95 | * |
92 | 96 | * @param int $post_id Post ID. |
97 | + * @return void |
|
93 | 98 | */ |
94 | 99 | public function delete_post( $post_id ); |
95 | 100 | |
@@ -150,6 +155,7 @@ discard block |
||
150 | 155 | * @access public |
151 | 156 | * |
152 | 157 | * @param \WP_Comment $comment Comment object. |
158 | + * @return void |
|
153 | 159 | */ |
154 | 160 | public function upsert_comment( $comment ); |
155 | 161 | |
@@ -159,6 +165,7 @@ discard block |
||
159 | 165 | * @access public |
160 | 166 | * |
161 | 167 | * @param int $comment_id Comment ID. |
168 | + * @return void |
|
162 | 169 | */ |
163 | 170 | public function trash_comment( $comment_id ); |
164 | 171 | |
@@ -168,6 +175,7 @@ discard block |
||
168 | 175 | * @access public |
169 | 176 | * |
170 | 177 | * @param int $comment_id Comment ID. |
178 | + * @return void |
|
171 | 179 | */ |
172 | 180 | public function spam_comment( $comment_id ); |
173 | 181 | |
@@ -177,6 +185,7 @@ discard block |
||
177 | 185 | * @access public |
178 | 186 | * |
179 | 187 | * @param int $comment_id Comment ID. |
188 | + * @return void |
|
180 | 189 | */ |
181 | 190 | public function delete_comment( $comment_id ); |
182 | 191 | |
@@ -187,6 +196,7 @@ discard block |
||
187 | 196 | * |
188 | 197 | * @param int $post_id Post ID. |
189 | 198 | * @param array $statuses Post statuses. |
199 | + * @return void |
|
190 | 200 | */ |
191 | 201 | public function trashed_post_comments( $post_id, $statuses ); |
192 | 202 | |
@@ -196,6 +206,7 @@ discard block |
||
196 | 206 | * @access public |
197 | 207 | * |
198 | 208 | * @param int $post_id Post ID. |
209 | + * @return void |
|
199 | 210 | */ |
200 | 211 | public function untrashed_post_comments( $post_id ); |
201 | 212 | |
@@ -235,7 +246,7 @@ discard block |
||
235 | 246 | * @access public |
236 | 247 | * |
237 | 248 | * @param string $option Name of option to retrieve. |
238 | - * @param mixed $default Optional. Default value to return if the option does not exist. |
|
249 | + * @param boolean $default Optional. Default value to return if the option does not exist. |
|
239 | 250 | */ |
240 | 251 | public function get_option( $option, $default = false ); |
241 | 252 | |
@@ -254,6 +265,7 @@ discard block |
||
254 | 265 | * @access public |
255 | 266 | * |
256 | 267 | * @param array $theme_support Features that the theme supports. |
268 | + * @return void |
|
257 | 269 | */ |
258 | 270 | public function set_theme_support( $theme_support ); |
259 | 271 | |
@@ -288,6 +300,7 @@ discard block |
||
288 | 300 | * @param string $meta_key Meta key. |
289 | 301 | * @param mixed $meta_value Meta value. |
290 | 302 | * @param int $meta_id ID of the meta. |
303 | + * @return boolean |
|
291 | 304 | */ |
292 | 305 | public function upsert_metadata( $type, $object_id, $meta_key, $meta_value, $meta_id ); |
293 | 306 | |
@@ -299,6 +312,7 @@ discard block |
||
299 | 312 | * @param string $type Meta type. |
300 | 313 | * @param int $object_id ID of the object. |
301 | 314 | * @param array $meta_ids IDs of the meta objects to delete. |
315 | + * @return false|null |
|
302 | 316 | */ |
303 | 317 | public function delete_metadata( $type, $object_id, $meta_ids ); |
304 | 318 | |
@@ -310,6 +324,7 @@ discard block |
||
310 | 324 | * @param string $type Meta type. |
311 | 325 | * @param array $object_ids IDs of the objects. |
312 | 326 | * @param string $meta_key Meta key. |
327 | + * @return false|null |
|
313 | 328 | */ |
314 | 329 | public function delete_batch_metadata( $type, $object_ids, $meta_key ); |
315 | 330 | |
@@ -329,6 +344,7 @@ discard block |
||
329 | 344 | * |
330 | 345 | * @param string $constant Name of constant to retrieve. |
331 | 346 | * @param mixed $value Value set for the constant. |
347 | + * @return void |
|
332 | 348 | */ |
333 | 349 | public function set_constant( $constant, $value ); |
334 | 350 | |
@@ -350,6 +366,7 @@ discard block |
||
350 | 366 | * |
351 | 367 | * @param string $type Type of updates to set. |
352 | 368 | * @param int $updates Total number of updates. |
369 | + * @return void |
|
353 | 370 | */ |
354 | 371 | public function set_updates( $type, $updates ); |
355 | 372 | |
@@ -369,6 +386,7 @@ discard block |
||
369 | 386 | * |
370 | 387 | * @param string $callable Callable name. |
371 | 388 | * @param mixed $value Callable value. |
389 | + * @return void |
|
372 | 390 | */ |
373 | 391 | public function set_callable( $callable, $value ); |
374 | 392 | |
@@ -458,6 +476,7 @@ discard block |
||
458 | 476 | * @param string $taxonomy The context in which to relate the term to the object. |
459 | 477 | * @param string|int|array $terms A single term slug, single term id, or array of either term slugs or ids. |
460 | 478 | * @param bool $append Optional. If false will delete difference of terms. Default false. |
479 | + * @return void |
|
461 | 480 | */ |
462 | 481 | public function update_object_terms( $object_id, $taxonomy, $terms, $append ); |
463 | 482 | |
@@ -470,6 +489,7 @@ discard block |
||
470 | 489 | * |
471 | 490 | * @param int $object_id ID of the object. |
472 | 491 | * @param array $tt_ids Term taxonomy IDs. |
492 | + * @return boolean |
|
473 | 493 | */ |
474 | 494 | public function delete_object_terms( $object_id, $tt_ids ); |
475 | 495 | |
@@ -477,6 +497,7 @@ discard block |
||
477 | 497 | * Retrieve the number of users. |
478 | 498 | * |
479 | 499 | * @access public |
500 | + * @return void |
|
480 | 501 | */ |
481 | 502 | public function user_count(); |
482 | 503 | |
@@ -495,6 +516,7 @@ discard block |
||
495 | 516 | * @access public |
496 | 517 | * |
497 | 518 | * @param \WP_User $user User object. |
519 | + * @return void |
|
498 | 520 | */ |
499 | 521 | public function upsert_user( $user ); |
500 | 522 | |
@@ -504,6 +526,7 @@ discard block |
||
504 | 526 | * @access public |
505 | 527 | * |
506 | 528 | * @param int $user_id User ID. |
529 | + * @return void |
|
507 | 530 | */ |
508 | 531 | public function delete_user( $user_id ); |
509 | 532 | |
@@ -514,6 +537,7 @@ discard block |
||
514 | 537 | * |
515 | 538 | * @param int $user_id User ID. |
516 | 539 | * @param string $locale The user locale. |
540 | + * @return void |
|
517 | 541 | */ |
518 | 542 | public function upsert_user_locale( $user_id, $locale ); |
519 | 543 | |
@@ -523,6 +547,7 @@ discard block |
||
523 | 547 | * @access public |
524 | 548 | * |
525 | 549 | * @param int $user_id User ID. |
550 | + * @return void |
|
526 | 551 | */ |
527 | 552 | public function delete_user_locale( $user_id ); |
528 | 553 | |
@@ -541,6 +566,7 @@ discard block |
||
541 | 566 | * @access public |
542 | 567 | * |
543 | 568 | * @param int $user_id User ID. |
569 | + * @return void |
|
544 | 570 | */ |
545 | 571 | public function get_allowed_mime_types( $user_id ); |
546 | 572 |