Completed
Push — add/plan-price-display-compone... ( 099237...ba2c6d )
by
unknown
07:24
created
class.jetpack.php 1 patch
Doc Comments   +35 added lines, -18 removed lines patch added patch discarded remove patch
@@ -795,7 +795,7 @@  discard block
 block discarded – undo
795 795
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
796 796
 	 *
797 797
 	 * @param $domains
798
-	 * @return array
798
+	 * @return string[]
799 799
 	 */
800 800
 	function allow_wpcom_domain( $domains ) {
801 801
 		if ( empty( $domains ) ) {
@@ -1210,7 +1210,7 @@  discard block
 block discarded – undo
1210 1210
 	/**
1211 1211
 	 * Does the network allow admins to add new users.
1212 1212
 	 *
1213
-	 * @return boolian
1213
+	 * @return boolean
1214 1214
 	 */
1215 1215
 	static function network_add_new_users( $option = null ) {
1216 1216
 		return (bool) get_site_option( 'add_new_users' );
@@ -1320,7 +1320,7 @@  discard block
 block discarded – undo
1320 1320
 	 *
1321 1321
 	 * @param  bool $option
1322 1322
 	 *
1323
-	 * @return boolean
1323
+	 * @return string
1324 1324
 	 */
1325 1325
 	public function is_main_network_option( $option ) {
1326 1326
 		// return '1' or ''
@@ -1331,7 +1331,7 @@  discard block
 block discarded – undo
1331 1331
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1332 1332
 	 *
1333 1333
 	 * @param  string $option
1334
-	 * @return boolean
1334
+	 * @return string
1335 1335
 	 */
1336 1336
 	public function is_multisite( $option ) {
1337 1337
 		return (string) (bool) is_multisite();
@@ -1394,7 +1394,7 @@  discard block
 block discarded – undo
1394 1394
 	/**
1395 1395
 	 * Returns true if the site has file write access false otherwise.
1396 1396
 	 *
1397
-	 * @return string ( '1' | '0' )
1397
+	 * @return integer ( '1' | '0' )
1398 1398
 	 **/
1399 1399
 	public static function file_system_write_access() {
1400 1400
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2130,7 +2130,7 @@  discard block
 block discarded – undo
2130 2130
 	 * @param int    $user_id The user id.
2131 2131
 	 * @param string $token The user token.
2132 2132
 	 * @param bool   $is_master_user Whether the user is the master user.
2133
-	 * @return bool
2133
+	 * @return boolean|null
2134 2134
 	 */
2135 2135
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2136 2136
 		_deprecated_function( __METHOD__, 'jetpack-8.0', 'Automattic\\Jetpack\\Connection\\Utils::update_user_token' );
@@ -2573,7 +2573,7 @@  discard block
 block discarded – undo
2573 2573
 	 *
2574 2574
 	 * @param string $tag Tag as it appears in each module heading.
2575 2575
 	 *
2576
-	 * @return mixed
2576
+	 * @return string
2577 2577
 	 */
2578 2578
 	public static function translate_module_tag( $tag ) {
2579 2579
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2745,8 +2745,8 @@  discard block
 block discarded – undo
2745 2745
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2746 2746
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2747 2747
 	 *
2748
-	 * @param $string
2749
-	 * @return mixed
2748
+	 * @param string $string
2749
+	 * @return string|null
2750 2750
 	 */
2751 2751
 	public static function alias_directories( $string ) {
2752 2752
 		// ABSPATH has a trailing slash.
@@ -2757,6 +2757,10 @@  discard block
 block discarded – undo
2757 2757
 		return $string;
2758 2758
 	}
2759 2759
 
2760
+	/**
2761
+	 * @param boolean $redirect
2762
+	 * @param boolean $send_state_messages
2763
+	 */
2760 2764
 	public static function activate_default_modules(
2761 2765
 		$min_version = false,
2762 2766
 		$max_version = false,
@@ -3040,6 +3044,9 @@  discard block
 block discarded – undo
3040 3044
 		return self::update_active_modules( $new );
3041 3045
 	}
3042 3046
 
3047
+	/**
3048
+	 * @param string $module
3049
+	 */
3043 3050
 	public static function enable_module_configurable( $module ) {
3044 3051
 		$module = self::get_module_slug( $module );
3045 3052
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -3068,6 +3075,10 @@  discard block
 block discarded – undo
3068 3075
 	}
3069 3076
 
3070 3077
 	/* Installation */
3078
+
3079
+	/**
3080
+	 * @param string $message
3081
+	 */
3071 3082
 	public static function bail_on_activation( $message, $deactivate = true ) {
3072 3083
 		?>
3073 3084
 <!doctype html>
@@ -3833,7 +3844,7 @@  discard block
 block discarded – undo
3833 3844
 	 * Add help to the Jetpack page
3834 3845
 	 *
3835 3846
 	 * @since Jetpack (1.2.3)
3836
-	 * @return false if not the Jetpack page
3847
+	 * @return false|null if not the Jetpack page
3837 3848
 	 */
3838 3849
 	function admin_help() {
3839 3850
 		$current_screen = get_current_screen();
@@ -4782,6 +4793,9 @@  discard block
 block discarded – undo
4782 4793
 		return $url;
4783 4794
 	}
4784 4795
 
4796
+	/**
4797
+	 * @return string
4798
+	 */
4785 4799
 	public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) {
4786 4800
 		$actionurl = str_replace( '&amp;', '&', $actionurl );
4787 4801
 		return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
@@ -5071,7 +5085,7 @@  discard block
 block discarded – undo
5071 5085
 	 * @param String  $action  The action name.
5072 5086
 	 * @param Integer $user_id The user identifier.
5073 5087
 	 * @param Integer $exp     Expiration time in seconds.
5074
-	 * @return array
5088
+	 * @return boolean
5075 5089
 	 */
5076 5090
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
5077 5091
 		return self::connection()->generate_secrets( $action, $user_id, $exp );
@@ -5359,7 +5373,6 @@  discard block
 block discarded – undo
5359 5373
 	/**
5360 5374
 	 * Report authentication status to the WP REST API.
5361 5375
 	 *
5362
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5363 5376
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5364 5377
 	 */
5365 5378
 	public function wp_rest_authentication_errors( $value ) {
@@ -5461,6 +5474,7 @@  discard block
 block discarded – undo
5461 5474
 	 * @param string $key
5462 5475
 	 * @param string $value
5463 5476
 	 * @param bool   $restate private
5477
+	 * @return string
5464 5478
 	 */
5465 5479
 	public static function state( $key = null, $value = null, $restate = false ) {
5466 5480
 		static $state = array();
@@ -5519,6 +5533,9 @@  discard block
 block discarded – undo
5519 5533
 		self::state( null, null, true );
5520 5534
 	}
5521 5535
 
5536
+	/**
5537
+	 * @param string $file
5538
+	 */
5522 5539
 	public static function check_privacy( $file ) {
5523 5540
 		static $is_site_publicly_accessible = null;
5524 5541
 
@@ -5599,6 +5616,9 @@  discard block
 block discarded – undo
5599 5616
 		}
5600 5617
 	}
5601 5618
 
5619
+	/**
5620
+	 * @param string $url
5621
+	 */
5602 5622
 	public static function staticize_subdomain( $url ) {
5603 5623
 
5604 5624
 		// Extract hostname from URL
@@ -6168,9 +6188,7 @@  discard block
 block discarded – undo
6168 6188
 	 *
6169 6189
 	 * Attached to `style_loader_src` filter.
6170 6190
 	 *
6171
-	 * @param string $tag The tag that would link to the external asset.
6172 6191
 	 * @param string $handle The registered handle of the script in question.
6173
-	 * @param string $href The url of the asset in question.
6174 6192
 	 */
6175 6193
 	public static function set_suffix_on_min( $src, $handle ) {
6176 6194
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6361,8 +6379,8 @@  discard block
 block discarded – undo
6361 6379
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6362 6380
 	 *  - Domain root relative URLs `/feh.png`
6363 6381
 	 *
6364
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6365
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6382
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6383
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6366 6384
 	 *
6367 6385
 	 * @return mixed|string
6368 6386
 	 */
@@ -6623,7 +6641,7 @@  discard block
 block discarded – undo
6623 6641
 	/**
6624 6642
 	 * Stores and prints out domains to prefetch for page speed optimization.
6625 6643
 	 *
6626
-	 * @param mixed $new_urls
6644
+	 * @param string[] $new_urls
6627 6645
 	 */
6628 6646
 	public static function dns_prefetch( $new_urls = null ) {
6629 6647
 		static $prefetch_urls = array();
@@ -6680,7 +6698,6 @@  discard block
 block discarded – undo
6680 6698
 	}
6681 6699
 
6682 6700
 	/**
6683
-	 * @param mixed $result Value for the user's option
6684 6701
 	 * @return mixed
6685 6702
 	 */
6686 6703
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.
packages/connection/src/class-manager.php 1 patch
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 	/**
274 274
 	 * Verifies the signature of the current request.
275 275
 	 *
276
-	 * @return false|array
276
+	 * @return boolean
277 277
 	 */
278 278
 	public function verify_xml_rpc_signature() {
279 279
 		if ( is_null( $this->xmlrpc_verification ) ) {
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
 	 * @param Integer $user_id (optional) the user identifier, defaults to current user.
638 638
 	 * @param String  $redirect_url the URL to redirect the user to for processing, defaults to
639 639
 	 *                              admin_url().
640
-	 * @return WP_Error only in case of a failed user lookup.
640
+	 * @return \WP_Error|null only in case of a failed user lookup.
641 641
 	 */
642 642
 	public function connect_user( $user_id = null, $redirect_url = null ) {
643 643
 		$user = null;
@@ -1167,6 +1167,7 @@  discard block
 block discarded – undo
1167 1167
 	 * @param String  $action  The action name.
1168 1168
 	 * @param Integer $user_id The user identifier.
1169 1169
 	 * @param Integer $exp     Expiration time in seconds.
1170
+	 * @return string
1170 1171
 	 */
1171 1172
 	public function generate_secrets( $action, $user_id = false, $exp = 600 ) {
1172 1173
 		if ( false === $user_id ) {
@@ -1660,7 +1661,7 @@  discard block
 block discarded – undo
1660 1661
 	 *
1661 1662
 	 * @param int|false    $user_id   false: Return the Blog Token. int: Return that user's User Token.
1662 1663
 	 * @param string|false $token_key If provided, check that the token matches the provided input.
1663
-	 * @param bool|true    $suppress_errors If true, return a falsy value when the token isn't found; When false, return a descriptive WP_Error when the token isn't found.
1664
+	 * @param boolean    $suppress_errors If true, return a falsy value when the token isn't found; When false, return a descriptive WP_Error when the token isn't found.
1664 1665
 	 *
1665 1666
 	 * @return object|false
1666 1667
 	 */
Please login to merge, or discard this patch.