Completed
Push — fix/upgrade-redirects ( f98297 )
by
unknown
06:27
created
class.jetpack.php 1 patch
Doc Comments   +37 added lines, -17 removed lines patch added patch discarded remove patch
@@ -773,7 +773,7 @@  discard block
 block discarded – undo
773 773
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
774 774
 	 *
775 775
 	 * @param $domains
776
-	 * @return array
776
+	 * @return string[]
777 777
 	 */
778 778
 	function allow_wpcom_domain( $domains ) {
779 779
 		if ( empty( $domains ) ) {
@@ -1231,7 +1231,7 @@  discard block
 block discarded – undo
1231 1231
 	}
1232 1232
 	/**
1233 1233
 	 * Does the network allow admins to add new users.
1234
-	 * @return boolian
1234
+	 * @return boolean
1235 1235
 	 */
1236 1236
 	static function network_add_new_users( $option = null ) {
1237 1237
 		return (bool) get_site_option( 'add_new_users' );
@@ -1336,7 +1336,7 @@  discard block
 block discarded – undo
1336 1336
 	 * database which could be set to anything as opposed to what this function returns.
1337 1337
 	 * @param  bool  $option
1338 1338
 	 *
1339
-	 * @return boolean
1339
+	 * @return string
1340 1340
 	 */
1341 1341
 	public function is_main_network_option( $option ) {
1342 1342
 		// return '1' or ''
@@ -1347,7 +1347,7 @@  discard block
 block discarded – undo
1347 1347
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1348 1348
 	 *
1349 1349
 	 * @param  string  $option
1350
-	 * @return boolean
1350
+	 * @return string
1351 1351
 	 */
1352 1352
 	public function is_multisite( $option ) {
1353 1353
 		return (string) (bool) is_multisite();
@@ -1409,7 +1409,7 @@  discard block
 block discarded – undo
1409 1409
 
1410 1410
 	/**
1411 1411
 	 * Returns true if the site has file write access false otherwise.
1412
-	 * @return string ( '1' | '0' )
1412
+	 * @return integer ( '1' | '0' )
1413 1413
 	 **/
1414 1414
 	public static function file_system_write_access() {
1415 1415
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2143,6 +2143,7 @@  discard block
 block discarded – undo
2143 2143
 	 * @param int $user_id
2144 2144
 	 * @param string $token
2145 2145
 	 * return bool
2146
+	 * @param boolean $is_master_user
2146 2147
 	 */
2147 2148
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2148 2149
 		// not designed for concurrent updates
@@ -2587,7 +2588,7 @@  discard block
 block discarded – undo
2587 2588
 	 *
2588 2589
 	 * @param string $tag Tag as it appears in each module heading.
2589 2590
 	 *
2590
-	 * @return mixed
2591
+	 * @return string
2591 2592
 	 */
2592 2593
 	public static function translate_module_tag( $tag ) {
2593 2594
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2759,8 +2760,8 @@  discard block
 block discarded – undo
2759 2760
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2760 2761
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2761 2762
 	 *
2762
-	 * @param $string
2763
-	 * @return mixed
2763
+	 * @param string $string
2764
+	 * @return string|null
2764 2765
 	 */
2765 2766
 	public static function alias_directories( $string ) {
2766 2767
 		// ABSPATH has a trailing slash.
@@ -2771,6 +2772,9 @@  discard block
 block discarded – undo
2771 2772
 		return $string;
2772 2773
 	}
2773 2774
 
2775
+	/**
2776
+	 * @param boolean $redirect
2777
+	 */
2774 2778
 	public static function activate_default_modules(
2775 2779
 		$min_version = false,
2776 2780
 		$max_version = false,
@@ -3042,6 +3046,9 @@  discard block
 block discarded – undo
3042 3046
 		return self::update_active_modules( $new );
3043 3047
 	}
3044 3048
 
3049
+	/**
3050
+	 * @param string $module
3051
+	 */
3045 3052
 	public static function enable_module_configurable( $module ) {
3046 3053
 		$module = Jetpack::get_module_slug( $module );
3047 3054
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -3070,6 +3077,9 @@  discard block
 block discarded – undo
3070 3077
 	}
3071 3078
 
3072 3079
 /* Installation */
3080
+	/**
3081
+	 * @param string $message
3082
+	 */
3073 3083
 	public static function bail_on_activation( $message, $deactivate = true ) {
3074 3084
 ?>
3075 3085
 <!doctype html>
@@ -3816,7 +3826,7 @@  discard block
 block discarded – undo
3816 3826
 	 * Add help to the Jetpack page
3817 3827
 	 *
3818 3828
 	 * @since Jetpack (1.2.3)
3819
-	 * @return false if not the Jetpack page
3829
+	 * @return false|null if not the Jetpack page
3820 3830
 	 */
3821 3831
 	function admin_help() {
3822 3832
 		$current_screen = get_current_screen();
@@ -4548,6 +4558,9 @@  discard block
 block discarded – undo
4548 4558
 		return $raw ? esc_url_raw( $url ) : esc_url( $url );
4549 4559
 	}
4550 4560
 
4561
+	/**
4562
+	 * @return string
4563
+	 */
4551 4564
 	public static function build_authorize_url( $redirect = false, $iframe = false ) {
4552 4565
 		if ( defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) && include_once JETPACK__GLOTPRESS_LOCALES_PATH ) {
4553 4566
 			$gp_locale = GP_Locales::by_field( 'wp_locale', get_locale() );
@@ -4687,6 +4700,9 @@  discard block
 block discarded – undo
4687 4700
 		return $url;
4688 4701
 	}
4689 4702
 
4703
+	/**
4704
+	 * @return string
4705
+	 */
4690 4706
 	public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) {
4691 4707
 		$actionurl = str_replace( '&amp;', '&', $actionurl );
4692 4708
 		return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
@@ -4975,7 +4991,8 @@  discard block
 block discarded – undo
4975 4991
 	 * Note these tokens are unique per call, NOT static per site for connecting.
4976 4992
 	 *
4977 4993
 	 * @since 2.6
4978
-	 * @return array
4994
+	 * @param string $action
4995
+	 * @return boolean
4979 4996
 	 */
4980 4997
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
4981 4998
 		if ( false === $user_id ) {
@@ -5266,7 +5283,6 @@  discard block
 block discarded – undo
5266 5283
 	/**
5267 5284
 	 * Report authentication status to the WP REST API.
5268 5285
 	 *
5269
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5270 5286
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5271 5287
 	 */
5272 5288
 	public function wp_rest_authentication_errors( $value ) {
@@ -5368,6 +5384,7 @@  discard block
 block discarded – undo
5368 5384
 	 * @param string $key
5369 5385
 	 * @param string $value
5370 5386
 	 * @param bool $restate private
5387
+	 * @return string
5371 5388
 	 */
5372 5389
 	public static function state( $key = null, $value = null, $restate = false ) {
5373 5390
 		static $state = array();
@@ -5424,6 +5441,9 @@  discard block
 block discarded – undo
5424 5441
 		Jetpack::state( null, null, true );
5425 5442
 	}
5426 5443
 
5444
+	/**
5445
+	 * @param string $file
5446
+	 */
5427 5447
 	public static function check_privacy( $file ) {
5428 5448
 		static $is_site_publicly_accessible = null;
5429 5449
 
@@ -5504,6 +5524,9 @@  discard block
 block discarded – undo
5504 5524
 		}
5505 5525
 	}
5506 5526
 
5527
+	/**
5528
+	 * @param string $url
5529
+	 */
5507 5530
 	public static function staticize_subdomain( $url ) {
5508 5531
 
5509 5532
 		// Extract hostname from URL
@@ -6058,9 +6081,7 @@  discard block
 block discarded – undo
6058 6081
 	 *
6059 6082
 	 * Attached to `style_loader_src` filter.
6060 6083
 	 *
6061
-	 * @param string $tag The tag that would link to the external asset.
6062 6084
 	 * @param string $handle The registered handle of the script in question.
6063
-	 * @param string $href The url of the asset in question.
6064 6085
 	 */
6065 6086
 	public static function set_suffix_on_min( $src, $handle ) {
6066 6087
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6248,8 +6269,8 @@  discard block
 block discarded – undo
6248 6269
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6249 6270
 	 *  - Domain root relative URLs `/feh.png`
6250 6271
 	 *
6251
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6252
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6272
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6273
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6253 6274
 	 *
6254 6275
 	 * @return mixed|string
6255 6276
 	 */
@@ -6510,7 +6531,7 @@  discard block
 block discarded – undo
6510 6531
 	/**
6511 6532
 	 * Stores and prints out domains to prefetch for page speed optimization.
6512 6533
 	 *
6513
-	 * @param mixed $new_urls
6534
+	 * @param string[] $new_urls
6514 6535
 	 */
6515 6536
 	public static function dns_prefetch( $new_urls = null ) {
6516 6537
 		static $prefetch_urls = array();
@@ -6567,7 +6588,6 @@  discard block
 block discarded – undo
6567 6588
 	}
6568 6589
 
6569 6590
 	/**
6570
-	 * @param mixed $result Value for the user's option
6571 6591
 	 * @return mixed
6572 6592
 	 */
6573 6593
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.