Completed
Push — try/connection-package-fix ( ca4cdd )
by
unknown
07:17
created
_inc/lib/plugins.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -95,6 +95,9 @@
 block discarded – undo
95 95
 		return (array) $upgrader->skin->get_upgrade_messages();
96 96
 	}
97 97
 
98
+	 /**
99
+	  * @param string $plugin_slug
100
+	  */
98 101
 	 protected static function generate_wordpress_org_plugin_download_link( $plugin_slug ) {
99 102
 		return "https://downloads.wordpress.org/plugin/$plugin_slug.latest-stable.zip";
100 103
 	 }
Please login to merge, or discard this patch.
packages/connection/tests/php/Manager.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
 	 * Mock a global function and make it return a certain value.
116 116
 	 *
117 117
 	 * @param string $function_name Name of the function.
118
-	 * @param mixed  $return_value  Return value of the function.
118
+	 * @param integer  $return_value  Return value of the function.
119 119
 	 * @return phpmock\Mock The mock object.
120 120
 	 */
121 121
 	protected function mock_function( $function_name, $return_value = null ) {
Please login to merge, or discard this patch.
packages/sync/src/modules/Callables.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -171,6 +171,9 @@
 block discarded – undo
171 171
 		update_option( 'jetpack_plugin_api_action_links', $plugins_action_links );
172 172
 	}
173 173
 
