Completed
Pull Request — add/userless-connection-flow (#18927)
by
unknown
22:30 queued 10:59
created
projects/plugins/jetpack/class.jetpack.php 1 patch
Doc Comments   +37 added lines, -17 removed lines patch added patch discarded remove patch
@@ -979,7 +979,7 @@  discard block
 block discarded – undo
979 979
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
980 980
 	 *
981 981
 	 * @param $domains
982
-	 * @return array
982
+	 * @return string[]
983 983
 	 */
984 984
 	function allow_wpcom_domain( $domains ) {
985 985
 		if ( empty( $domains ) ) {
@@ -1380,7 +1380,7 @@  discard block
 block discarded – undo
1380 1380
 	/**
1381 1381
 	 * Does the network allow admins to add new users.
1382 1382
 	 *
1383
-	 * @return boolian
1383
+	 * @return boolean
1384 1384
 	 */
1385 1385
 	static function network_add_new_users( $option = null ) {
1386 1386
 		return (bool) get_site_option( 'add_new_users' );
@@ -1490,7 +1490,7 @@  discard block
 block discarded – undo
1490 1490
 	 *
1491 1491
 	 * @param  bool $option
1492 1492
 	 *
1493
-	 * @return boolean
1493
+	 * @return string
1494 1494
 	 */
1495 1495
 	public function is_main_network_option( $option ) {
1496 1496
 		// return '1' or ''
@@ -1501,7 +1501,7 @@  discard block
 block discarded – undo
1501 1501
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1502 1502
 	 *
1503 1503
 	 * @param  string $option
1504
-	 * @return boolean
1504
+	 * @return string
1505 1505
 	 */
1506 1506
 	public function is_multisite( $option ) {
1507 1507
 		return (string) (bool) is_multisite();
@@ -1564,7 +1564,7 @@  discard block
 block discarded – undo
1564 1564
 	/**
1565 1565
 	 * Returns true if the site has file write access false otherwise.
1566 1566
 	 *
1567
-	 * @return string ( '1' | '0' )
1567
+	 * @return integer ( '1' | '0' )
1568 1568
 	 **/
1569 1569
 	public static function file_system_write_access() {
1570 1570
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2272,7 +2272,7 @@  discard block
 block discarded – undo
2272 2272
 	 * @param int    $user_id The user id.
2273 2273
 	 * @param string $token The user token.
2274 2274
 	 * @param bool   $is_master_user Whether the user is the master user.
2275
-	 * @return bool
2275
+	 * @return boolean|null
2276 2276
 	 */
2277 2277
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2278 2278
 		_deprecated_function( __METHOD__, 'jetpack-8.0', 'Automattic\\Jetpack\\Connection\\Utils::update_user_token' );
@@ -2755,7 +2755,7 @@  discard block
 block discarded – undo
2755 2755
 	 *
2756 2756
 	 * @param string $tag Tag as it appears in each module heading.
2757 2757
 	 *
2758
-	 * @return mixed
2758
+	 * @return string
2759 2759
 	 */
2760 2760
 	public static function translate_module_tag( $tag ) {
2761 2761
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2870,8 +2870,8 @@  discard block
 block discarded – undo
2870 2870
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2871 2871
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2872 2872
 	 *
2873
-	 * @param $string
2874
-	 * @return mixed
2873
+	 * @param string $string
2874
+	 * @return string|null
2875 2875
 	 */
2876 2876
 	public static function alias_directories( $string ) {
2877 2877
 		// ABSPATH has a trailing slash.
@@ -2882,6 +2882,11 @@  discard block
 block discarded – undo
2882 2882
 		return $string;
2883 2883
 	}
2884 2884
 
2885
+	/**
2886
+	 * @param boolean $redirect
2887
+	 * @param boolean $send_state_messages
2888
+	 * @param boolean $requires_user_connection
2889
+	 */
2885 2890
 	public static function activate_default_modules(
2886 2891
 		$min_version = false,
2887 2892
 		$max_version = false,
@@ -3171,6 +3176,9 @@  discard block
 block discarded – undo
3171 3176
 		return self::update_active_modules( $new );
3172 3177
 	}
3173 3178
 
3179
+	/**
3180
+	 * @param string $module
3181
+	 */
3174 3182
 	public static function enable_module_configurable( $module ) {
3175 3183
 		$module = self::get_module_slug( $module );
3176 3184
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -3199,6 +3207,10 @@  discard block
 block discarded – undo
3199 3207
 	}
3200 3208
 
3201 3209
 	/* Installation */
3210
+
3211
+	/**
3212
+	 * @param string $message
3213
+	 */
3202 3214
 	public static function bail_on_activation( $message, $deactivate = true ) {
3203 3215
 		?>
3204 3216
 <!doctype html>
@@ -3244,6 +3256,7 @@  discard block
 block discarded – undo
3244 3256
 	 * Attached to activate_{ plugin_basename( __FILES__ ) } by register_activation_hook()
3245 3257
 	 *
3246 3258
 	 * @static
3259
+	 * @param boolean $network_wide
3247 3260
 	 */
3248 3261
 	public static function plugin_activation( $network_wide ) {
3249 3262
 		Jetpack_Options::update_option( 'activated', 1 );
@@ -3965,7 +3978,7 @@  discard block
 block discarded – undo
3965 3978
 	 * Add help to the Jetpack page
3966 3979
 	 *
3967 3980
 	 * @since Jetpack (1.2.3)
3968
-	 * @return false if not the Jetpack page
3981
+	 * @return false|null if not the Jetpack page
3969 3982
 	 */
3970 3983
 	function admin_help() {
3971 3984
 		$current_screen = get_current_screen();
@@ -4706,6 +4719,7 @@  discard block
 block discarded – undo
4706 4719
 
4707 4720
 	/**
4708 4721
 	 * Record a stat for later output.  This will only currently output in the admin_footer.
4722
+	 * @param string $group
4709 4723
 	 */
4710 4724
 	function stat( $group, $detail ) {
4711 4725
 		$this->initialize_stats();
@@ -5140,6 +5154,9 @@  discard block
 block discarded – undo
5140 5154
 		return $url;
5141 5155
 	}
5142 5156
 
5157
+	/**
5158
+	 * @param string $actionurl
5159
+	 */
5143 5160
 	public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) {
5144 5161
 		$actionurl = str_replace( '&amp;', '&', $actionurl );
5145 5162
 		return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
@@ -5430,12 +5447,15 @@  discard block
 block discarded – undo
5430 5447
 	 * @param String  $action  The action name.
5431 5448
 	 * @param Integer $user_id The user identifier.
5432 5449
 	 * @param Integer $exp     Expiration time in seconds.
5433
-	 * @return array
5450
+	 * @return boolean
5434 5451
 	 */
5435 5452
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
5436 5453
 		return self::connection()->generate_secrets( $action, $user_id, $exp );
5437 5454
 	}
5438 5455
 
5456
+	/**
5457
+	 * @param string $action
5458
+	 */
5439 5459
 	public static function get_secrets( $action, $user_id ) {
5440 5460
 		$secrets = self::connection()->get_secrets( $action, $user_id );
5441 5461
 
@@ -5686,7 +5706,6 @@  discard block
 block discarded – undo
5686 5706
 	 * @deprecated since 8.9.0
5687 5707
 	 * @see Automattic\Jetpack\Connection\Rest_Authentication::wp_rest_authentication_errors()
5688 5708
 	 *
5689
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5690 5709
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5691 5710
 	 */
5692 5711
 	public function wp_rest_authentication_errors( $value ) {
@@ -5779,6 +5798,7 @@  discard block
 block discarded – undo
5779 5798
 	 * @param string $key
5780 5799
 	 * @param string $value
5781 5800
 	 * @param bool   $restate private
5801
+	 * @return string
5782 5802
 	 */
5783 5803
 	public static function state( $key = null, $value = null, $restate = false ) {
5784 5804
 		static $state = array();
@@ -5860,6 +5880,9 @@  discard block
 block discarded – undo
5860 5880
 		return true;
5861 5881
 	}
5862 5882
 
5883
+	/**
5884
+	 * @param string $file
5885
+	 */
5863 5886
 	public static function check_privacy( $file ) {
5864 5887
 		static $is_site_publicly_accessible = null;
5865 5888
 
@@ -6432,9 +6455,7 @@  discard block
 block discarded – undo
6432 6455
 	 *
6433 6456
 	 * Attached to `style_loader_src` filter.
6434 6457
 	 *
6435
-	 * @param string $tag The tag that would link to the external asset.
6436 6458
 	 * @param string $handle The registered handle of the script in question.
6437
-	 * @param string $href The url of the asset in question.
6438 6459
 	 */
6439 6460
 	public static function set_suffix_on_min( $src, $handle ) {
6440 6461
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6810,8 +6831,8 @@  discard block
 block discarded – undo
6810 6831
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6811 6832
 	 *  - Domain root relative URLs `/feh.png`
6812 6833
 	 *
6813
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6814
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6834
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6835
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6815 6836
 	 *
6816 6837
 	 * @return mixed|string
6817 6838
 	 */
@@ -7113,7 +7134,6 @@  discard block
 block discarded – undo
7113 7134
 	}
7114 7135
 
7115 7136
 	/**
7116
-	 * @param mixed $result Value for the user's option
7117 7137
 	 * @return mixed
7118 7138
 	 */
7119 7139
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.