Completed
Push — add/user-authentication ( 5a4a72...aa6559 )
by Marin
12:32 queued 06:02
created
packages/connection/src/Manager.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 	/**
314 314
 	 * Verifies the signature of the current request.
315 315
 	 *
316
-	 * @return false|array
316
+	 * @return boolean
317 317
 	 */
318 318
 	public function verify_xml_rpc_signature() {
319 319
 		if ( is_null( $this->xmlrpc_verification ) ) {
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
 	 * Is the user the connection owner.
564 564
 	 *
565 565
 	 * @param Integer $user_id the user identifier.
566
-	 * @return Boolean is the user the connection owner?
566
+	 * @return integer is the user the connection owner?
567 567
 	 */
568 568
 	public function is_connection_owner( $user_id ) {
569 569
 		return $user_id;
@@ -1424,7 +1424,7 @@  discard block
 block discarded – undo
1424 1424
 	 *
1425 1425
 	 * @param int|false    $user_id   false: Return the Blog Token. int: Return that user's User Token.
1426 1426
 	 * @param string|false $token_key If provided, check that the token matches the provided input.
1427
-	 * @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.
1427
+	 * @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.
1428 1428
 	 *
1429 1429
 	 * @return object|false
1430 1430
 	 */
Please login to merge, or discard this patch.
class.jetpack.php 1 patch
Doc Comments   +31 added lines, -16 removed lines patch added patch discarded remove patch
@@ -737,7 +737,7 @@  discard block
 block discarded – undo
737 737
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
738 738
 	 *
739 739
 	 * @param $domains
740
-	 * @return array
740
+	 * @return string[]
741 741
 	 */
742 742
 	function allow_wpcom_domain( $domains ) {
743 743
 		if ( empty( $domains ) ) {
@@ -1153,7 +1153,7 @@  discard block
 block discarded – undo
1153 1153
 	}
1154 1154
 	/**
1155 1155
 	 * Does the network allow admins to add new users.
1156
-	 * @return boolian
1156
+	 * @return boolean
1157 1157
 	 */
1158 1158
 	static function network_add_new_users( $option = null ) {
1159 1159
 		return (bool) get_site_option( 'add_new_users' );
@@ -1258,7 +1258,7 @@  discard block
 block discarded – undo
1258 1258
 	 * database which could be set to anything as opposed to what this function returns.
1259 1259
 	 * @param  bool  $option
1260 1260
 	 *
1261
-	 * @return boolean
1261
+	 * @return string
1262 1262
 	 */
1263 1263
 	public function is_main_network_option( $option ) {
1264 1264
 		// return '1' or ''
@@ -1269,7 +1269,7 @@  discard block
 block discarded – undo
1269 1269
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1270 1270
 	 *
1271 1271
 	 * @param  string  $option
1272
-	 * @return boolean
1272
+	 * @return string
1273 1273
 	 */
1274 1274
 	public function is_multisite( $option ) {
1275 1275
 		return (string) (bool) is_multisite();
@@ -1331,7 +1331,7 @@  discard block
 block discarded – undo
1331 1331
 
1332 1332
 	/**
1333 1333
 	 * Returns true if the site has file write access false otherwise.
1334
-	 * @return string ( '1' | '0' )
1334
+	 * @return integer ( '1' | '0' )
1335 1335
 	 **/
1336 1336
 	public static function file_system_write_access() {
1337 1337
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2059,6 +2059,7 @@  discard block
 block discarded – undo
2059 2059
 	 * @param int $user_id
2060 2060
 	 * @param string $token
2061 2061
 	 * return bool
2062
+	 * @param boolean $is_master_user
2062 2063
 	 */
2063 2064
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2064 2065
 		// not designed for concurrent updates
@@ -2503,7 +2504,7 @@  discard block
 block discarded – undo
2503 2504
 	 *
2504 2505
 	 * @param string $tag Tag as it appears in each module heading.
2505 2506
 	 *
2506
-	 * @return mixed
2507
+	 * @return string
2507 2508
 	 */
2508 2509
 	public static function translate_module_tag( $tag ) {
2509 2510
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2675,8 +2676,8 @@  discard block
 block discarded – undo
2675 2676
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2676 2677
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2677 2678
 	 *
2678
-	 * @param $string
2679
-	 * @return mixed
2679
+	 * @param string $string
2680
+	 * @return string|null
2680 2681
 	 */
2681 2682
 	public static function alias_directories( $string ) {
2682 2683
 		// ABSPATH has a trailing slash.
@@ -2936,6 +2937,9 @@  discard block
 block discarded – undo
2936 2937
 		return self::update_active_modules( $new );
2937 2938
 	}
2938 2939
 
2940
+	/**
2941
+	 * @param string $module
2942
+	 */
2939 2943
 	public static function enable_module_configurable( $module ) {
2940 2944
 		$module = Jetpack::get_module_slug( $module );
2941 2945
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -2964,6 +2968,9 @@  discard block
 block discarded – undo
2964 2968
 	}
2965 2969
 
2966 2970
 /* Installation */
2971
+	/**
2972
+	 * @param string $message
2973
+	 */
2967 2974
 	public static function bail_on_activation( $message, $deactivate = true ) {
2968 2975
 ?>
2969 2976
 <!doctype html>
@@ -3700,7 +3707,7 @@  discard block
 block discarded – undo
3700 3707
 	 * Add help to the Jetpack page
3701 3708
 	 *
3702 3709
 	 * @since Jetpack (1.2.3)
3703
-	 * @return false if not the Jetpack page
3710
+	 * @return false|null if not the Jetpack page
3704 3711
 	 */
3705 3712
 	function admin_help() {
3706 3713
 		$current_screen = get_current_screen();
@@ -4563,6 +4570,9 @@  discard block
 block discarded – undo
4563 4570
 		return $url;
4564 4571
 	}
4565 4572
 
4573
+	/**
4574
+	 * @return string
4575
+	 */
4566 4576
 	public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) {
4567 4577
 		$actionurl = str_replace( '&amp;', '&', $actionurl );
4568 4578
 		return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
@@ -4623,6 +4633,7 @@  discard block
 block discarded – undo
4623 4633
 	 * Returns the requested Jetpack API URL
4624 4634
 	 *
4625 4635
 	 * @deprecated since 7.7
4636
+	 * @param string $relative_url
4626 4637
 	 * @return string
4627 4638
 	 */
4628 4639
 	public static function api_url( $relative_url ) {
@@ -4866,6 +4877,7 @@  discard block
 block discarded – undo
4866 4877
 	 * Note these tokens are unique per call, NOT static per site for connecting.
4867 4878
 	 *
4868 4879
 	 * @since 2.6
4880
+	 * @param string $action
4869 4881
 	 * @return array
4870 4882
 	 */
4871 4883
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
@@ -5100,7 +5112,6 @@  discard block
 block discarded – undo
5100 5112
 	/**
5101 5113
 	 * Report authentication status to the WP REST API.
5102 5114
 	 *
5103
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5104 5115
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5105 5116
 	 */
5106 5117
 	public function wp_rest_authentication_errors( $value ) {
@@ -5118,6 +5129,7 @@  discard block
 block discarded – undo
5118 5129
 	 * @param string $key
5119 5130
 	 * @param string $value
5120 5131
 	 * @param bool $restate private
5132
+	 * @return string
5121 5133
 	 */
5122 5134
 	public static function state( $key = null, $value = null, $restate = false ) {
5123 5135
 		static $state = array();
@@ -5174,6 +5186,9 @@  discard block
 block discarded – undo
5174 5186
 		Jetpack::state( null, null, true );
5175 5187
 	}
5176 5188
 
5189
+	/**
5190
+	 * @param string $file
5191
+	 */
5177 5192
 	public static function check_privacy( $file ) {
5178 5193
 		static $is_site_publicly_accessible = null;
5179 5194
 
@@ -5256,6 +5271,9 @@  discard block
 block discarded – undo
5256 5271
 		}
5257 5272
 	}
5258 5273
 
5274
+	/**
5275
+	 * @param string $url
5276
+	 */
5259 5277
 	public static function staticize_subdomain( $url ) {
5260 5278
 
5261 5279
 		// Extract hostname from URL
@@ -5811,9 +5829,7 @@  discard block
 block discarded – undo
5811 5829
 	 *
5812 5830
 	 * Attached to `style_loader_src` filter.
5813 5831
 	 *
5814
-	 * @param string $tag The tag that would link to the external asset.
5815 5832
 	 * @param string $handle The registered handle of the script in question.
5816
-	 * @param string $href The url of the asset in question.
5817 5833
 	 */
5818 5834
 	public static function set_suffix_on_min( $src, $handle ) {
5819 5835
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6000,8 +6016,8 @@  discard block
 block discarded – undo
6000 6016
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6001 6017
 	 *  - Domain root relative URLs `/feh.png`
6002 6018
 	 *
6003
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6004
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6019
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6020
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6005 6021
 	 *
6006 6022
 	 * @return mixed|string
6007 6023
 	 */
@@ -6244,7 +6260,7 @@  discard block
 block discarded – undo
6244 6260
 	/**
6245 6261
 	 * Stores and prints out domains to prefetch for page speed optimization.
6246 6262
 	 *
6247
-	 * @param mixed $new_urls
6263
+	 * @param string[] $new_urls
6248 6264
 	 */
6249 6265
 	public static function dns_prefetch( $new_urls = null ) {
6250 6266
 		static $prefetch_urls = array();
@@ -6300,7 +6316,6 @@  discard block
 block discarded – undo
6300 6316
 	}
6301 6317
 
6302 6318
 	/**
6303
-	 * @param mixed $result Value for the user's option
6304 6319
 	 * @return mixed
6305 6320
 	 */
6306 6321
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.