Completed
Push — try/block-editor-iframe ( 617cb2...d599c6 )
by Kirk
50:58 queued 44:19
created
class.jetpack.php 1 patch
Doc Comments   +39 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,16 +3071,25 @@  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_load( $module, $method ) {
3070 3078
 		$module = Jetpack::get_module_slug( $module );
3071 3079
 		add_action( 'jetpack_module_configuration_load_' . $module, $method );
3072 3080
 	}
3073 3081
 
3082
+	/**
3083
+	 * @param string $module
3084
+	 */
3074 3085
 	public static function module_configuration_head( $module, $method ) {
3075 3086
 		$module = Jetpack::get_module_slug( $module );
3076 3087
 		add_action( 'jetpack_module_configuration_head_' . $module, $method );
3077 3088
 	}
3078 3089
 
3090
+	/**
3091
+	 * @param string $module
3092
+	 */
3079 3093
 	public static function module_configuration_screen( $module, $method ) {
3080 3094
 		$module = Jetpack::get_module_slug( $module );
3081 3095
 		add_action( 'jetpack_module_configuration_screen_' . $module, $method );
@@ -3088,6 +3102,9 @@  discard block
 block discarded – undo
3088 3102
 
3089 3103
 /* Installation */
3090 3104
 
3105
+	/**
3106
+	 * @param string $message
3107
+	 */
3091 3108
 	public static function bail_on_activation( $message, $deactivate = true ) {
3092 3109
 ?>
3093 3110
 <!doctype html>
@@ -3822,7 +3839,7 @@  discard block
 block discarded – undo
3822 3839
 	 * Add help to the Jetpack page
3823 3840
 	 *
3824 3841
 	 * @since Jetpack (1.2.3)
3825
-	 * @return false if not the Jetpack page
3842
+	 * @return false|null if not the Jetpack page
3826 3843
 	 */
3827 3844
 	function admin_help() {
3828 3845
 		$current_screen = get_current_screen();
@@ -4657,6 +4674,9 @@  discard block
 block discarded – undo
4657 4674
 		return $url;
4658 4675
 	}
4659 4676
 
4677
+	/**
4678
+	 * @return string
4679
+	 */
4660 4680
 	public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) {
4661 4681
 		$actionurl = str_replace( '&amp;', '&', $actionurl );
4662 4682
 		return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
@@ -4824,6 +4844,7 @@  discard block
 block discarded – undo
4824 4844
 	/**
4825 4845
 	 * Returns the requested Jetpack API URL
4826 4846
 	 *
4847
+	 * @param string $relative_url
4827 4848
 	 * @return string
4828 4849
 	 */
4829 4850
 	public static function api_url( $relative_url ) {
@@ -5015,6 +5036,7 @@  discard block
 block discarded – undo
5015 5036
 	 * Note these tokens are unique per call, NOT static per site for connecting.
5016 5037
 	 *
5017 5038
 	 * @since 2.6
5039
+	 * @param string $action
5018 5040
 	 * @return array
5019 5041
 	 */
5020 5042
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
@@ -5551,7 +5573,6 @@  discard block
 block discarded – undo
5551 5573
 	/**
5552 5574
 	 * Report authentication status to the WP REST API.
5553 5575
 	 *
5554
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5555 5576
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5556 5577
 	 */
5557 5578
 	public function wp_rest_authentication_errors( $value ) {
@@ -5706,6 +5727,7 @@  discard block
 block discarded – undo
5706 5727
 	 * @param string $key
5707 5728
 	 * @param string $value
5708 5729
 	 * @param bool $restate private
5730
+	 * @return string
5709 5731
 	 */
5710 5732
 	public static function state( $key = null, $value = null, $restate = false ) {
5711 5733
 		static $state = array();
@@ -5762,6 +5784,9 @@  discard block
 block discarded – undo
5762 5784
 		Jetpack::state( null, null, true );
5763 5785
 	}
5764 5786
 
5787
+	/**
5788
+	 * @param string $file
5789
+	 */
5765 5790
 	public static function check_privacy( $file ) {
5766 5791
 		static $is_site_publicly_accessible = null;
5767 5792
 
@@ -6394,9 +6419,7 @@  discard block
 block discarded – undo
6394 6419
 	 *
6395 6420
 	 * Attached to `style_loader_src` filter.
6396 6421
 	 *
6397
-	 * @param string $tag The tag that would link to the external asset.
6398 6422
 	 * @param string $handle The registered handle of the script in question.
6399
-	 * @param string $href The url of the asset in question.
6400 6423
 	 */
6401 6424
 	public static function set_suffix_on_min( $src, $handle ) {
6402 6425
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6579,8 +6602,8 @@  discard block
 block discarded – undo
6579 6602
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6580 6603
 	 *  - Domain root relative URLs `/feh.png`
6581 6604
 	 *
6582
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6583
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6605
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6606
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6584 6607
 	 *
6585 6608
 	 * @return mixed|string
6586 6609
 	 */
@@ -6814,7 +6837,7 @@  discard block
 block discarded – undo
6814 6837
 	 *
6815 6838
 	 * @param string $option_name
6816 6839
 	 *
6817
-	 * @return bool
6840
+	 * @return false|null
6818 6841
 	 */
6819 6842
 	public static function jumpstart_has_updated_module_option( $option_name = '' ) {
6820 6843
 		// Bail if Jump Start has already been dismissed
@@ -6855,7 +6878,7 @@  discard block
 block discarded – undo
6855 6878
 	/**
6856 6879
 	 * Stores and prints out domains to prefetch for page speed optimization.
6857 6880
 	 *
6858
-	 * @param mixed $new_urls
6881
+	 * @param string[] $new_urls
6859 6882
 	 */
6860 6883
 	public static function dns_prefetch( $new_urls = null ) {
6861 6884
 		static $prefetch_urls = array();
@@ -6910,7 +6933,6 @@  discard block
 block discarded – undo
6910 6933
 	}
6911 6934
 
6912 6935
 	/**
6913
-	 * @param mixed $result Value for the user's option
6914 6936
 	 * @return mixed
6915 6937
 	 */
6916 6938
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.