Completed
Push — try/refactor-secrets-and-token... ( b29795...1bc8a1 )
by
unknown
282:45 queued 273:37
created
projects/packages/connection/src/class-manager.php 1 patch
Doc Comments   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 	/**
294 294
 	 * Verifies the signature of the current request.
295 295
 	 *
296
-	 * @return false|array
296
+	 * @return boolean
297 297
 	 */
298 298
 	public function verify_xml_rpc_signature() {
299 299
 		if ( is_null( $this->xmlrpc_verification ) ) {
@@ -1259,6 +1259,7 @@  discard block
 block discarded – undo
1259 1259
 	 * @param String  $action  The action name.
1260 1260
 	 * @param Integer $user_id The user identifier.
1261 1261
 	 * @param Integer $exp     Expiration time in seconds.
1262
+	 * @return string
1262 1263
 	 */
1263 1264
 	public function generate_secrets( $action, $user_id = false, $exp = 600 ) {
1264 1265
 		_deprecated_function( __METHOD__, 'jetpack-9.5', 'Automattic\\Jetpack\\Connection\\Secrets->generate' );
@@ -2044,7 +2045,7 @@  discard block
 block discarded – undo
2044 2045
 	 * @deprecated 9.5 Use Automattic\Jetpack\Connection\Tokens->get_signed_token() instead.
2045 2046
 	 *
2046 2047
 	 * @param object $token the token.
2047
-	 * @return WP_Error|string a signed token
2048
+	 * @return string a signed token
2048 2049
 	 */
2049 2050
 	public function get_signed_token( $token ) {
2050 2051
 		_deprecated_function( __METHOD__, 'jetpack-9.5', 'Automattic\\Jetpack\\Connection\\Tokens->get_signed_token' );
Please login to merge, or discard this patch.
projects/packages/connection/src/class-tokens.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -246,7 +246,7 @@
 block discarded – undo
246 246
 	 * @param int    $user_id The user id.
247 247
 	 * @param string $token The user token.
248 248
 	 * @param bool   $is_master_user Whether the user is the master user.
249
-	 * @return bool
249
+	 * @return boolean|null
250 250
 	 */
251 251
 	public function update_user_token( $user_id, $token, $is_master_user ) {
252 252
 		// Not designed for concurrent updates.
Please login to merge, or discard this patch.
projects/plugins/jetpack/class.jetpack.php 1 patch
Doc Comments   +36 added lines, -17 removed lines patch added patch discarded remove patch
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
976 976
 	 *
977 977
 	 * @param $domains
978
-	 * @return array
978
+	 * @return string[]
979 979
 	 */
980 980
 	function allow_wpcom_domain( $domains ) {
981 981
 		if ( empty( $domains ) ) {
@@ -1343,7 +1343,7 @@  discard block
 block discarded – undo
1343 1343
 	/**
1344 1344
 	 * Does the network allow admins to add new users.
1345 1345
 	 *
1346
-	 * @return boolian
1346
+	 * @return boolean
1347 1347
 	 */
1348 1348
 	static function network_add_new_users( $option = null ) {
1349 1349
 		return (bool) get_site_option( 'add_new_users' );
@@ -1453,7 +1453,7 @@  discard block
 block discarded – undo
1453 1453
 	 *
1454 1454
 	 * @param  bool $option
1455 1455
 	 *
1456
-	 * @return boolean
1456
+	 * @return string
1457 1457
 	 */
1458 1458
 	public function is_main_network_option( $option ) {
1459 1459
 		// return '1' or ''
@@ -1464,7 +1464,7 @@  discard block
 block discarded – undo
1464 1464
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1465 1465
 	 *
1466 1466
 	 * @param  string $option
1467
-	 * @return boolean
1467
+	 * @return string
1468 1468
 	 */
1469 1469
 	public function is_multisite( $option ) {
1470 1470
 		return (string) (bool) is_multisite();
@@ -1527,7 +1527,7 @@  discard block
 block discarded – undo
1527 1527
 	/**
1528 1528
 	 * Returns true if the site has file write access false otherwise.
1529 1529
 	 *
1530
-	 * @return string ( '1' | '0' )
1530
+	 * @return integer ( '1' | '0' )
1531 1531
 	 **/
1532 1532
 	public static function file_system_write_access() {
1533 1533
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2235,7 +2235,7 @@  discard block
 block discarded – undo
2235 2235
 	 * @param int    $user_id The user id.
2236 2236
 	 * @param string $token The user token.
2237 2237
 	 * @param bool   $is_master_user Whether the user is the master user.
2238
-	 * @return bool
2238
+	 * @return boolean|null
2239 2239
 	 */
2240 2240
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2241 2241
 		_deprecated_function( __METHOD__, 'jetpack-9.5', 'Automattic\\Jetpack\\Connection\\Tokens->update_user_token' );
@@ -2679,7 +2679,7 @@  discard block
 block discarded – undo
2679 2679
 	 *
2680 2680
 	 * @param string $tag Tag as it appears in each module heading.
2681 2681
 	 *
2682
-	 * @return mixed
2682
+	 * @return string
2683 2683
 	 */
2684 2684
 	public static function translate_module_tag( $tag ) {
2685 2685
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2794,8 +2794,8 @@  discard block
 block discarded – undo
2794 2794
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2795 2795
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2796 2796
 	 *
2797
-	 * @param $string
2798
-	 * @return mixed
2797
+	 * @param string $string
2798
+	 * @return string|null
2799 2799
 	 */
2800 2800
 	public static function alias_directories( $string ) {
2801 2801
 		// ABSPATH has a trailing slash.
@@ -2806,6 +2806,10 @@  discard block
 block discarded – undo
2806 2806
 		return $string;
2807 2807
 	}
2808 2808
 
2809
+	/**
2810
+	 * @param boolean $redirect
2811
+	 * @param boolean $send_state_messages
2812
+	 */
2809 2813
 	public static function activate_default_modules(
2810 2814
 		$min_version = false,
2811 2815
 		$max_version = false,
@@ -3089,6 +3093,9 @@  discard block
 block discarded – undo
3089 3093
 		return self::update_active_modules( $new );
3090 3094
 	}
3091 3095
 
3096
+	/**
3097
+	 * @param string $module
3098
+	 */
3092 3099
 	public static function enable_module_configurable( $module ) {
3093 3100
 		$module = self::get_module_slug( $module );
3094 3101
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -3117,6 +3124,10 @@  discard block
 block discarded – undo
3117 3124
 	}
3118 3125
 
3119 3126
 	/* Installation */
3127
+
3128
+	/**
3129
+	 * @param string $message
3130
+	 */
3120 3131
 	public static function bail_on_activation( $message, $deactivate = true ) {
3121 3132
 		?>
3122 3133
 <!doctype html>
@@ -3162,6 +3173,7 @@  discard block
 block discarded – undo
3162 3173
 	 * Attached to activate_{ plugin_basename( __FILES__ ) } by register_activation_hook()
3163 3174
 	 *
3164 3175
 	 * @static
3176
+	 * @param boolean $network_wide
3165 3177
 	 */
3166 3178
 	public static function plugin_activation( $network_wide ) {
3167 3179
 		Jetpack_Options::update_option( 'activated', 1 );
@@ -3883,7 +3895,7 @@  discard block
 block discarded – undo
3883 3895
 	 * Add help to the Jetpack page
3884 3896
 	 *
3885 3897
 	 * @since Jetpack (1.2.3)
3886
-	 * @return false if not the Jetpack page
3898
+	 * @return false|null if not the Jetpack page
3887 3899
 	 */
3888 3900
 	function admin_help() {
3889 3901
 		$current_screen = get_current_screen();
@@ -4624,6 +4636,7 @@  discard block
 block discarded – undo
4624 4636
 
4625 4637
 	/**
4626 4638
 	 * Record a stat for later output.  This will only currently output in the admin_footer.
4639
+	 * @param string $group
4627 4640
 	 */
4628 4641
 	function stat( $group, $detail ) {
4629 4642
 		$this->initialize_stats();
@@ -5039,6 +5052,9 @@  discard block
 block discarded – undo
5039 5052
 		return $url;
5040 5053
 	}
5041 5054
 
5055
+	/**
5056
+	 * @param string $actionurl
5057
+	 */
5042 5058
 	public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) {
5043 5059
 		$actionurl = str_replace( '&amp;', '&', $actionurl );
5044 5060
 		return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
@@ -5329,12 +5345,15 @@  discard block
 block discarded – undo
5329 5345
 	 * @param String  $action  The action name.
5330 5346
 	 * @param Integer $user_id The user identifier.
5331 5347
 	 * @param Integer $exp     Expiration time in seconds.
5332
-	 * @return array
5348
+	 * @return boolean
5333 5349
 	 */
5334 5350
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
5335 5351
 		return ( new Secrets() )->generate( $action, $user_id, $exp );
5336 5352
 	}
5337 5353
 
5354
+	/**
5355
+	 * @param string $action
5356
+	 */
5338 5357
 	public static function get_secrets( $action, $user_id ) {
5339 5358
 		$secrets = self::connection()->get_secrets( $action, $user_id );
5340 5359
 
@@ -5585,7 +5604,6 @@  discard block
 block discarded – undo
5585 5604
 	 * @deprecated since 8.9.0
5586 5605
 	 * @see Automattic\Jetpack\Connection\Rest_Authentication::wp_rest_authentication_errors()
5587 5606
 	 *
5588
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5589 5607
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5590 5608
 	 */
5591 5609
 	public function wp_rest_authentication_errors( $value ) {
@@ -5678,6 +5696,7 @@  discard block
 block discarded – undo
5678 5696
 	 * @param string $key
5679 5697
 	 * @param string $value
5680 5698
 	 * @param bool   $restate private
5699
+	 * @return string
5681 5700
 	 */
5682 5701
 	public static function state( $key = null, $value = null, $restate = false ) {
5683 5702
 		static $state = array();
@@ -5759,6 +5778,9 @@  discard block
 block discarded – undo
5759 5778
 		return true;
5760 5779
 	}
5761 5780
 
5781
+	/**
5782
+	 * @param string $file
5783
+	 */
5762 5784
 	public static function check_privacy( $file ) {
5763 5785
 		static $is_site_publicly_accessible = null;
5764 5786
 
@@ -6331,9 +6353,7 @@  discard block
 block discarded – undo
6331 6353
 	 *
6332 6354
 	 * Attached to `style_loader_src` filter.
6333 6355
 	 *
6334
-	 * @param string $tag The tag that would link to the external asset.
6335 6356
 	 * @param string $handle The registered handle of the script in question.
6336
-	 * @param string $href The url of the asset in question.
6337 6357
 	 */
6338 6358
 	public static function set_suffix_on_min( $src, $handle ) {
6339 6359
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6709,8 +6729,8 @@  discard block
 block discarded – undo
6709 6729
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6710 6730
 	 *  - Domain root relative URLs `/feh.png`
6711 6731
 	 *
6712
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6713
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6732
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6733
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6714 6734
 	 *
6715 6735
 	 * @return mixed|string
6716 6736
 	 */
@@ -7012,7 +7032,6 @@  discard block
 block discarded – undo
7012 7032
 	}
7013 7033
 
7014 7034
 	/**
7015
-	 * @param mixed $result Value for the user's option
7016 7035
 	 * @return mixed
7017 7036
 	 */
7018 7037
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.