Completed
Push — try/namespacing-all-the-things ( 457764 )
by
unknown
08:24
created
packages/sync/legacy/class.jetpack-sync-module-full-sync.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -185,6 +185,9 @@  discard block
 block discarded – undo
185 185
 		do_action( 'jetpack_full_sync_end', '', $range );
186 186
 	}
187 187
 
188
+	/**
189
+	 * @param string $type
190
+	 */
188 191
 	function get_range( $type ) {
189 192
 		global $wpdb;
190 193
 		if ( ! in_array( $type, array( 'comments', 'posts' ) ) ) {
@@ -323,6 +326,9 @@  discard block
 block discarded – undo
323 326
 		$listener->get_full_sync_queue()->reset();
324 327
 	}
325 328
 
329
+	/**
330
+	 * @param integer $default
331
+	 */
326 332
 	private function get_status_option( $name, $default = null ) {
327 333
 		$value = Jetpack_Options::get_raw_option( self::STATUS_OPTION_PREFIX . "_$name", $default );
328 334
 
Please login to merge, or discard this patch.
packages/sync/legacy/class.jetpack-sync-module-users.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -94,6 +94,9 @@
 block discarded – undo
94 94
 		return $user;
95 95
 	}
96 96
 
97
+	/**
98
+	 * @param WP_User|null $user
99
+	 */
97 100
 	public function expand_user( $user ) {
98 101
 		if ( ! is_object( $user ) ) {
99 102
 			return null;
Please login to merge, or discard this patch.
packages/sync/legacy/class.jetpack-sync-module.php 1 patch
Doc Comments   +16 added lines patch added patch discarded remove patch
@@ -42,6 +42,9 @@  discard block
 block discarded – undo
42 42
 		return array();
43 43
 	}
44 44
 
45
+	/**
46
+	 * @param string[] $actions_to_count
47
+	 */
45 48
 	protected function count_actions( $action_names, $actions_to_count ) {
46 49
 		return count( array_intersect( $action_names, $actions_to_count ) );
47 50
 	}
@@ -58,6 +61,10 @@  discard block
 block discarded – undo
58 61
 		return false;
59 62
 	}
60 63
 
64
+	/**
65
+	 * @param string $action_name
66
+	 * @param string $id_field
67
+	 */
61 68
 	protected function enqueue_all_ids_as_action( $action_name, $table_name, $id_field, $where_sql, $max_items_to_enqueue, $state ) {
62 69
 		global $wpdb;
63 70
 
@@ -111,6 +118,9 @@  discard block
 block discarded – undo
111 118
 		return $chunks_with_ends;
112 119
 	}
113 120
 
121
+	/**
122
+	 * @param string $meta_type
123
+	 */
114 124
 	protected function get_metadata( $ids, $meta_type, $meta_key_whitelist ) {
115 125
 		global $wpdb;
116 126
 		$table = _get_meta_table( $meta_type );
@@ -131,12 +141,18 @@  discard block
 block discarded – undo
131 141
 		);
132 142
 	}
133 143
 
144
+	/**
145
+	 * @param string $meta_type
146
+	 */
134 147
 	public function init_listeners_for_meta_type( $meta_type, $callable ) {
135 148
 		add_action( "added_{$meta_type}_meta", $callable, 10, 4 );
136 149
 		add_action( "updated_{$meta_type}_meta", $callable, 10, 4 );
137 150
 		add_action( "deleted_{$meta_type}_meta", $callable, 10, 4 );
138 151
 	}
139 152
 
153
+	/**
154
+	 * @param string $meta_type
155
+	 */
140 156
 	public function init_meta_whitelist_handler( $meta_type, $whitelist_handler ) {
141 157
 		add_filter( "jetpack_sync_before_enqueue_added_{$meta_type}_meta", $whitelist_handler );
142 158
 		add_filter( "jetpack_sync_before_enqueue_updated_{$meta_type}_meta", $whitelist_handler );
Please login to merge, or discard this patch.
packages/sync/legacy/class.jetpack-sync-queue.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -246,6 +246,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
packages/sync/legacy/class.jetpack-sync-sender.php 1 patch
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -76,6 +76,9 @@  discard block
 block discarded – undo
76 76
 		return (float) get_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, 0 );
