Completed
Push — add/build-connect-url ( 5d7adc...ee3bdc )
by
unknown
40:53 queued 33:52
created
class.jetpack.php 1 patch
Doc Comments   +35 added lines, -16 removed lines patch added patch discarded remove patch
@@ -716,7 +716,7 @@  discard block
 block discarded – undo
716 716
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
717 717
 	 *
718 718
 	 * @param $domains
719
-	 * @return array
719
+	 * @return string[]
720 720
 	 */
721 721
 	function allow_wpcom_domain( $domains ) {
722 722
 		if ( empty( $domains ) ) {
@@ -1236,7 +1236,7 @@  discard block
 block discarded – undo
1236 1236
 	}
1237 1237
 	/**
1238 1238
 	 * Does the network allow admins to add new users.
1239
-	 * @return boolian
1239
+	 * @return boolean
1240 1240
 	 */
1241 1241
 	static function network_add_new_users( $option = null ) {
1242 1242
 		return (bool) get_site_option( 'add_new_users' );
@@ -1341,7 +1341,7 @@  discard block
 block discarded – undo
1341 1341
 	 * database which could be set to anything as opposed to what this function returns.
1342 1342
 	 * @param  bool  $option
1343 1343
 	 *
1344
-	 * @return boolean
1344
+	 * @return string
1345 1345
 	 */
1346 1346
 	public function is_main_network_option( $option ) {
1347 1347
 		// return '1' or ''
@@ -1352,7 +1352,7 @@  discard block
 block discarded – undo
1352 1352
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1353 1353
 	 *
1354 1354
 	 * @param  string  $option
1355
-	 * @return boolean
1355
+	 * @return string
1356 1356
 	 */
1357 1357
 	public function is_multisite( $option ) {
1358 1358
 		return (string) (bool) is_multisite();
@@ -1414,7 +1414,7 @@  discard block
 block discarded – undo
1414 1414
 
1415 1415
 	/**
1416 1416
 	 * Returns true if the site has file write access false otherwise.
1417
-	 * @return string ( '1' | '0' )
1417
+	 * @return integer ( '1' | '0' )
1418 1418
 	 **/
1419 1419
 	public static function file_system_write_access() {
1420 1420
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2145,6 +2145,7 @@  discard block
 block discarded – undo
2145 2145
 	 * @param int $user_id
2146 2146
 	 * @param string $token
2147 2147
 	 * return bool
2148
+	 * @param boolean $is_master_user
2148 2149
 	 */
2149 2150
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2150 2151
 		// not designed for concurrent updates
@@ -2591,7 +2592,7 @@  discard block
 block discarded – undo
2591 2592
 	 *
2592 2593
 	 * @param string $tag Tag as it appears in each module heading.
2593 2594
 	 *
2594
-	 * @return mixed
2595
+	 * @return string
2595 2596
 	 */
2596 2597
 	public static function translate_module_tag( $tag ) {
2597 2598
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2763,8 +2764,8 @@  discard block
 block discarded – undo
2763 2764
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2764 2765
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2765 2766
 	 *
2766
-	 * @param $string
2767
-	 * @return mixed
2767
+	 * @param string $string
2768
+	 * @return string|null
2768 2769
 	 */
2769 2770
 	public static function alias_directories( $string ) {
2770 2771
 		// ABSPATH has a trailing slash.
@@ -3024,6 +3025,9 @@  discard block
 block discarded – undo
3024 3025
 		return self::update_active_modules( $new );
3025 3026
 	}
3026 3027
 
3028
+	/**
3029
+	 * @param string $module
3030
+	 */
3027 3031
 	public static function enable_module_configurable( $module ) {
3028 3032
 		$module = Jetpack::get_module_slug( $module );
3029 3033
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -3052,6 +3056,9 @@  discard block
 block discarded – undo
3052 3056
 	}
3053 3057
 
3054 3058
 /* Installation */
3059
+	/**
3060
+	 * @param string $message
3061
+	 */
3055 3062
 	public static function bail_on_activation( $message, $deactivate = true ) {
3056 3063
 ?>
3057 3064
 <!doctype html>
@@ -3786,7 +3793,7 @@  discard block
 block discarded – undo
3786 3793
 	 * Add help to the Jetpack page
3787 3794
 	 *
3788 3795
 	 * @since Jetpack (1.2.3)
3789
-	 * @return false if not the Jetpack page
3796
+	 * @return false|null if not the Jetpack page
3790 3797
 	 */
3791 3798
 	function admin_help() {
3792 3799
 		$current_screen = get_current_screen();
@@ -4605,6 +4612,9 @@  discard block
 block discarded – undo
4605 4612
 		return $url;
4606 4613
 	}
4607 4614
 
4615
+	/**
4616
+	 * @return string
4617
+	 */
4608 4618
 	public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) {
4609 4619
 		$actionurl = str_replace( '&amp;', '&', $actionurl );
4610 4620
 		return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
@@ -4664,6 +4674,7 @@  discard block
 block discarded – undo
4664 4674
 	/**
4665 4675
 	 * Returns the requested Jetpack API URL
4666 4676
 	 *
4677
+	 * @param string $relative_url
4667 4678
 	 * @return string
4668 4679
 	 */
4669 4680
 	public static function api_url( $relative_url ) {
@@ -4855,6 +4866,7 @@  discard block
 block discarded – undo
4855 4866
 	 * Note these tokens are unique per call, NOT static per site for connecting.
4856 4867
 	 *
4857 4868
 	 * @since 2.6
4869
+	 * @param string $action
4858 4870
 	 * @return array
4859 4871
 	 */
4860 4872
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
@@ -5389,7 +5401,6 @@  discard block
 block discarded – undo
5389 5401
 	/**
5390 5402
 	 * Report authentication status to the WP REST API.
5391 5403
 	 *
5392
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5393 5404
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5394 5405
 	 */
5395 5406
 	public function wp_rest_authentication_errors( $value ) {
@@ -5399,6 +5410,10 @@  discard block
 block discarded – undo
5399 5410
 		return $this->rest_authentication_status;
5400 5411
 	}
5401 5412
 
5413
+	/**
5414
+	 * @param integer $timestamp
5415
+	 * @param string $nonce
5416
+	 */
5402 5417
 	function add_nonce( $timestamp, $nonce ) {
5403 5418
 		global $wpdb;
5404 5419
 		static $nonces_used_this_request = array();
@@ -5544,6 +5559,7 @@  discard block
 block discarded – undo
5544 5559
 	 * @param string $key
5545 5560
 	 * @param string $value
5546 5561
 	 * @param bool $restate private
5562
+	 * @return string
5547 5563
 	 */
5548 5564
 	public static function state( $key = null, $value = null, $restate = false ) {
5549 5565
 		static $state = array();
@@ -5600,6 +5616,9 @@  discard block
 block discarded – undo
5600 5616
 		Jetpack::state( null, null, true );
5601 5617
 	}
5602 5618
 
5619
+	/**
5620
+	 * @param string $file
5621
+	 */
5603 5622
 	public static function check_privacy( $file ) {
5604 5623
 		static $is_site_publicly_accessible = null;
5605 5624
 
@@ -5682,6 +5701,9 @@  discard block
 block discarded – undo
5682 5701
 		}
5683 5702
 	}
5684 5703
 
5704
+	/**
5705
+	 * @param string $url
5706
+	 */
5685 5707
 	public static function staticize_subdomain( $url ) {
5686 5708
 
5687 5709
 		// Extract hostname from URL
@@ -6232,9 +6254,7 @@  discard block
 block discarded – undo
6232 6254
 	 *
6233 6255
 	 * Attached to `style_loader_src` filter.
6234 6256
 	 *
6235
-	 * @param string $tag The tag that would link to the external asset.
6236 6257
 	 * @param string $handle The registered handle of the script in question.
6237
-	 * @param string $href The url of the asset in question.
6238 6258
 	 */
6239 6259
 	public static function set_suffix_on_min( $src, $handle ) {
6240 6260
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6422,8 +6442,8 @@  discard block
 block discarded – undo
6422 6442
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6423 6443
 	 *  - Domain root relative URLs `/feh.png`
6424 6444
 	 *
6425
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6426
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6445
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6446
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6427 6447
 	 *
6428 6448
 	 * @return mixed|string
6429 6449
 	 */
@@ -6666,7 +6686,7 @@  discard block
 block discarded – undo
6666 6686
 	/**
6667 6687
 	 * Stores and prints out domains to prefetch for page speed optimization.
6668 6688
 	 *
6669
-	 * @param mixed $new_urls
6689
+	 * @param string[] $new_urls
6670 6690
 	 */
6671 6691
 	public static function dns_prefetch( $new_urls = null ) {
6672 6692
 		static $prefetch_urls = array();
@@ -6721,7 +6741,6 @@  discard block
 block discarded – undo
6721 6741
 	}
6722 6742
 
6723 6743
 	/**
6724
-	 * @param mixed $result Value for the user's option
6725 6744
 	 * @return mixed
6726 6745
 	 */
6727 6746
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.