Completed
Push — add/user-authentication ( 93b532...af2207 )
by
unknown
07:37
created
class.jetpack.php 1 patch
Doc Comments   +35 added lines, -16 removed lines patch added patch discarded remove patch
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
707 707
 	 *
708 708
 	 * @param $domains
709
-	 * @return array
709
+	 * @return string[]
710 710
 	 */
711 711
 	function allow_wpcom_domain( $domains ) {
712 712
 		if ( empty( $domains ) ) {
@@ -1122,7 +1122,7 @@  discard block
 block discarded – undo
1122 1122
 	}
1123 1123
 	/**
1124 1124
 	 * Does the network allow admins to add new users.
1125
-	 * @return boolian
1125
+	 * @return boolean
1126 1126
 	 */
1127 1127
 	static function network_add_new_users( $option = null ) {
1128 1128
 		return (bool) get_site_option( 'add_new_users' );
@@ -1227,7 +1227,7 @@  discard block
 block discarded – undo
1227 1227
 	 * database which could be set to anything as opposed to what this function returns.
1228 1228
 	 * @param  bool  $option
1229 1229
 	 *
1230
-	 * @return boolean
1230
+	 * @return string
1231 1231
 	 */
1232 1232
 	public function is_main_network_option( $option ) {
1233 1233
 		// return '1' or ''
@@ -1238,7 +1238,7 @@  discard block
 block discarded – undo
1238 1238
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1239 1239
 	 *
1240 1240
 	 * @param  string  $option
1241
-	 * @return boolean
1241
+	 * @return string
1242 1242
 	 */
1243 1243
 	public function is_multisite( $option ) {
1244 1244
 		return (string) (bool) is_multisite();
@@ -1300,7 +1300,7 @@  discard block
 block discarded – undo
1300 1300
 
1301 1301
 	/**
1302 1302
 	 * Returns true if the site has file write access false otherwise.
1303
-	 * @return string ( '1' | '0' )
1303
+	 * @return integer ( '1' | '0' )
1304 1304
 	 **/
1305 1305
 	public static function file_system_write_access() {
1306 1306
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2027,6 +2027,7 @@  discard block
 block discarded – undo
2027 2027
 	 * @param int $user_id
2028 2028
 	 * @param string $token
2029 2029
 	 * return bool
2030
+	 * @param boolean $is_master_user
2030 2031
 	 */
2031 2032
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2032 2033
 		// not designed for concurrent updates
@@ -2471,7 +2472,7 @@  discard block
 block discarded – undo
2471 2472
 	 *
2472 2473
 	 * @param string $tag Tag as it appears in each module heading.
2473 2474
 	 *
2474
-	 * @return mixed
2475
+	 * @return string
2475 2476
 	 */
2476 2477
 	public static function translate_module_tag( $tag ) {
2477 2478
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2643,8 +2644,8 @@  discard block
 block discarded – undo
2643 2644
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2644 2645
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2645 2646
 	 *
2646
-	 * @param $string
2647
-	 * @return mixed
2647
+	 * @param string $string
2648
+	 * @return string|null
2648 2649
 	 */
2649 2650
 	public static function alias_directories( $string ) {
2650 2651
 		// ABSPATH has a trailing slash.
@@ -2904,6 +2905,9 @@  discard block
 block discarded – undo
2904 2905
 		return self::update_active_modules( $new );
2905 2906
 	}
2906 2907
 
2908
+	/**
2909
+	 * @param string $module
2910
+	 */
2907 2911
 	public static function enable_module_configurable( $module ) {
2908 2912
 		$module = Jetpack::get_module_slug( $module );
2909 2913
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -2932,6 +2936,9 @@  discard block
 block discarded – undo
2932 2936
 	}
2933 2937
 
2934 2938
 /* Installation */
2939
+	/**
2940
+	 * @param string $message
2941
+	 */
2935 2942
 	public static function bail_on_activation( $message, $deactivate = true ) {
2936 2943
 ?>
2937 2944
 <!doctype html>
@@ -3666,7 +3673,7 @@  discard block
 block discarded – undo
3666 3673
 	 * Add help to the Jetpack page
3667 3674
 	 *
3668 3675
 	 * @since Jetpack (1.2.3)
3669
-	 * @return false if not the Jetpack page
3676
+	 * @return false|null if not the Jetpack page
3670 3677
 	 */
3671 3678
 	function admin_help() {
3672 3679
 		$current_screen = get_current_screen();
@@ -4502,6 +4509,9 @@  discard block
 block discarded – undo
4502 4509
 		return $url;
4503 4510
 	}
4504 4511
 
4512
+	/**
4513
+	 * @return string
4514
+	 */
4505 4515
 	public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) {
4506 4516
 		$actionurl = str_replace( '&amp;', '&', $actionurl );
4507 4517
 		return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
@@ -4562,6 +4572,7 @@  discard block
 block discarded – undo
4562 4572
 	 * Returns the requested Jetpack API URL
4563 4573
 	 *
4564 4574
 	 * @deprecated since 7.6
4575
+	 * @param string $relative_url
4565 4576
 	 * @return string
4566 4577
 	 */
4567 4578
 	public static function api_url( $relative_url ) {
@@ -4805,6 +4816,7 @@  discard block
 block discarded – undo
4805 4816
 	 * Note these tokens are unique per call, NOT static per site for connecting.
4806 4817
 	 *
4807 4818
 	 * @since 2.6
4819
+	 * @param string $action
4808 4820
 	 * @return array
4809 4821
 	 */
4810 4822
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
@@ -5039,7 +5051,6 @@  discard block
 block discarded – undo
5039 5051
 	/**
5040 5052
 	 * Report authentication status to the WP REST API.
5041 5053
 	 *
5042
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5043 5054
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5044 5055
 	 */
5045 5056
 	public function wp_rest_authentication_errors( $value ) {
@@ -5049,6 +5060,10 @@  discard block
 block discarded – undo
5049 5060
 		return $this->rest_authentication_status;
5050 5061
 	}
5051 5062
 
5063
+	/**
5064
+	 * @param integer $timestamp
5065
+	 * @param string $nonce
5066
+	 */
5052 5067
 	function add_nonce( $timestamp, $nonce ) {
5053 5068
 		global $wpdb;
5054 5069
 		static $nonces_used_this_request = array();
@@ -5118,6 +5133,7 @@  discard block
 block discarded – undo
5118 5133
 	 * @param string $key
5119 5134
 	 * @param string $value
5120 5135
 	 * @param bool $restate private
5136
+	 * @return string
5121 5137
 	 */
5122 5138
 	public static function state( $key = null, $value = null, $restate = false ) {
5123 5139
 		static $state = array();
@@ -5174,6 +5190,9 @@  discard block
 block discarded – undo
5174 5190
 		Jetpack::state( null, null, true );
5175 5191
 	}
5176 5192
 
5193
+	/**
5194
+	 * @param string $file
5195
+	 */
5177 5196
 	public static function check_privacy( $file ) {
5178 5197
 		static $is_site_publicly_accessible = null;
5179 5198
 
@@ -5256,6 +5275,9 @@  discard block
 block discarded – undo
5256 5275
 		}
5257 5276
 	}
5258 5277
 
5278
+	/**
5279
+	 * @param string $url
5280
+	 */
5259 5281
 	public static function staticize_subdomain( $url ) {
5260 5282
 
5261 5283
 		// Extract hostname from URL
@@ -5811,9 +5833,7 @@  discard block
 block discarded – undo
5811 5833
 	 *
5812 5834
 	 * Attached to `style_loader_src` filter.
5813 5835
 	 *
5814
-	 * @param string $tag The tag that would link to the external asset.
5815 5836
 	 * @param string $handle The registered handle of the script in question.
5816
-	 * @param string $href The url of the asset in question.
5817 5837
 	 */
5818 5838
 	public static function set_suffix_on_min( $src, $handle ) {
5819 5839
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6000,8 +6020,8 @@  discard block
 block discarded – undo
6000 6020
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6001 6021
 	 *  - Domain root relative URLs `/feh.png`
6002 6022
 	 *
6003
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6004
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6023
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6024
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6005 6025
 	 *
6006 6026
 	 * @return mixed|string
6007 6027
 	 */
@@ -6244,7 +6264,7 @@  discard block
 block discarded – undo
6244 6264
 	/**
6245 6265
 	 * Stores and prints out domains to prefetch for page speed optimization.
6246 6266
 	 *
6247
-	 * @param mixed $new_urls
6267
+	 * @param string[] $new_urls
6248 6268
 	 */
6249 6269
 	public static function dns_prefetch( $new_urls = null ) {
6250 6270
 		static $prefetch_urls = array();
@@ -6300,7 +6320,6 @@  discard block
 block discarded – undo
6300 6320
 	}
6301 6321
 
6302 6322
 	/**
6303
-	 * @param mixed $result Value for the user's option
6304 6323
 	 * @return mixed
6305 6324
 	 */
6306 6325
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.