77 77
 	}
78 78
 
79
+	/**
80
+	 * @param integer $time
81
+	 */
79 82
 	public function set_next_sync_time( $time, $queue_name ) {
80 83
 		return update_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, $time, true );
81 84
 	}
@@ -106,6 +109,9 @@  discard block
 block discarded – undo
106 109
 		return $this->do_sync_and_set_delays( $this->sync_queue );
107 110
 	}
108 111
 
112
+	/**
113
+	 * @param Jetpack_Sync_Queue $queue
114
+	 */
109 115
 	public function do_sync_and_set_delays( $queue ) {
110 116
 		// don't sync if importing
111 117
 		if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) {
@@ -354,6 +360,10 @@  discard block
 block discarded – undo
354 360
 	}
355 361
 
356 362
 	// in seconds
363
+
364
+	/**
365
+	 * @param double $seconds
366
+	 */
357 367
 	function set_max_dequeue_time( $seconds ) {
358 368
 		$this->max_dequeue_time = $seconds;
359 369
 	}
Please login to merge, or discard this patch.
packages/sync/legacy/class.jetpack-sync-settings.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -135,6 +135,9 @@  discard block
 block discarded – undo
135 135
 		self::set_is_sending( null );
136 136
 	}
137 137
 
138
+	/**
139
+	 * @param boolean|null $is_importing
140
+	 */
138 141
 	static function set_importing( $is_importing ) {
139 142
 		// set to NULL to revert to WP_IMPORTING, the standard behavior
140 143
 		self::$is_importing = $is_importing;
@@ -165,6 +168,9 @@  discard block
 block discarded – undo
165 168
 		return (bool) self::$is_syncing || ( defined( 'REST_API_REQUEST' ) && REST_API_REQUEST );
166 169
 	}
167 170
 
171
+	/**
172
+	 * @param boolean|null $is_syncing
173
+	 */
168 174
 	static function set_is_syncing( $is_syncing ) {
169 175
 		self::$is_syncing = $is_syncing;
170 176
 	}
@@ -173,6 +179,9 @@  discard block
 block discarded – undo
173 179
 		return (bool) self::$is_sending;
174 180
 	}
175 181
 
182
+	/**
183
+	 * @param boolean|null $is_sending
184
+	 */
176 185
 	static function set_is_sending( $is_sending ) {
177 186
 		self::$is_sending = $is_sending;
178 187
 	}
Please login to merge, or discard this patch.
packages/sync/legacy/class.jetpack-sync-wp-replicastore.php 1 patch
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -447,6 +447,10 @@  discard block
 block discarded – undo
447 447
 	}
448 448
 
449 449
 	// functions
450
+
451
+	/**
452
+	 * @param string $name
453
+	 */
450 454
 	public function get_callable( $name ) {
451 455
 		$value = get_option( 'jetpack_' . $name );
452 456
 
@@ -738,6 +742,9 @@  discard block
 block discarded – undo
738 742
 		return $histogram;
739 743
 	}
740 744
 
745
+	/**
746
+	 * @param string|null $id_column
747
+	 */
741 748
 	private function table_checksum( $table, $columns, $id_column, $where_sql = '1=1', $min_id = null, $max_id = null, $strip_non_ascii = true, $salt = '' ) {
742 749
 		global $wpdb;
743 750
 
@@ -791,6 +798,9 @@  discard block
 block discarded – undo
791 798
 		return 'sum';
792 799
 	}
793 800
 
