Completed
Pull Request — master (#10577)
by Brandon
07:54
created
3rd-party/qtranslate-x.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
  * @param string $url_orig Original URL.
19 19
  * @param array  $url_info  Pieces of original URL.
20 20
  *
21
- * @return bool
21
+ * @return false|string
22 22
  */
23 23
 function jetpack_no_qtranslate_rest_url_redirect( $url_lang, $url_orig, $url_info ) {
24 24
 	if ( false !== strpos( $url_info['wp-path'], 'wp-json/jetpack' ) ) {
Please login to merge, or discard this patch.
class.jetpack.php 1 patch
Doc Comments   +45 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1136,7 +1136,7 @@  discard block
 block discarded – undo
1136 1136
 	}
1137 1137
 	/**
1138 1138
 	 * Does the network allow admins to add new users.
1139
-	 * @return boolian
1139
+	 * @return boolean
1140 1140
 	 */
1141 1141
 	static function network_add_new_users( $option = null ) {
1142 1142
 		return (bool) get_site_option( 'add_new_users' );
@@ -1241,7 +1241,7 @@  discard block
 block discarded – undo
1241 1241
 	 * database which could be set to anything as opposed to what this function returns.
1242 1242
 	 * @param  bool  $option
1243 1243
 	 *
1244
-	 * @return boolean
1244
+	 * @return string
1245 1245
 	 */
1246 1246
 	public function is_main_network_option( $option ) {
1247 1247
 		// return '1' or ''
@@ -1252,7 +1252,7 @@  discard block
 block discarded – undo
1252 1252
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1253 1253
 	 *
1254 1254
 	 * @param  string  $option
1255
-	 * @return boolean
1255
+	 * @return string
1256 1256
 	 */
1257 1257
 	public function is_multisite( $option ) {
1258 1258
 		return (string) (bool) is_multisite();
@@ -1314,7 +1314,7 @@  discard block
 block discarded – undo
1314 1314
 
1315 1315
 	/**
1316 1316
 	 * Returns true if the site has file write access false otherwise.
1317
-	 * @return string ( '1' | '0' )
1317
+	 * @return integer ( '1' | '0' )
1318 1318
 	 **/
1319 1319
 	public static function file_system_write_access() {
1320 1320
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2170,6 +2170,7 @@  discard block
 block discarded – undo
2170 2170
 	 * @param int $user_id
2171 2171
 	 * @param string $token
2172 2172
 	 * return bool
2173
+	 * @param boolean $is_master_user
2173 2174
 	 */
2174 2175
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2175 2176
 		// not designed for concurrent updates
@@ -2572,6 +2573,7 @@  discard block
 block discarded – undo
2572 2573
 
2573 2574
 	/**
2574 2575
 	 * Like core's get_file_data implementation, but caches the result.
2576
+	 * @param string $file
2575 2577
 	 */
2576 2578
 	public static function get_file_data( $file, $headers ) {
2577 2579
 		//Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated
@@ -2608,7 +2610,7 @@  discard block
 block discarded – undo
2608 2610
 	 *
2609 2611
 	 * @param string $tag Tag as it appears in each module heading.
2610 2612
 	 *
2611
-	 * @return mixed
2613
+	 * @return string
2612 2614
 	 */
2613 2615
 	public static function translate_module_tag( $tag ) {
2614 2616
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2773,8 +2775,8 @@  discard block
 block discarded – undo
2773 2775
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2774 2776
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2775 2777
 	 *
2776
-	 * @param $string
2777
-	 * @return mixed
2778
+	 * @param string $string
2779
+	 * @return string|null
2778 2780
 	 */
2779 2781
 	public static function alias_directories( $string ) {
2780 2782
 		// ABSPATH has a trailing slash.
@@ -3054,6 +3056,9 @@  discard block
 block discarded – undo
3054 3056
 		return self::update_active_modules( $new );
3055 3057
 	}
3056 3058
 
3059
+	/**
3060
+	 * @param string $module
3061
+	 */
3057 3062
 	public static function enable_module_configurable( $module ) {
3058 3063
 		$module = Jetpack::get_module_slug( $module );
3059 3064
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -3064,21 +3069,33 @@  discard block
 block discarded – undo
3064 3069
 		return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) );
3065 3070
 	}
3066 3071
 
3072
+	/**
3073
+	 * @param string $module
3074
+	 */
3067 3075
 	public static function module_configuration_load( $module, $method ) {
3068 3076
 		$module = Jetpack::get_module_slug( $module );
3069 3077
 		add_action( 'jetpack_module_configuration_load_' . $module, $method );
3070 3078
 	}
3071 3079
 
3080
+	/**
3081
+	 * @param string $module
3082
+	 */
3072 3083
 	public static function module_configuration_head( $module, $method ) {
3073 3084
 		$module = Jetpack::get_module_slug( $module );
3074 3085
 		add_action( 'jetpack_module_configuration_head_' . $module, $method );
3075 3086
 	}
3076 3087
 
3088
+	/**
3089
+	 * @param string $module
3090
+	 */
3077 3091
 	public static function module_configuration_screen( $module, $method ) {
3078 3092
 		$module = Jetpack::get_module_slug( $module );
3079 3093
 		add_action( 'jetpack_module_configuration_screen_' . $module, $method );
3080 3094
 	}
3081 3095
 
3096
+	/**
3097
+	 * @param string $module
3098
+	 */
3082 3099
 	public static function module_configuration_activation_screen( $module, $method ) {
3083 3100
 		$module = Jetpack::get_module_slug( $module );
3084 3101
 		add_action( 'display_activate_module_setting_' . $module, $method );
@@ -3086,6 +3103,9 @@  discard block
 block discarded – undo
3086 3103
 
3087 3104
 /* Installation */
3088 3105
 
3106
+	/**
3107
+	 * @param string $message
3108
+	 */
3089 3109
 	public static function bail_on_activation( $message, $deactivate = true ) {
3090 3110
 ?>
3091 3111
 <!doctype html>
@@ -3842,7 +3862,7 @@  discard block
 block discarded – undo
3842 3862
 	 * Add help to the Jetpack page
3843 3863
 	 *
3844 3864
 	 * @since Jetpack (1.2.3)
3845
-	 * @return false if not the Jetpack page
3865
+	 * @return false|null if not the Jetpack page
3846 3866
 	 */
3847 3867
 	function admin_help() {
3848 3868
 		$current_screen = get_current_screen();
@@ -4943,6 +4963,7 @@  discard block
 block discarded – undo
4943 4963
 	/**
4944 4964
 	 * Returns the requested Jetpack API URL
4945 4965
 	 *
4966
+	 * @param string $relative_url
4946 4967
 	 * @return string
4947 4968
 	 */
4948 4969
 	public static function api_url( $relative_url ) {
@@ -5134,6 +5155,7 @@  discard block
 block discarded – undo
5134 5155
 	 * Note these tokens are unique per call, NOT static per site for connecting.
5135 5156
 	 *
5136 5157
 	 * @since 2.6
5158
+	 * @param string $action
5137 5159
 	 * @return array
5138 5160
 	 */
5139 5161
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
@@ -5667,7 +5689,6 @@  discard block
 block discarded – undo
5667 5689
 	/**
5668 5690
 	 * Report authentication status to the WP REST API.
5669 5691
 	 *
5670
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5671 5692
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5672 5693
 	 */
5673 5694
 	public function wp_rest_authentication_errors( $value ) {
@@ -5677,6 +5698,10 @@  discard block
 block discarded – undo
5677 5698
 		return $this->rest_authentication_status;
5678 5699
 	}
5679 5700
 
5701
+	/**
5702
+	 * @param integer $timestamp
5703
+	 * @param string $nonce
5704
+	 */
5680 5705
 	function add_nonce( $timestamp, $nonce ) {
5681 5706
 		global $wpdb;
5682 5707
 		static $nonces_used_this_request = array();
@@ -5822,6 +5847,7 @@  discard block
 block discarded – undo
5822 5847
 	 * @param string $key
5823 5848
 	 * @param string $value
5824 5849
 	 * @param bool $restate private
5850
+	 * @return string
5825 5851
 	 */
5826 5852
 	public static function state( $key = null, $value = null, $restate = false ) {
5827 5853
 		static $state = array();
@@ -5878,6 +5904,9 @@  discard block
 block discarded – undo
5878 5904
 		Jetpack::state( null, null, true );
5879 5905
 	}
5880 5906
 
5907
+	/**
5908
+	 * @param string $file
5909
+	 */
5881 5910
 	public static function check_privacy( $file ) {
5882 5911
 		static $is_site_publicly_accessible = null;
5883 5912
 
@@ -5960,6 +5989,9 @@  discard block
 block discarded – undo
5960 5989
 		}
5961 5990
 	}
5962 5991
 
5992
+	/**
5993
+	 * @param string $url
5994
+	 */
5963 5995
 	public static function staticize_subdomain( $url ) {
5964 5996
 
5965 5997
 		// Extract hostname from URL
@@ -6495,9 +6527,7 @@  discard block
 block discarded – undo
6495 6527
 	 *
6496 6528
 	 * Attached to `style_loader_src` filter.
6497 6529
 	 *
6498
-	 * @param string $tag The tag that would link to the external asset.
6499 6530
 	 * @param string $handle The registered handle of the script in question.
6500
-	 * @param string $href The url of the asset in question.
6501 6531
 	 */
6502 6532
 	public static function set_suffix_on_min( $src, $handle ) {
6503 6533
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6678,8 +6708,8 @@  discard block
 block discarded – undo
6678 6708
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6679 6709
 	 *  - Domain root relative URLs `/feh.png`
6680 6710
 	 *
6681
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6682
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6711
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6712
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6683 6713
 	 *
6684 6714
 	 * @return mixed|string
6685 6715
 	 */
@@ -6908,7 +6938,7 @@  discard block
 block discarded – undo
6908 6938
 	 *
6909 6939
 	 * @param string $option_name
6910 6940
 	 *
6911
-	 * @return bool
6941
+	 * @return false|null
6912 6942
 	 */
6913 6943
 	public static function jumpstart_has_updated_module_option( $option_name = '' ) {
6914 6944
 		// Bail if Jump Start has already been dismissed
@@ -6949,7 +6979,7 @@  discard block
 block discarded – undo
6949 6979
 	/**
6950 6980
 	 * Stores and prints out domains to prefetch for page speed optimization.
6951 6981
 	 *
6952
-	 * @param mixed $new_urls
6982
+	 * @param string[] $new_urls
6953 6983
 	 */
6954 6984
 	public static function dns_prefetch( $new_urls = null ) {
6955 6985
 		static $prefetch_urls = array();
@@ -6995,7 +7025,6 @@  discard block
 block discarded – undo
6995 7025
 	}
6996 7026
 
6997 7027
 	/**
6998
-	 * @param mixed $result Value for the user's option
6999 7028
 	 * @return mixed
7000 7029
 	 */
7001 7030
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.