Completed
Push — fix/remove-legacy-config-pages ( 3f91d0...3c9224 )
by
unknown
11:19
created
_inc/lib/class.jetpack-password-checker.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -410,7 +410,7 @@
 block discarded – undo
410 410
 	 *
411 411
 	 * @param Mixed $needle the needle.
412 412
 	 * @param Array $haystack the haystack.
413
-	 * @return is the needle not in the haystack?
413
+	 * @return boolean the needle not in the haystack?
414 414
 	 */
415 415
 	protected function negative_in_array( $needle, $haystack ) {
416 416
 		if ( in_array( $needle, $haystack, true ) ) {
Please login to merge, or discard this patch.
sync/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.
sync/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.
class.jetpack.php 1 patch
Doc Comments   +37 added lines, -17 removed lines patch added patch discarded remove patch
@@ -719,7 +719,7 @@  discard block
 block discarded – undo
719 719
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
720 720
 	 *
721 721
 	 * @param $domains
722
-	 * @return array
722
+	 * @return string[]
723 723
 	 */
724 724
 	function allow_wpcom_domain( $domains ) {
725 725
 		if ( empty( $domains ) ) {
@@ -1239,7 +1239,7 @@  discard block
 block discarded – undo
1239 1239
 	}
1240 1240
 	/**
1241 1241
 	 * Does the network allow admins to add new users.
1242
-	 * @return boolian
1242
+	 * @return boolean
1243 1243
 	 */
1244 1244
 	static function network_add_new_users( $option = null ) {
1245 1245
 		return (bool) get_site_option( 'add_new_users' );
@@ -1344,7 +1344,7 @@  discard block
 block discarded – undo
1344 1344
 	 * database which could be set to anything as opposed to what this function returns.
1345 1345
 	 * @param  bool  $option
1346 1346
 	 *
1347
-	 * @return boolean
1347
+	 * @return string
1348 1348
 	 */
1349 1349
 	public function is_main_network_option( $option ) {
1350 1350
 		// return '1' or ''
@@ -1355,7 +1355,7 @@  discard block
 block discarded – undo
1355 1355
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1356 1356
 	 *
1357 1357
 	 * @param  string  $option
1358
-	 * @return boolean
1358
+	 * @return string
1359 1359
 	 */
1360 1360
 	public function is_multisite( $option ) {
1361 1361
 		return (string) (bool) is_multisite();
@@ -1417,7 +1417,7 @@  discard block
 block discarded – undo
1417 1417
 
1418 1418
 	/**
1419 1419
 	 * Returns true if the site has file write access false otherwise.
1420
-	 * @return string ( '1' | '0' )
1420
+	 * @return integer ( '1' | '0' )
1421 1421
 	 **/
1422 1422
 	public static function file_system_write_access() {
1423 1423
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2148,6 +2148,7 @@  discard block
 block discarded – undo
2148 2148
 	 * @param int $user_id
2149 2149
 	 * @param string $token
2150 2150
 	 * return bool
2151
+	 * @param boolean $is_master_user
2151 2152
 	 */
2152 2153
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2153 2154
 		// not designed for concurrent updates
@@ -2550,6 +2551,7 @@  discard block
 block discarded – undo
2550 2551
 
2551 2552
 	/**
2552 2553
 	 * Like core's get_file_data implementation, but caches the result.
2554
+	 * @param string $file
2553 2555
 	 */
2554 2556
 	public static function get_file_data( $file, $headers ) {
2555 2557
 		//Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated
@@ -2586,7 +2588,7 @@  discard block
 block discarded – undo
2586 2588
 	 *
2587 2589
 	 * @param string $tag Tag as it appears in each module heading.
2588 2590
 	 *
2589
-	 * @return mixed
2591
+	 * @return string
2590 2592
 	 */
2591 2593
 	public static function translate_module_tag( $tag ) {
2592 2594
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2758,8 +2760,8 @@  discard block
 block discarded – undo
2758 2760
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2759 2761
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2760 2762
 	 *
2761
-	 * @param $string
2762
-	 * @return mixed
2763
+	 * @param string $string
2764
+	 * @return string|null
2763 2765
 	 */
2764 2766
 	public static function alias_directories( $string ) {
2765 2767
 		// ABSPATH has a trailing slash.
@@ -3039,6 +3041,9 @@  discard block
 block discarded – undo
3039 3041
 		return self::update_active_modules( $new );
3040 3042
 	}
3041 3043
 
3044
+	/**
3045
+	 * @param string $module
3046
+	 */
3042 3047
 	public static function enable_module_configurable( $module ) {
3043 3048
 		$module = Jetpack::get_module_slug( $module );
3044 3049
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -3066,6 +3071,9 @@  discard block
 block discarded – undo
3066 3071
 		return $url;
3067 3072
 	}
3068 3073
 
3074
+	/**
3075
+	 * @param string $module
3076
+	 */
3069 3077
 	public static function module_configuration_screen( $module, $method ) {
3070 3078
 		$module = Jetpack::get_module_slug( $module );
3071 3079
 		add_action( 'jetpack_module_configuration_screen_' . $module, $method );
@@ -3078,6 +3086,9 @@  discard block
 block discarded – undo
3078 3086
 
3079 3087
 /* Installation */
3080 3088
 
3089
+	/**
3090
+	 * @param string $message
3091
+	 */
3081 3092
 	public static function bail_on_activation( $message, $deactivate = true ) {
3082 3093
 ?>
3083 3094
 <!doctype html>
@@ -3812,7 +3823,7 @@  discard block
 block discarded – undo
3812 3823
 	 * Add help to the Jetpack page
3813 3824
 	 *
3814 3825
 	 * @since Jetpack (1.2.3)
3815
-	 * @return false if not the Jetpack page
3826
+	 * @return false|null if not the Jetpack page
3816 3827
 	 */
3817 3828
 	function admin_help() {
3818 3829
 		$current_screen = get_current_screen();
@@ -4631,6 +4642,9 @@  discard block
 block discarded – undo
4631 4642
 		return $url;
4632 4643
 	}
4633 4644
 
4645
+	/**
4646
+	 * @return string
4647
+	 */
4634 4648
 	public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) {
4635 4649
 		$actionurl = str_replace( '&amp;', '&', $actionurl );
4636 4650
 		return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
@@ -4690,6 +4704,7 @@  discard block
 block discarded – undo
4690 4704
 	/**
4691 4705
 	 * Returns the requested Jetpack API URL
4692 4706
 	 *
4707
+	 * @param string $relative_url
4693 4708
 	 * @return string
4694 4709
 	 */
4695 4710
 	public static function api_url( $relative_url ) {
@@ -4881,6 +4896,7 @@  discard block
 block discarded – undo
4881 4896
 	 * Note these tokens are unique per call, NOT static per site for connecting.
4882 4897
 	 *
4883 4898
 	 * @since 2.6
4899
+	 * @param string $action
4884 4900
 	 * @return array
4885 4901
 	 */
4886 4902
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
@@ -5415,7 +5431,6 @@  discard block
 block discarded – undo
5415 5431
 	/**
5416 5432
 	 * Report authentication status to the WP REST API.
5417 5433
 	 *
5418
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5419 5434
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5420 5435
 	 */
5421 5436
 	public function wp_rest_authentication_errors( $value ) {
@@ -5425,6 +5440,10 @@  discard block
 block discarded – undo
5425 5440
 		return $this->rest_authentication_status;
5426 5441
 	}
5427 5442
 
5443
+	/**
5444
+	 * @param integer $timestamp
5445
+	 * @param string $nonce
5446
+	 */
5428 5447
 	function add_nonce( $timestamp, $nonce ) {
5429 5448
 		global $wpdb;
5430 5449
 		static $nonces_used_this_request = array();
@@ -5570,6 +5589,7 @@  discard block
 block discarded – undo
5570 5589
 	 * @param string $key
5571 5590
 	 * @param string $value
5572 5591
 	 * @param bool $restate private
5592
+	 * @return string
5573 5593
 	 */
5574 5594
 	public static function state( $key = null, $value = null, $restate = false ) {
5575 5595
 		static $state = array();
@@ -5626,6 +5646,9 @@  discard block
 block discarded – undo
5626 5646
 		Jetpack::state( null, null, true );
5627 5647
 	}
5628 5648
 
5649
+	/**
5650
+	 * @param string $file
5651
+	 */
5629 5652
 	public static function check_privacy( $file ) {
5630 5653
 		static $is_site_publicly_accessible = null;
5631 5654
 
@@ -6258,9 +6281,7 @@  discard block
 block discarded – undo
6258 6281
 	 *
6259 6282
 	 * Attached to `style_loader_src` filter.
6260 6283
 	 *
6261
-	 * @param string $tag The tag that would link to the external asset.
6262 6284
 	 * @param string $handle The registered handle of the script in question.
6263
-	 * @param string $href The url of the asset in question.
6264 6285
 	 */
6265 6286
 	public static function set_suffix_on_min( $src, $handle ) {
6266 6287
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6443,8 +6464,8 @@  discard block
 block discarded – undo
6443 6464
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6444 6465
 	 *  - Domain root relative URLs `/feh.png`
6445 6466
 	 *
6446
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6447
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6467
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6468
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6448 6469
 	 *
6449 6470
 	 * @return mixed|string
6450 6471
 	 */
@@ -6678,7 +6699,7 @@  discard block
 block discarded – undo
6678 6699
 	 *
6679 6700
 	 * @param string $option_name
6680 6701
 	 *
6681
-	 * @return bool
6702
+	 * @return false|null
6682 6703
 	 */
6683 6704
 	public static function jumpstart_has_updated_module_option( $option_name = '' ) {
6684 6705
 		// Bail if Jump Start has already been dismissed
@@ -6719,7 +6740,7 @@  discard block
 block discarded – undo
6719 6740
 	/**
6720 6741
 	 * Stores and prints out domains to prefetch for page speed optimization.
6721 6742
 	 *
6722
-	 * @param mixed $new_urls
6743
+	 * @param string[] $new_urls
6723 6744
 	 */
6724 6745
 	public static function dns_prefetch( $new_urls = null ) {
6725 6746
 		static $prefetch_urls = array();
@@ -6774,7 +6795,6 @@  discard block
 block discarded – undo
6774 6795
 	}
6775 6796
 
6776 6797
 	/**
6777
-	 * @param mixed $result Value for the user's option
6778 6798
 	 * @return mixed
6779 6799
 	 */
6780 6800
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.
modules/carousel/jetpack-carousel.php 1 patch
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -129,6 +129,9 @@  discard block
 block discarded – undo
129 129
 		return apply_filters( 'jp_carousel_load_for_images_linked_to_file', false );
130 130
 	}
131 131
 
132
+	/**
133
+	 * @param string $version
134
+	 */
132 135
 	function asset_version( $version ) {
133 136
 		/**
134 137
 		 * Filter the version string used when enqueuing Carousel assets.
@@ -496,6 +499,9 @@  discard block
 block discarded – undo
496 499
 		return $attr;
497 500
 	}
498 501
 
502
+	/**
503
+	 * @param string $html
504
+	 */
499 505
 	function add_data_to_container( $html ) {
500 506
 		global $post;
501 507
 		if ( Jetpack_AMP_Support::is_amp_request() ) {
@@ -739,6 +745,9 @@  discard block
 block discarded – undo
739 745
 		return ( 1 == $value ) ? 1 : 0;
740 746
 	}
741 747
 
748
+	/**
749
+	 * @param string $name
750
+	 */
742 751
 	function settings_checkbox( $name, $label_text, $extra_text = '', $default_to_checked = true ) {
743 752
 		if ( empty( $name ) ) {
744 753
 			return;
@@ -754,6 +763,9 @@  discard block
 block discarded – undo
754 763
 		echo '</fieldset>';
755 764
 	}
756 765
 
766
+	/**
767
+	 * @param string $name
768
+	 */
757 769
 	function settings_select( $name, $values, $extra_text = '' ) {
758 770
 		if ( empty( $name ) || ! is_array( $values ) || empty( $values ) ) {
759 771
 			return;
Please login to merge, or discard this patch.