801
+	/**
802
+	 * @param string $where_sql
803
+	 */
794 804
 	private function meta_count( $table, $where_sql, $min_id, $max_id ) {
795 805
 		global $wpdb;
796 806
 
Please login to merge, or discard this patch.
tools/import-translations.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 /**
23 23
  * Converts GlotPress URL into a GlotPress API URL
24 24
  *
25
- * @param sring $url URL
25
+ * @param string $url URL
26 26
  * @return sstring API URL
27 27
  */
28 28
 function apize_url( $url ) {
Please login to merge, or discard this patch.
class.jetpack.php 1 patch
Doc Comments   +25 added lines, -15 removed lines patch added patch discarded remove patch
@@ -759,7 +759,7 @@  discard block
 block discarded – undo
759 759
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
760 760
 	 *
761 761
 	 * @param $domains
762
-	 * @return array
762
+	 * @return string[]
763 763
 	 */
764 764
 	function allow_wpcom_domain( $domains ) {
765 765
 		if ( empty( $domains ) ) {
@@ -1279,7 +1279,7 @@  discard block
 block discarded – undo
1279 1279
 	}
1280 1280
 	/**
1281 1281
 	 * Does the network allow admins to add new users.
1282
-	 * @return boolian
1282
+	 * @return boolean
1283 1283
 	 */
1284 1284
 	static function network_add_new_users( $option = null ) {
1285 1285
 		return (bool) get_site_option( 'add_new_users' );
@@ -1384,7 +1384,7 @@  discard block
 block discarded – undo
1384 1384
 	 * database which could be set to anything as opposed to what this function returns.
1385 1385
 	 * @param  bool  $option
1386 1386
 	 *
1387
-	 * @return boolean
1387
+	 * @return string
1388 1388
 	 */
1389 1389
 	public function is_main_network_option( $option ) {
1390 1390
 		// return '1' or ''
@@ -1395,7 +1395,7 @@  discard block
 block discarded – undo
1395 1395
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1396 1396
 	 *
1397 1397
 	 * @param  string  $option
1398
-	 * @return boolean
1398
+	 * @return string
1399 1399
 	 */
1400 1400
 	public function is_multisite( $option ) {
1401 1401
 		return (string) (bool) is_multisite();
@@ -1457,7 +1457,7 @@  discard block
 block discarded – undo
1457 1457
 
1458 1458
 	/**
1459 1459
 	 * Returns true if the site has file write access false otherwise.
1460
-	 * @return string ( '1' | '0' )
1460
+	 * @return integer ( '1' | '0' )
1461 1461
 	 **/
1462 1462
 	public static function file_system_write_access() {
1463 1463
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2613,7 +2613,7 @@  discard block
 block discarded – undo
2613 2613
 	 *
2614 2614
 	 * @param string $tag Tag as it appears in each module heading.
2615 2615
 	 *
2616
-	 * @return mixed
2616
+	 * @return string
2617 2617
 	 */
2618 2618
 	public static function translate_module_tag( $tag ) {
2619 2619
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2785,8 +2785,8 @@  discard block
 block discarded – undo
2785 2785
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2786 2786
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2787 2787
 	 *
2788
-	 * @param $string
2789
-	 * @return mixed
2788
+	 * @param string $string
2789
+	 * @return string|null
2790 2790
 	 */
2791 2791
 	public static function alias_directories( $string ) {
2792 2792
 		// ABSPATH has a trailing slash.
@@ -3074,6 +3074,9 @@  discard block
 block discarded – undo
3074 3074
 	}
3075 3075
 
3076 3076
 /* Installation */
3077
+	/**
3078
+	 * @param string $message
3079
+	 */
3077 3080
 	public static function bail_on_activation( $message, $deactivate = true ) {
3078 3081
 ?>
3079 3082
 <!doctype html>
@@ -3807,7 +3810,7 @@  discard block
 block discarded – undo
3807 3810
 	 * Add help to the Jetpack page
3808 3811
 	 *
3809 3812
 	 * @since Jetpack (1.2.3)
3810
-	 * @return false if not the Jetpack page
3813
+	 * @return false|null if not the Jetpack page
3811 3814
 	 */
3812 3815
 	function admin_help() {
3813 3816
 		$current_screen = get_current_screen();
@@ -4689,6 +4692,7 @@  discard block
 block discarded – undo
4689 4692
 	/**
4690 4693
 	 * Returns the requested Jetpack API URL
4691 4694
 	 *
4695
+	 * @param string $relative_url
4692 4696
 	 * @return string
4693 4697
 	 */
4694 4698
 	public static function api_url( $relative_url ) {
@@ -4697,6 +4701,7 @@  discard block
 block discarded – undo
4697 4701
 
4698 4702
 	/**
4699 4703
 	 * Some hosts disable the OpenSSL extension and so cannot make outgoing HTTPS requsets
4704
+	 * @param string $url
4700 4705
 	 */
4701 4706
 	public static function fix_url_for_bad_hosts( $url ) {
4702 4707
 		if ( 0 !== strpos( $url, 'https://' ) ) {
@@ -4884,6 +4889,7 @@  discard block
 block discarded – undo
4884 4889
 	 * Note these tokens are unique per call, NOT static per site for connecting.
4885 4890
 	 *
4886 4891
 	 * @since 2.6
4892
+	 * @param string $action
4887 4893
 	 * @return array
4888 4894
 	 */
4889 4895
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
@@ -5392,7 +5398,6 @@  discard block
 block discarded – undo
5392 5398
 	/**
5393 5399
 	 * Report authentication status to the WP REST API.
5394 5400
 	 *
5395
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5396 5401
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5397 5402
 	 */
5398 5403
 	public function wp_rest_authentication_errors( $value ) {
@@ -5402,6 +5407,10 @@  discard block
 block discarded – undo
5402 5407
 		return $this->rest_authentication_status;
5403 5408
 	}
5404 5409
 
5410
+	/**
5411
+	 * @param integer $timestamp
5412
+	 * @param string $nonce
5413
+	 */
5405 5414
 	function add_nonce( $timestamp, $nonce ) {
5406 5415
 		global $wpdb;
5407 5416
 		static $nonces_used_this_request = array();
@@ -5547,6 +5556,7 @@  discard block
 block discarded – undo
5547 5556
 	 * @param string $key
5548 5557
 	 * @param string $value
5549 5558
 	 * @param bool $restate private
5559
+	 * @return string
5550 5560
 	 */
5551 5561
 	public static function state( $key = null, $value = null, $restate = false ) {
5552 5562
 		static $state = array();
@@ -5685,6 +5695,9 @@  discard block
 block discarded – undo
5685 5695
 		}
5686 5696
 	}
5687 5697
 
5698
+	/**
5699
+	 * @param string $url
5700
+	 */
5688 5701
 	public static function staticize_subdomain( $url ) {
5689 5702
 
5690 5703
 		// Extract hostname from URL
@@ -6235,9 +6248,7 @@  discard block
 block discarded – undo
6235 6248
 	 *
6236 6249
 	 * Attached to `style_loader_src` filter.
6237 6250
 	 *
6238
-	 * @param string $tag The tag that would link to the external asset.
6239 6251
 	 * @param string $handle The registered handle of the script in question.
6240
-	 * @param string $href The url of the asset in question.
6241 6252
 	 */
6242 6253
 	public static function set_suffix_on_min( $src, $handle ) {
6243 6254
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6424,8 +6435,8 @@  discard block
 block discarded – undo
6424 6435
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6425 6436
 	 *  - Domain root relative URLs `/feh.png`
6426 6437
 	 *
6427
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6428
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6438
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6439
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6429 6440
 	 *
6430 6441
 	 * @return mixed|string
6431 6442
 	 */
@@ -6724,7 +6735,6 @@  discard block
 block discarded – undo
6724 6735
 	}
6725 6736
 
6726 6737
 	/**
6727
-	 * @param mixed $result Value for the user's option
6728 6738
 	 * @return mixed
6729 6739
 	 */
6730 6740
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.