Completed
Push — try/refactor-secrets-and-token... ( 1bc8a1...a17499 )
by
unknown
33:04 queued 24:10
created
projects/plugins/jetpack/class.jetpack.php 1 patch
Doc Comments   +35 added lines, -16 removed lines patch added patch discarded remove patch
@@ -974,7 +974,7 @@  discard block
 block discarded – undo
974 974
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
975 975
 	 *
976 976
 	 * @param $domains
977
-	 * @return array
977
+	 * @return string[]
978 978
 	 */
979 979
 	function allow_wpcom_domain( $domains ) {
980 980
 		if ( empty( $domains ) ) {
@@ -1342,7 +1342,7 @@  discard block
 block discarded – undo
1342 1342
 	/**
1343 1343
 	 * Does the network allow admins to add new users.
1344 1344
 	 *
1345
-	 * @return boolian
1345
+	 * @return boolean
1346 1346
 	 */
1347 1347
 	static function network_add_new_users( $option = null ) {
1348 1348
 		return (bool) get_site_option( 'add_new_users' );
@@ -1452,7 +1452,7 @@  discard block
 block discarded – undo
1452 1452
 	 *
1453 1453
 	 * @param  bool $option
1454 1454
 	 *
1455
-	 * @return boolean
1455
+	 * @return string
1456 1456
 	 */
1457 1457
 	public function is_main_network_option( $option ) {
1458 1458
 		// return '1' or ''
@@ -1463,7 +1463,7 @@  discard block
 block discarded – undo
1463 1463
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1464 1464
 	 *
1465 1465
 	 * @param  string $option
1466
-	 * @return boolean
1466
+	 * @return string
1467 1467
 	 */
1468 1468
 	public function is_multisite( $option ) {
1469 1469
 		return (string) (bool) is_multisite();
@@ -1526,7 +1526,7 @@  discard block
 block discarded – undo
1526 1526
 	/**
1527 1527
 	 * Returns true if the site has file write access false otherwise.
1528 1528
 	 *
1529
-	 * @return string ( '1' | '0' )
1529
+	 * @return integer ( '1' | '0' )
1530 1530
 	 **/
1531 1531
 	public static function file_system_write_access() {
1532 1532
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2234,7 +2234,7 @@  discard block
 block discarded – undo
2234 2234
 	 * @param int    $user_id The user id.
2235 2235
 	 * @param string $token The user token.
2236 2236
 	 * @param bool   $is_master_user Whether the user is the master user.
2237
-	 * @return bool
2237
+	 * @return boolean|null
2238 2238
 	 */
2239 2239
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2240 2240
 		_deprecated_function( __METHOD__, 'jetpack-9.5', 'Automattic\\Jetpack\\Connection\\Tokens->update_user_token' );
@@ -2678,7 +2678,7 @@  discard block
 block discarded – undo
2678 2678
 	 *
2679 2679
 	 * @param string $tag Tag as it appears in each module heading.
2680 2680
 	 *
2681
-	 * @return mixed
2681
+	 * @return string
2682 2682
 	 */
2683 2683
 	public static function translate_module_tag( $tag ) {
2684 2684
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2793,8 +2793,8 @@  discard block
 block discarded – undo
2793 2793
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2794 2794
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2795 2795
 	 *
2796
-	 * @param $string
2797
-	 * @return mixed
2796
+	 * @param string $string
2797
+	 * @return string|null
2798 2798
 	 */
2799 2799
 	public static function alias_directories( $string ) {
2800 2800
 		// ABSPATH has a trailing slash.
@@ -2805,6 +2805,10 @@  discard block
 block discarded – undo
2805 2805
 		return $string;
2806 2806
 	}
2807 2807
 
2808
+	/**
2809
+	 * @param boolean $redirect
2810
+	 * @param boolean $send_state_messages
2811
+	 */
2808 2812
 	public static function activate_default_modules(
2809 2813
 		$min_version = false,
2810 2814
 		$max_version = false,
@@ -3088,6 +3092,9 @@  discard block
 block discarded – undo
3088 3092
 		return self::update_active_modules( $new );
3089 3093
 	}
3090 3094
 
3095
+	/**
3096
+	 * @param string $module
3097
+	 */
3091 3098
 	public static function enable_module_configurable( $module ) {
3092 3099
 		$module = self::get_module_slug( $module );
3093 3100
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -3116,6 +3123,10 @@  discard block
 block discarded – undo
3116 3123
 	}
3117 3124
 
3118 3125
 	/* Installation */
3126
+
3127
+	/**
3128
+	 * @param string $message
3129
+	 */
3119 3130
 	public static function bail_on_activation( $message, $deactivate = true ) {
3120 3131
 		?>
3121 3132
 <!doctype html>
@@ -3161,6 +3172,7 @@  discard block
 block discarded – undo
3161 3172
 	 * Attached to activate_{ plugin_basename( __FILES__ ) } by register_activation_hook()
3162 3173
 	 *
3163 3174
 	 * @static
3175
+	 * @param boolean $network_wide
3164 3176
 	 */
3165 3177
 	public static function plugin_activation( $network_wide ) {
3166 3178
 		Jetpack_Options::update_option( 'activated', 1 );
@@ -3882,7 +3894,7 @@  discard block
 block discarded – undo
3882 3894
 	 * Add help to the Jetpack page
3883 3895
 	 *
3884 3896
 	 * @since Jetpack (1.2.3)
3885
-	 * @return false if not the Jetpack page
3897
+	 * @return false|null if not the Jetpack page
3886 3898
 	 */
3887 3899
 	function admin_help() {
3888 3900
 		$current_screen = get_current_screen();
@@ -4623,6 +4635,7 @@  discard block
 block discarded – undo
4623 4635
 
4624 4636
 	/**
4625 4637
 	 * Record a stat for later output.  This will only currently output in the admin_footer.
4638
+	 * @param string $group
4626 4639
 	 */
4627 4640
 	function stat( $group, $detail ) {
4628 4641
 		$this->initialize_stats();
@@ -4966,6 +4979,9 @@  discard block
 block discarded – undo
4966 4979
 		return $url;
4967 4980
 	}
4968 4981
 
4982
+	/**
4983
+	 * @param string $actionurl
4984
+	 */
4969 4985
 	public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) {
4970 4986
 		$actionurl = str_replace( '&amp;', '&', $actionurl );
4971 4987
 		return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
@@ -5265,6 +5281,9 @@  discard block
 block discarded – undo
5265 5281
 		return ( new Secrets() )->generate( $action, $user_id, $exp );
5266 5282
 	}
5267 5283
 
5284
+	/**
5285
+	 * @param string $action
5286
+	 */
5268 5287
 	public static function get_secrets( $action, $user_id ) {
5269 5288
 		$secrets = ( new Secrets() )->get( $action, $user_id );
5270 5289
 
@@ -5505,7 +5524,6 @@  discard block
 block discarded – undo
5505 5524
 	 * @deprecated since 8.9.0
5506 5525
 	 * @see Automattic\Jetpack\Connection\Rest_Authentication::wp_rest_authentication_errors()
5507 5526
 	 *
5508
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5509 5527
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5510 5528
 	 */
5511 5529
 	public function wp_rest_authentication_errors( $value ) {
@@ -5598,6 +5616,7 @@  discard block
 block discarded – undo
5598 5616
 	 * @param string $key
5599 5617
 	 * @param string $value
5600 5618
 	 * @param bool   $restate private
5619
+	 * @return string
5601 5620
 	 */
5602 5621
 	public static function state( $key = null, $value = null, $restate = false ) {
5603 5622
 		static $state = array();
@@ -5679,6 +5698,9 @@  discard block
 block discarded – undo
5679 5698
 		return true;
5680 5699
 	}
5681 5700
 
5701
+	/**
5702
+	 * @param string $file
5703
+	 */
5682 5704
 	public static function check_privacy( $file ) {
5683 5705
 		static $is_site_publicly_accessible = null;
5684 5706
 
@@ -6252,9 +6274,7 @@  discard block
 block discarded – undo
6252 6274
 	 *
6253 6275
 	 * Attached to `style_loader_src` filter.
6254 6276
 	 *
6255
-	 * @param string $tag The tag that would link to the external asset.
6256 6277
 	 * @param string $handle The registered handle of the script in question.
6257
-	 * @param string $href The url of the asset in question.
6258 6278
 	 */
6259 6279
 	public static function set_suffix_on_min( $src, $handle ) {
6260 6280
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6630,8 +6650,8 @@  discard block
 block discarded – undo
6630 6650
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6631 6651
 	 *  - Domain root relative URLs `/feh.png`
6632 6652
 	 *
6633
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6634
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6653
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6654
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6635 6655
 	 *
6636 6656
 	 * @return mixed|string
6637 6657
 	 */
@@ -6933,7 +6953,6 @@  discard block
 block discarded – undo
6933 6953
 	}
6934 6954
 
6935 6955
 	/**
6936
-	 * @param mixed $result Value for the user's option
6937 6956
 	 * @return mixed
6938 6957
 	 */
6939 6958
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.