Completed
Push — add/user-authentication ( 09a282...a100db )
by
unknown
12:14 queued 05:57
created
class.jetpack.php 1 patch
Doc Comments   +31 added lines, -16 removed lines patch added patch discarded remove patch
@@ -700,7 +700,7 @@  discard block
 block discarded – undo
700 700
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
701 701
 	 *
702 702
 	 * @param $domains
703
-	 * @return array
703
+	 * @return string[]
704 704
 	 */
705 705
 	function allow_wpcom_domain( $domains ) {
706 706
 		if ( empty( $domains ) ) {
@@ -1116,7 +1116,7 @@  discard block
 block discarded – undo
1116 1116
 	}
1117 1117
 	/**
1118 1118
 	 * Does the network allow admins to add new users.
1119
-	 * @return boolian
1119
+	 * @return boolean
1120 1120
 	 */
1121 1121
 	static function network_add_new_users( $option = null ) {
1122 1122
 		return (bool) get_site_option( 'add_new_users' );
@@ -1221,7 +1221,7 @@  discard block
 block discarded – undo
1221 1221
 	 * database which could be set to anything as opposed to what this function returns.
1222 1222
 	 * @param  bool  $option
1223 1223
 	 *
1224
-	 * @return boolean
1224
+	 * @return string
1225 1225
 	 */
1226 1226
 	public function is_main_network_option( $option ) {
1227 1227
 		// return '1' or ''
@@ -1232,7 +1232,7 @@  discard block
 block discarded – undo
1232 1232
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1233 1233
 	 *
1234 1234
 	 * @param  string  $option
1235
-	 * @return boolean
1235
+	 * @return string
1236 1236
 	 */
1237 1237
 	public function is_multisite( $option ) {
1238 1238
 		return (string) (bool) is_multisite();
@@ -1294,7 +1294,7 @@  discard block
 block discarded – undo
1294 1294
 
1295 1295
 	/**
1296 1296
 	 * Returns true if the site has file write access false otherwise.
1297
-	 * @return string ( '1' | '0' )
1297
+	 * @return integer ( '1' | '0' )
1298 1298
 	 **/
1299 1299
 	public static function file_system_write_access() {
1300 1300
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2021,6 +2021,7 @@  discard block
 block discarded – undo
2021 2021
 	 * @param int $user_id
2022 2022
 	 * @param string $token
2023 2023
 	 * return bool
2024
+	 * @param boolean $is_master_user
2024 2025
 	 */
2025 2026
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2026 2027
 		// not designed for concurrent updates
@@ -2465,7 +2466,7 @@  discard block
 block discarded – undo
2465 2466
 	 *
2466 2467
 	 * @param string $tag Tag as it appears in each module heading.
2467 2468
 	 *
2468
-	 * @return mixed
2469
+	 * @return string
2469 2470
 	 */
2470 2471
 	public static function translate_module_tag( $tag ) {
2471 2472
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2637,8 +2638,8 @@  discard block
 block discarded – undo
2637 2638
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2638 2639
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2639 2640
 	 *
2640
-	 * @param $string
2641
-	 * @return mixed
2641
+	 * @param string $string
2642
+	 * @return string|null
2642 2643
 	 */
2643 2644
 	public static function alias_directories( $string ) {
2644 2645
 		// ABSPATH has a trailing slash.
@@ -2898,6 +2899,9 @@  discard block
 block discarded – undo
2898 2899
 		return self::update_active_modules( $new );
2899 2900
 	}
2900 2901
 
2902
+	/**
2903
+	 * @param string $module
2904
+	 */
2901 2905
 	public static function enable_module_configurable( $module ) {
2902 2906
 		$module = Jetpack::get_module_slug( $module );
2903 2907
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -2926,6 +2930,9 @@  discard block
 block discarded – undo
2926 2930
 	}
2927 2931
 
2928 2932
 /* Installation */
2933
+	/**
2934
+	 * @param string $message
2935
+	 */
2929 2936
 	public static function bail_on_activation( $message, $deactivate = true ) {
2930 2937
 ?>
2931 2938
 <!doctype html>
@@ -3662,7 +3669,7 @@  discard block
 block discarded – undo
3662 3669
 	 * Add help to the Jetpack page
3663 3670
 	 *
3664 3671
 	 * @since Jetpack (1.2.3)
3665
-	 * @return false if not the Jetpack page
3672
+	 * @return false|null if not the Jetpack page
3666 3673
 	 */
3667 3674
 	function admin_help() {
3668 3675
 		$current_screen = get_current_screen();
@@ -4499,6 +4506,9 @@  discard block
 block discarded – undo
4499 4506
 		return $url;
4500 4507
 	}
4501 4508
 
4509
+	/**
4510
+	 * @return string
4511
+	 */
4502 4512
 	public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) {
4503 4513
 		$actionurl = str_replace( '&amp;', '&', $actionurl );
4504 4514
 		return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
@@ -4559,6 +4569,7 @@  discard block
 block discarded – undo
4559 4569
 	 * Returns the requested Jetpack API URL
4560 4570
 	 *
4561 4571
 	 * @deprecated since 7.6
4572
+	 * @param string $relative_url
4562 4573
 	 * @return string
4563 4574
 	 */
4564 4575
 	public static function api_url( $relative_url ) {
@@ -4802,6 +4813,7 @@  discard block
 block discarded – undo
4802 4813
 	 * Note these tokens are unique per call, NOT static per site for connecting.
4803 4814
 	 *
4804 4815
 	 * @since 2.6
4816
+	 * @param string $action
4805 4817
 	 * @return array
4806 4818
 	 */
4807 4819
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
@@ -5035,7 +5047,6 @@  discard block
 block discarded – undo
5035 5047
 	/**
5036 5048
 	 * Report authentication status to the WP REST API.
5037 5049
 	 *
5038
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5039 5050
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5040 5051
 	 */
5041 5052
 	public function wp_rest_authentication_errors( $value ) {
@@ -5053,6 +5064,7 @@  discard block
 block discarded – undo
5053 5064
 	 * @param string $key
5054 5065
 	 * @param string $value
5055 5066
 	 * @param bool $restate private
5067
+	 * @return string
5056 5068
 	 */
5057 5069
 	public static function state( $key = null, $value = null, $restate = false ) {
5058 5070
 		static $state = array();
@@ -5109,6 +5121,9 @@  discard block
 block discarded – undo
5109 5121
 		Jetpack::state( null, null, true );
5110 5122
 	}
5111 5123
 
5124
+	/**
5125
+	 * @param string $file
5126
+	 */
5112 5127
 	public static function check_privacy( $file ) {
5113 5128
 		static $is_site_publicly_accessible = null;
5114 5129
 
@@ -5191,6 +5206,9 @@  discard block
 block discarded – undo
5191 5206
 		}
5192 5207
 	}
5193 5208
 
5209
+	/**
5210
+	 * @param string $url
5211
+	 */
5194 5212
 	public static function staticize_subdomain( $url ) {
5195 5213
 
5196 5214
 		// Extract hostname from URL
@@ -5746,9 +5764,7 @@  discard block
 block discarded – undo
5746 5764
 	 *
5747 5765
 	 * Attached to `style_loader_src` filter.
5748 5766
 	 *
5749
-	 * @param string $tag The tag that would link to the external asset.
5750 5767
 	 * @param string $handle The registered handle of the script in question.
5751
-	 * @param string $href The url of the asset in question.
5752 5768
 	 */
5753 5769
 	public static function set_suffix_on_min( $src, $handle ) {
5754 5770
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -5935,8 +5951,8 @@  discard block
 block discarded – undo
5935 5951
 	 *  - Absolute URLs             `http://domain.com/feh.png`
5936 5952
 	 *  - Domain root relative URLs `/feh.png`
5937 5953
 	 *
5938
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
5939
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
5954
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
5955
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
5940 5956
 	 *
5941 5957
 	 * @return mixed|string
5942 5958
 	 */
@@ -6179,7 +6195,7 @@  discard block
 block discarded – undo
6179 6195
 	/**
6180 6196
 	 * Stores and prints out domains to prefetch for page speed optimization.
6181 6197
 	 *
6182
-	 * @param mixed $new_urls
6198
+	 * @param string[] $new_urls
6183 6199
 	 */
6184 6200
 	public static function dns_prefetch( $new_urls = null ) {
6185 6201
 		static $prefetch_urls = array();
@@ -6235,7 +6251,6 @@  discard block
 block discarded – undo
6235 6251
 	}
6236 6252
 
6237 6253
 	/**
6238
-	 * @param mixed $result Value for the user's option
6239 6254
 	 * @return mixed
6240 6255
 	 */
6241 6256
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.