Completed
Push — move-jetpack-client-to-connect... ( 762fb0...a63ab3 )
by
unknown
10:18
created
packages/connection/src/Manager.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	 * Is the user the connection owner.
107 107
 	 *
108 108
 	 * @param Integer $user_id the user identifier.
109
-	 * @return Boolean is the user the connection owner?
109
+	 * @return integer is the user the connection owner?
110 110
 	 */
111 111
 	public function is_connection_owner( $user_id ) {
112 112
 		return $user_id;
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
 	 *
571 571
 	 * @param int|false    $user_id   false: Return the Blog Token. int: Return that user's User Token.
572 572
 	 * @param string|false $token_key If provided, check that the token matches the provided input.
573
-	 * @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.
573
+	 * @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.
574 574
 	 *
575 575
 	 * @return object|false
576 576
 	 */
Please login to merge, or discard this patch.
class.jetpack.php 1 patch
Doc Comments   +37 added lines, -16 removed lines patch added patch discarded remove patch
@@ -758,7 +758,7 @@  discard block
 block discarded – undo
758 758
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
759 759
 	 *
760 760
 	 * @param $domains
761
-	 * @return array
761
+	 * @return string[]
762 762
 	 */
763 763
 	function allow_wpcom_domain( $domains ) {
764 764
 		if ( empty( $domains ) ) {
@@ -1254,7 +1254,7 @@  discard block
 block discarded – undo
1254 1254
 	}
1255 1255
 	/**
1256 1256
 	 * Does the network allow admins to add new users.
1257
-	 * @return boolian
1257
+	 * @return boolean
1258 1258
 	 */
1259 1259
 	static function network_add_new_users( $option = null ) {
1260 1260
 		return (bool) get_site_option( 'add_new_users' );
@@ -1359,7 +1359,7 @@  discard block
 block discarded – undo
1359 1359
 	 * database which could be set to anything as opposed to what this function returns.
1360 1360
 	 * @param  bool  $option
1361 1361
 	 *
1362
-	 * @return boolean
1362
+	 * @return string
1363 1363
 	 */
1364 1364
 	public function is_main_network_option( $option ) {
1365 1365
 		// return '1' or ''
@@ -1370,7 +1370,7 @@  discard block
 block discarded – undo
1370 1370
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1371 1371
 	 *
1372 1372
 	 * @param  string  $option
1373
-	 * @return boolean
1373
+	 * @return string
1374 1374
 	 */
1375 1375
 	public function is_multisite( $option ) {
1376 1376
 		return (string) (bool) is_multisite();
@@ -1432,7 +1432,7 @@  discard block
 block discarded – undo
1432 1432
 
1433 1433
 	/**
1434 1434
 	 * Returns true if the site has file write access false otherwise.
1435
-	 * @return string ( '1' | '0' )
1435
+	 * @return integer ( '1' | '0' )
1436 1436
 	 **/
1437 1437
 	public static function file_system_write_access() {
1438 1438
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2159,6 +2159,7 @@  discard block
 block discarded – undo
2159 2159
 	 * @param int $user_id
2160 2160
 	 * @param string $token
2161 2161
 	 * return bool
2162
+	 * @param boolean $is_master_user
2162 2163
 	 */
2163 2164
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2164 2165
 		// not designed for concurrent updates
@@ -2605,7 +2606,7 @@  discard block
 block discarded – undo
2605 2606
 	 *
2606 2607
 	 * @param string $tag Tag as it appears in each module heading.
2607 2608
 	 *
2608
-	 * @return mixed
2609
+	 * @return string
2609 2610
 	 */
2610 2611
 	public static function translate_module_tag( $tag ) {
2611 2612
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2777,8 +2778,8 @@  discard block
 block discarded – undo
2777 2778
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2778 2779
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2779 2780
 	 *
2780
-	 * @param $string
2781
-	 * @return mixed
2781
+	 * @param string $string
2782
+	 * @return string|null
2782 2783
 	 */
2783 2784
 	public static function alias_directories( $string ) {
2784 2785
 		// ABSPATH has a trailing slash.
@@ -3038,6 +3039,9 @@  discard block
 block discarded – undo
3038 3039
 		return self::update_active_modules( $new );
3039 3040
 	}
3040 3041
 
3042
+	/**
3043
+	 * @param string $module
3044
+	 */
3041 3045
 	public static function enable_module_configurable( $module ) {
3042 3046
 		$module = Jetpack::get_module_slug( $module );
3043 3047
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -3066,6 +3070,9 @@  discard block
 block discarded – undo
3066 3070
 	}
3067 3071
 
3068 3072
 /* Installation */
3073
+	/**
3074
+	 * @param string $message
3075
+	 */
3069 3076
 	public static function bail_on_activation( $message, $deactivate = true ) {
3070 3077
 ?>
3071 3078
 <!doctype html>
@@ -3800,7 +3807,7 @@  discard block
 block discarded – undo
3800 3807
 	 * Add help to the Jetpack page
3801 3808
 	 *
3802 3809
 	 * @since Jetpack (1.2.3)
3803
-	 * @return false if not the Jetpack page
3810
+	 * @return false|null if not the Jetpack page
3804 3811
 	 */
3805 3812
 	function admin_help() {
3806 3813
 		$current_screen = get_current_screen();
@@ -4636,6 +4643,9 @@  discard block
 block discarded – undo
4636 4643
 		return $url;
4637 4644
 	}
4638 4645
 
4646
+	/**
4647
+	 * @return string
4648
+	 */
4639 4649
 	public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) {
4640 4650
 		$actionurl = str_replace( '&amp;', '&', $actionurl );
4641 4651
 		return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
@@ -4695,6 +4705,7 @@  discard block
 block discarded – undo
4695 4705
 	/**
4696 4706
 	 * Returns the requested Jetpack API URL
4697 4707
 	 *
4708
+	 * @param string $relative_url
4698 4709
 	 * @return string
4699 4710
 	 */
4700 4711
 	public static function api_url( $relative_url ) {
@@ -4703,6 +4714,8 @@  discard block
 block discarded – undo
4703 4714
 
4704 4715
 	/**
4705 4716
 	 * Some hosts disable the OpenSSL extension and so cannot make outgoing HTTPS requsets
4717
+	 * @param string $url
4718
+	 * @return string
4706 4719
 	 */
4707 4720
 	public static function fix_url_for_bad_hosts( $url ) {
4708 4721
 		if ( 0 !== strpos( $url, 'https://' ) ) {
@@ -4890,6 +4903,7 @@  discard block
 block discarded – undo
4890 4903
 	 * Note these tokens are unique per call, NOT static per site for connecting.
4891 4904
 	 *
4892 4905
 	 * @since 2.6
4906
+	 * @param string $action
4893 4907
 	 * @return array
4894 4908
 	 */
4895 4909
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
@@ -5452,7 +5466,6 @@  discard block
 block discarded – undo
5452 5466
 	/**
5453 5467
 	 * Report authentication status to the WP REST API.
5454 5468
 	 *
5455
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5456 5469
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5457 5470
 	 */
5458 5471
 	public function wp_rest_authentication_errors( $value ) {
@@ -5462,6 +5475,10 @@  discard block
 block discarded – undo
5462 5475
 		return $this->rest_authentication_status;
5463 5476
 	}
5464 5477
 
5478
+	/**
5479
+	 * @param integer $timestamp
5480
+	 * @param string $nonce
5481
+	 */
5465 5482
 	function add_nonce( $timestamp, $nonce ) {
5466 5483
 		global $wpdb;
5467 5484
 		static $nonces_used_this_request = array();
@@ -5607,6 +5624,7 @@  discard block
 block discarded – undo
5607 5624
 	 * @param string $key
5608 5625
 	 * @param string $value
5609 5626
 	 * @param bool $restate private
5627
+	 * @return string
5610 5628
 	 */
5611 5629
 	public static function state( $key = null, $value = null, $restate = false ) {
5612 5630
 		static $state = array();
@@ -5663,6 +5681,9 @@  discard block
 block discarded – undo
5663 5681
 		Jetpack::state( null, null, true );
5664 5682
 	}
5665 5683
 
5684
+	/**
5685
+	 * @param string $file
5686
+	 */
5666 5687
 	public static function check_privacy( $file ) {
5667 5688
 		static $is_site_publicly_accessible = null;
5668 5689
 
@@ -5745,6 +5766,9 @@  discard block
 block discarded – undo
5745 5766
 		}
5746 5767
 	}
5747 5768
 
5769
+	/**
5770
+	 * @param string $url
5771
+	 */
5748 5772
 	public static function staticize_subdomain( $url ) {
5749 5773
 
5750 5774
 		// Extract hostname from URL
@@ -6300,9 +6324,7 @@  discard block
 block discarded – undo
6300 6324
 	 *
6301 6325
 	 * Attached to `style_loader_src` filter.
6302 6326
 	 *
6303
-	 * @param string $tag The tag that would link to the external asset.
6304 6327
 	 * @param string $handle The registered handle of the script in question.
6305
-	 * @param string $href The url of the asset in question.
6306 6328
 	 */
6307 6329
 	public static function set_suffix_on_min( $src, $handle ) {
6308 6330
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6489,8 +6511,8 @@  discard block
 block discarded – undo
6489 6511
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6490 6512
 	 *  - Domain root relative URLs `/feh.png`
6491 6513
 	 *
6492
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6493
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6514
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6515
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6494 6516
 	 *
6495 6517
 	 * @return mixed|string
6496 6518
 	 */
@@ -6733,7 +6755,7 @@  discard block
 block discarded – undo
6733 6755
 	/**
6734 6756
 	 * Stores and prints out domains to prefetch for page speed optimization.
6735 6757
 	 *
6736
-	 * @param mixed $new_urls
6758
+	 * @param string[] $new_urls
6737 6759
 	 */
6738 6760
 	public static function dns_prefetch( $new_urls = null ) {
6739 6761
 		static $prefetch_urls = array();
@@ -6789,7 +6811,6 @@  discard block
 block discarded – undo
6789 6811
 	}
6790 6812
 
6791 6813
 	/**
6792
-	 * @param mixed $result Value for the user's option
6793 6814
 	 * @return mixed
6794 6815
 	 */
6795 6816
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.