174
+	/**
175
+	 * @param integer $checksum
176
+	 */
174 177
 	public function should_send_callable( $callable_checksums, $name, $checksum ) {
175 178
 		$idc_override_callables = array(
176 179
 			'main_network_site',
Please login to merge, or discard this patch.
packages/connection/src/Manager.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	 * Is the user the connection owner.
107 107
 	 *
108 108
 	 * @param Integer $user_id the user identifier.
109
-	 * @return Boolean is the user the connection owner?
109
+	 * @return integer is the user the connection owner?
110 110
 	 */
111 111
 	public function is_connection_owner( $user_id ) {
112 112
 		return $user_id;
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
 	 *
571 571
 	 * @param int|false    $user_id   false: Return the Blog Token. int: Return that user's User Token.
572 572
 	 * @param string|false $token_key If provided, check that the token matches the provided input.
573
-	 * @param bool|true    $suppress_errors If true, return a falsy value when the token isn't found; When false, return a descriptive WP_Error when the token isn't found.
573
+	 * @param boolean    $suppress_errors If true, return a falsy value when the token isn't found; When false, return a descriptive WP_Error when the token isn't found.
574 574
 	 *
575 575
 	 * @return object|false
576 576
 	 */
Please login to merge, or discard this patch.
class.jetpack.php 1 patch
Doc Comments   +37 added lines, -16 removed lines patch added patch discarded remove patch
@@ -758,7 +758,7 @@  discard block
 block discarded – undo
758 758
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
759 759
 	 *
760 760
 	 * @param $domains
761
-	 * @return array
761
+	 * @return string[]
762 762
 	 */
763 763
 	function allow_wpcom_domain( $domains ) {
764 764
 		if ( empty( $domains ) ) {
@@ -1254,7 +1254,7 @@  discard block
 block discarded – undo
1254 1254
 	}
1255 1255
 	/**
1256 1256
 	 * Does the network allow admins to add new users.
1257
-	 * @return boolian
1257
+	 * @return boolean
1258 1258
 	 */
1259 1259
 	static function network_add_new_users( $option = null ) {
1260 1260
 		return (bool) get_site_option( 'add_new_users' );
@@ -1359,7 +1359,7 @@  discard block
 block discarded – undo
1359 1359
 	 * database which could be set to anything as opposed to what this function returns.
1360 1360
 	 * @param  bool  $option
1361 1361
 	 *
1362
-	 * @return boolean
1362
+	 * @return string
1363 1363
 	 */
1364 1364
 	public function is_main_network_option( $option ) {
1365 1365
 		// return '1' or ''
@@ -1370,7 +1370,7 @@  discard block
 block discarded – undo
1370 1370
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1371 1371
 	 *
1372 1372
 	 * @param  string  $option
1373
-	 * @return boolean
1373
+	 * @return string
1374 1374
 	 */
1375 1375
 	public function is_multisite( $option ) {
1376 1376
 		return (string) (bool) is_multisite();
@@ -1432,7 +1432,7 @@  discard block
 block discarded – undo
1432 1432
 
1433 1433
 	/**
1434 1434
 	 * Returns true if the site has file write access false otherwise.
1435
-	 * @return string ( '1' | '0' )
1435
+	 * @return integer ( '1' | '0' )
1436 1436
 	 **/
1437 1437
 	public static function file_system_write_access() {
1438 1438
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2159,6 +2159,7 @@  discard block
 block discarded – undo
2159 2159
 	 * @param int $user_id
2160 2160
 	 * @param string $token
2161 2161
 	 * return bool
2162
+	 * @param boolean $is_master_user
2162 2163
 	 */
2163 2164
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2164 2165
 		// not designed for concurrent updates
@@ -2605,7 +2606,7 @@  discard block
 block discarded – undo
2605 2606
 	 *
2606 2607
 	 * @param string $tag Tag as it appears in each module heading.
2607 2608
 	 *
2608
-	 * @return mixed
2609
+	 * @return string
2609 2610
 	 */
2610 2611
 	public static function translate_module_tag( $tag ) {
2611 2612
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2777,8 +2778,8 @@  discard block
 block discarded – undo
2777 2778
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2778 2779
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2779 2780
 	 *
2780
-	 * @param $string
2781
-	 * @return mixed
2781
+	 * @param string $string
2782
+	 * @return string|null
2782 2783
 	 */
2783 2784
 	public static function alias_directories( $string ) {
2784 2785
 		// ABSPATH has a trailing slash.
@@ -3038,6 +3039,9 @@  discard block
 block discarded – undo
3038 3039
 		return self::update_active_modules( $new );
3039 3040
 	}
3040 3041
 
3042
+	/**
3043
+	 * @param string $module
3044
+	 */
3041 3045
 	public static function enable_module_configurable( $module ) {
3042 3046
 		$module = Jetpack::get_module_slug( $module );
3043 3047
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -3066,6 +3070,9 @@  discard block
 block discarded – undo
3066 3070
 	}
3067 3071
 
3068 3072
 /* Installation */
3073
+	/**
3074
+	 * @param string $message
3075
+	 */
3069 3076
 	public static function bail_on_activation( $message, $deactivate = true ) {
3070 3077
 ?>
3071 3078
 <!doctype html>
@@ -3800,7 +3807,7 @@  discard block
 block discarded – undo
3800 3807
 	 * Add help to the Jetpack page
3801 3808
 	 *
3802 3809
 	 * @since Jetpack (1.2.3)
3803
-	 * @return false if not the Jetpack page
3810
+	 * @return false|null if not the Jetpack page
3804 3811
 	 */
3805 3812
 	function admin_help() {
3806 3813
 		$current_screen = get_current_screen();
@@ -4636,6 +4643,9 @@  discard block
 block discarded – undo
4636 4643
 		return $url;
4637 4644
 	}
4638 4645
 
4646
+	/**
4647
+	 * @return string
4648
+	 */
4639 4649
 	public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) {
4640 4650
 		$actionurl = str_replace( '&amp;', '&', $actionurl );
4641 4651
 		return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
@@ -4695,6 +4705,7 @@  discard block
 block discarded – undo
4695 4705
 	/**
4696 4706
 	 * Returns the requested Jetpack API URL
4697 4707
 	 *
4708
+	 * @param string $relative_url
4698 4709
 	 * @return string
4699 4710
 	 */
4700 4711
 	public static function api_url( $relative_url ) {
@@ -4703,6 +4714,8 @@  discard block
 block discarded – undo
4703 4714
 
4704 4715
 	/**
4705 4716
 	 * Some hosts disable the OpenSSL extension and so cannot make outgoing HTTPS requsets
4717
+	 * @param string $url
4718
+	 * @return string
4706 4719
 	 */
4707 4720
 	public static function fix_url_for_bad_hosts( $url ) {
4708 4721
 		if ( 0 !== strpos( $url, 'https://' ) ) {
@@ -4890,6 +4903,7 @@  discard block
 block discarded – undo
4890 4903
 	 * Note these tokens are unique per call, NOT static per site for connecting.
4891 4904
 	 *
4892 4905
 	 * @since 2.6
4906
+	 * @param string $action
4893 4907
 	 * @return array
4894 4908
 	 */
4895 4909
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
@@ -5452,7 +5466,6 @@  discard block
 block discarded – undo
5452 5466
 	/**
5453 5467
 	 * Report authentication status to the WP REST API.
5454 5468
 	 *
5455
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5456 5469
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5457 5470
 	 */
5458 5471
 	public function wp_rest_authentication_errors( $value ) {
@@ -5462,6 +5475,10 @@  discard block
 block discarded – undo
5462 5475
 		return $this->rest_authentication_status;
5463 5476
 	}
5464 5477
 
5478
+	/**
5479
+	 * @param integer $timestamp
5480
+	 * @param string $nonce
5481
+	 */
5465 5482
 	function add_nonce( $timestamp, $nonce ) {
5466 5483
 		global $wpdb;
5467 5484
 		static $nonces_used_this_request = array();
@@ -5607,6 +5624,7 @@  discard block
 block discarded – undo
5607 5624
 	 * @param string $key
5608 5625
 	 * @param string $value
5609 5626
 	 * @param bool $restate private
5627
+	 * @return string
5610 5628
 	 */
5611 5629
 	public static function state( $key = null, $value = null, $restate = false ) {
5612 5630
 		static $state = array();
@@ -5663,6 +5681,9 @@  discard block
 block discarded – undo
5663 5681
 		Jetpack::state( null, null, true );
5664 5682
 	}
5665 5683
 
5684
+	/**
5685
+	 * @param string $file
5686
+	 */
5666 5687
 	public static function check_privacy( $file ) {
5667 5688
 		static $is_site_publicly_accessible = null;
5668 5689
 
@@ -5745,6 +5766,9 @@  discard block
 block discarded – undo
5745 5766
 		}
5746 5767
 	}
5747 5768
 
5769
+	/**
5770
+	 * @param string $url
5771
+	 */
5748 5772
 	public static function staticize_subdomain( $url ) {
5749 5773
 
5750 5774
 		// Extract hostname from URL
@@ -6300,9 +6324,7 @@  discard block
 block discarded – undo
6300 6324
 	 *
6301 6325
 	 * Attached to `style_loader_src` filter.
6302 6326
 	 *
6303
-	 * @param string $tag The tag that would link to the external asset.
6304 6327
 	 * @param string $handle The registered handle of the script in question.
6305
-	 * @param string $href The url of the asset in question.
6306 6328
 	 */
6307 6329
 	public static function set_suffix_on_min( $src, $handle ) {
6308 6330
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6489,8 +6511,8 @@  discard block
 block discarded – undo
6489 6511
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6490 6512
 	 *  - Domain root relative URLs `/feh.png`
6491 6513
 	 *
6492
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6493
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6514
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6515
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6494 6516
 	 *
6495 6517
 	 * @return mixed|string
6496 6518
 	 */
@@ -6733,7 +6755,7 @@  discard block
 block discarded – undo
6733 6755
 	/**
6734 6756
 	 * Stores and prints out domains to prefetch for page speed optimization.
6735 6757
 	 *
6736
-	 * @param mixed $new_urls
6758
+	 * @param string[] $new_urls
6737 6759
 	 */
6738 6760
 	public static function dns_prefetch( $new_urls = null ) {
6739 6761
 		static $prefetch_urls = array();
@@ -6789,7 +6811,6 @@  discard block
 block discarded – undo
6789 6811
 	}
6790 6812
 
6791 6813
 	/**
6792
-	 * @param mixed $result Value for the user's option
6793 6814
 	 * @return mixed
6794 6815
 	 */
6795 6816
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
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
@@ -164,6 +164,9 @@  discard block
 block discarded – undo
164 164
 		self::set_is_sending( null );
165 165
 	}
166 166
 
167
+	/**
168
+	 * @param boolean|null $is_importing
169
+	 */
167 170
 	static function set_importing( $is_importing ) {
168 171
 		// set to NULL to revert to WP_IMPORTING, the standard behavior
169 172
 		self::$is_importing = $is_importing;
@@ -198,6 +201,9 @@  discard block
 block discarded – undo
198 201
 		return (bool) self::$is_syncing || ( defined( 'REST_API_REQUEST' ) && REST_API_REQUEST );
199 202
 	}
200 203
 
204
+	/**
205
+	 * @param boolean|null $is_syncing
206
+	 */
201 207
 	static function set_is_syncing( $is_syncing ) {
202 208
 		self::$is_syncing = $is_syncing;
203 209
 	}
@@ -206,6 +212,9 @@  discard block
 block discarded – undo
206 212
 		return (bool) self::$is_sending;
207 213
 	}
208 214
 
215
+	/**
216
+	 * @param null|boolean $is_sending
217
+	 */
209 218
 	static function set_is_sending( $is_sending ) {
210 219
 		self::$is_sending = $is_sending;
211 220
 	}
Please login to merge, or discard this patch.
packages/sync/src/Sender.php 1 patch
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -73,6 +73,9 @@  discard block
 block discarded – undo
73 73
 		return (float) get_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, 0 );
74 74
 	}
75 75
 
76
+	/**
77
+	 * @param integer $time
78
+	 */
76 79
 	public function set_next_sync_time( $time, $queue_name ) {
77 80
 		return update_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, $time, true );
78 81
 	}
@@ -103,6 +106,9 @@  discard block
 block discarded – undo
103 106
 		return $this->do_sync_and_set_delays( $this->sync_queue );
104 107
 	}
105 108
 
109
+	/**
110
+	 * @param \Jetpack_Sync_Queue $queue
111
+	 */
106 112
 	public function do_sync_and_set_delays( $queue ) {
107 113
 		// don't sync if importing
108 114
 		if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) {
@@ -360,6 +366,10 @@  discard block
 block discarded – undo
360 366
 	}
361 367
 
362 368
 	// in seconds
369
+
370
+	/**
371
+	 * @param double $seconds
372
+	 */
363 373
 	function set_max_dequeue_time( $seconds ) {
364 374
 		$this->max_dequeue_time = $seconds;
365 375
 	}
Please login to merge, or discard this patch.
packages/sync/src/modules/Users.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -99,6 +99,9 @@
 block discarded – undo
99 99
 		return $user;
100 100
 	}
101 101
 
102
+	/**
103
+	 * @param \WP_User|null $user
104
+	 */
102 105
 	public function expand_user( $user ) {
103 106
 		if ( ! is_object( $user ) ) {
104 107
 			return null;
Please login to merge, or discard this patch.
packages/sync/src/Listener.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -177,6 +177,9 @@
 block discarded – undo
177 177
 		$queue->add_all( $data_to_enqueue );
178 178
 	}
179 179
 
180
+	/**
181
+	 * @param \Jetpack_Sync_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 ( \Jetpack_Sync_Settings::is_sending() ) {
Please login to merge, or discard this patch.