Completed
Push — try/refactor-secrets-and-token... ( 313ee5 )
by
unknown
381:48 queued 371:37
created
projects/packages/connection/src/class-manager.php 1 patch
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 	/**
315 315
 	 * Verifies the signature of the current request.
316 316
 	 *
317
-	 * @return false|array
317
+	 * @return boolean
318 318
 	 */
319 319
 	public function verify_xml_rpc_signature() {
320 320
 		if ( is_null( $this->xmlrpc_verification ) ) {
@@ -1280,6 +1280,7 @@  discard block
 block discarded – undo
1280 1280
 	 * @param String  $action  The action name.
1281 1281
 	 * @param Integer $user_id The user identifier.
1282 1282
 	 * @param Integer $exp     Expiration time in seconds.
1283
+	 * @return string
1283 1284
 	 */
1284 1285
 	public function generate_secrets( $action, $user_id = false, $exp = 600 ) {
1285 1286
 		_deprecated_function( __METHOD__, 'jetpack-9.5', 'Automattic\\Jetpack\\Connection\\Secrets::generate' );
@@ -1484,7 +1485,7 @@  discard block
 block discarded – undo
1484 1485
 	 *
1485 1486
 	 * @deprecated 9.5 Use Automattic\Jetpack\Connection\Tokens::get() instead.
1486 1487
 	 *
1487
-	 * @param array $data The request data.
1488
+	 * @param string $data The request data.
1488 1489
 	 * @return object|\WP_Error Returns the auth token on success.
1489 1490
 	 *                          Returns a \WP_Error on failure.
1490 1491
 	 */
@@ -2065,7 +2066,7 @@  discard block
 block discarded – undo
2065 2066
 	 * @deprecated 9.5 Use Automattic\Jetpack\Connection\Tokens::get_signed_token() instead.
2066 2067
 	 *
2067 2068
 	 * @param object $token the token.
2068
-	 * @return WP_Error|string a signed token
2069
+	 * @return string a signed token
2069 2070
 	 */
2070 2071
 	public function get_signed_token( $token ) {
2071 2072
 		_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
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 	 * @param int    $user_id The user id.
46 46
 	 * @param string $token The user token.
47 47
 	 * @param bool   $is_master_user Whether the user is the master user.
48
-	 * @return bool
48
+	 * @return boolean|null
49 49
 	 */
50 50
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
51 51
 		// 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,13 +5345,16 @@  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
 		$secrets = new Secrets();
5336 5352
 		return $secrets->generate( $action, $user_id, $exp );
5337 5353
 	}
5338 5354
 
5355
+	/**
5356
+	 * @param string $action
5357
+	 */
5339 5358
 	public static function get_secrets( $action, $user_id ) {
5340 5359
 		$secrets = self::connection()->get_secrets( $action, $user_id );
5341 5360
 
@@ -5586,7 +5605,6 @@  discard block
 block discarded – undo
5586 5605
 	 * @deprecated since 8.9.0
5587 5606
 	 * @see Automattic\Jetpack\Connection\Rest_Authentication::wp_rest_authentication_errors()
5588 5607
 	 *
5589
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5590 5608
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5591 5609
 	 */
5592 5610
 	public function wp_rest_authentication_errors( $value ) {
@@ -5679,6 +5697,7 @@  discard block
 block discarded – undo
5679 5697
 	 * @param string $key
5680 5698
 	 * @param string $value
5681 5699
 	 * @param bool   $restate private
5700
+	 * @return string
5682 5701
 	 */
5683 5702
 	public static function state( $key = null, $value = null, $restate = false ) {
5684 5703
 		static $state = array();
@@ -5760,6 +5779,9 @@  discard block
 block discarded – undo
5760 5779
 		return true;
5761 5780
 	}
5762 5781
 
5782
+	/**
5783
+	 * @param string $file
5784
+	 */
5763 5785
 	public static function check_privacy( $file ) {
5764 5786
 		static $is_site_publicly_accessible = null;
5765 5787
 
@@ -6332,9 +6354,7 @@  discard block
 block discarded – undo
6332 6354
 	 *
6333 6355
 	 * Attached to `style_loader_src` filter.
6334 6356
 	 *
6335
-	 * @param string $tag The tag that would link to the external asset.
6336 6357
 	 * @param string $handle The registered handle of the script in question.
6337
-	 * @param string $href The url of the asset in question.
6338 6358
 	 */
6339 6359
 	public static function set_suffix_on_min( $src, $handle ) {
6340 6360
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6710,8 +6730,8 @@  discard block
 block discarded – undo
6710 6730
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6711 6731
 	 *  - Domain root relative URLs `/feh.png`
6712 6732
 	 *
6713
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6714
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6733
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6734
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6715 6735
 	 *
6716 6736
 	 * @return mixed|string
6717 6737
 	 */
@@ -7013,7 +7033,6 @@  discard block
 block discarded – undo
7013 7033
 	}
7014 7034
 
7015 7035
 	/**
7016
-	 * @param mixed $result Value for the user's option
7017 7036
 	 * @return mixed
7018 7037
 	 */
7019 7038
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.