Completed
Push — try/connection-split ( b396da...80b269 )
by
unknown
14:04 queued 07:02
created
class.jetpack.php 1 patch
Doc Comments   +36 added lines, -17 removed lines patch added patch discarded remove patch
@@ -723,7 +723,7 @@  discard block
 block discarded – undo
723 723
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
724 724
 	 *
725 725
 	 * @param $domains
726
-	 * @return array
726
+	 * @return string[]
727 727
 	 */
728 728
 	function allow_wpcom_domain( $domains ) {
729 729
 		if ( empty( $domains ) ) {
@@ -1243,7 +1243,7 @@  discard block
 block discarded – undo
1243 1243
 	}
1244 1244
 	/**
1245 1245
 	 * Does the network allow admins to add new users.
1246
-	 * @return boolian
1246
+	 * @return boolean
1247 1247
 	 */
1248 1248
 	static function network_add_new_users( $option = null ) {
1249 1249
 		return (bool) get_site_option( 'add_new_users' );
@@ -1348,7 +1348,7 @@  discard block
 block discarded – undo
1348 1348
 	 * database which could be set to anything as opposed to what this function returns.
1349 1349
 	 * @param  bool  $option
1350 1350
 	 *
1351
-	 * @return boolean
1351
+	 * @return string
1352 1352
 	 */
1353 1353
 	public function is_main_network_option( $option ) {
1354 1354
 		// return '1' or ''
@@ -1359,7 +1359,7 @@  discard block
 block discarded – undo
1359 1359
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1360 1360
 	 *
1361 1361
 	 * @param  string  $option
1362
-	 * @return boolean
1362
+	 * @return string
1363 1363
 	 */
1364 1364
 	public function is_multisite( $option ) {
1365 1365
 		return (string) (bool) is_multisite();
@@ -1421,7 +1421,7 @@  discard block
 block discarded – undo
1421 1421
 
1422 1422
 	/**
1423 1423
 	 * Returns true if the site has file write access false otherwise.
1424
-	 * @return string ( '1' | '0' )
1424
+	 * @return integer ( '1' | '0' )
1425 1425
 	 **/
1426 1426
 	public static function file_system_write_access() {
1427 1427
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -1866,7 +1866,7 @@  discard block
 block discarded – undo
1866 1866
 	/**
1867 1867
 	 * Loads modules from given array, otherwise all the currently active modules.
1868 1868
 	 *
1869
-	 * @param array $modules Specific modules to be loaded.
1869
+	 * @param string[] $modules Specific modules to be loaded.
1870 1870
 	 */
1871 1871
 	public static function load_modules( $modules = array() ) {
1872 1872
 		if (
@@ -2215,6 +2215,7 @@  discard block
 block discarded – undo
2215 2215
 	 * @param int $user_id
2216 2216
 	 * @param string $token
2217 2217
 	 * return bool
2218
+	 * @param boolean $is_master_user
2218 2219
 	 */
2219 2220
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2220 2221
 		// not designed for concurrent updates
@@ -2661,7 +2662,7 @@  discard block
 block discarded – undo
2661 2662
 	 *
2662 2663
 	 * @param string $tag Tag as it appears in each module heading.
2663 2664
 	 *
2664
-	 * @return mixed
2665
+	 * @return string
2665 2666
 	 */
2666 2667
 	public static function translate_module_tag( $tag ) {
2667 2668
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2833,8 +2834,8 @@  discard block
 block discarded – undo
2833 2834
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2834 2835
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2835 2836
 	 *
2836
-	 * @param $string
2837
-	 * @return mixed
2837
+	 * @param string $string
2838
+	 * @return string|null
2838 2839
 	 */
2839 2840
 	public static function alias_directories( $string ) {
2840 2841
 		// ABSPATH has a trailing slash.
@@ -3094,6 +3095,9 @@  discard block
 block discarded – undo
3094 3095
 		return self::update_active_modules( $new );
3095 3096
 	}
3096 3097
 
3098
+	/**
3099
+	 * @param string $module
3100
+	 */
3097 3101
 	public static function enable_module_configurable( $module ) {
3098 3102
 		$module = Jetpack::get_module_slug( $module );
3099 3103
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -3122,6 +3126,9 @@  discard block
 block discarded – undo
3122 3126
 	}
3123 3127
 
3124 3128
 /* Installation */
3129
+	/**
3130
+	 * @param string $message
3131
+	 */
3125 3132
 	public static function bail_on_activation( $message, $deactivate = true ) {
3126 3133
 ?>
3127 3134
 <!doctype html>
@@ -3856,7 +3863,7 @@  discard block
 block discarded – undo
3856 3863
 	 * Add help to the Jetpack page
3857 3864
 	 *
3858 3865
 	 * @since Jetpack (1.2.3)
3859
-	 * @return false if not the Jetpack page
3866
+	 * @return false|null if not the Jetpack page
3860 3867
 	 */
3861 3868
 	function admin_help() {
3862 3869
 		$current_screen = get_current_screen();
@@ -4678,6 +4685,9 @@  discard block
 block discarded – undo
4678 4685
 		return $url;
4679 4686
 	}
4680 4687
 
4688
+	/**
4689
+	 * @return string
4690
+	 */
4681 4691
 	public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) {
4682 4692
 		$actionurl = str_replace( '&amp;', '&', $actionurl );
4683 4693
 		return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
@@ -4737,6 +4747,7 @@  discard block
 block discarded – undo
4737 4747
 	/**
4738 4748
 	 * Returns the requested Jetpack API URL
4739 4749
 	 *
4750
+	 * @param string $relative_url
4740 4751
 	 * @return string
4741 4752
 	 */
4742 4753
 	public static function api_url( $relative_url ) {
@@ -4928,6 +4939,7 @@  discard block
 block discarded – undo
4928 4939
 	 * Note these tokens are unique per call, NOT static per site for connecting.
4929 4940
 	 *
4930 4941
 	 * @since 2.6
4942
+	 * @param string $action
4931 4943
 	 * @return array
4932 4944
 	 */
4933 4945
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
@@ -5462,7 +5474,6 @@  discard block
 block discarded – undo
5462 5474
 	/**
5463 5475
 	 * Report authentication status to the WP REST API.
5464 5476
 	 *
5465
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5466 5477
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5467 5478
 	 */
5468 5479
 	public function wp_rest_authentication_errors( $value ) {
@@ -5472,6 +5483,10 @@  discard block
 block discarded – undo
5472 5483
 		return $this->rest_authentication_status;
5473 5484
 	}
5474 5485
 
5486
+	/**
5487
+	 * @param integer $timestamp
5488
+	 * @param string $nonce
5489
+	 */
5475 5490
 	function add_nonce( $timestamp, $nonce ) {
5476 5491
 		global $wpdb;
5477 5492
 		static $nonces_used_this_request = array();
@@ -5617,6 +5632,7 @@  discard block
 block discarded – undo
5617 5632
 	 * @param string $key
5618 5633
 	 * @param string $value
5619 5634
 	 * @param bool $restate private
5635
+	 * @return string
5620 5636
 	 */
5621 5637
 	public static function state( $key = null, $value = null, $restate = false ) {
5622 5638
 		static $state = array();
@@ -5673,6 +5689,9 @@  discard block
 block discarded – undo
5673 5689
 		Jetpack::state( null, null, true );
5674 5690
 	}
5675 5691
 
5692
+	/**
5693
+	 * @param string $file
5694
+	 */
5676 5695
 	public static function check_privacy( $file ) {
5677 5696
 		static $is_site_publicly_accessible = null;
5678 5697
 
@@ -5755,6 +5774,9 @@  discard block
 block discarded – undo
5755 5774
 		}
5756 5775
 	}
5757 5776
 
5777
+	/**
5778
+	 * @param string $url
5779
+	 */
5758 5780
 	public static function staticize_subdomain( $url ) {
5759 5781
 
5760 5782
 		// Extract hostname from URL
@@ -6305,9 +6327,7 @@  discard block
 block discarded – undo
6305 6327
 	 *
6306 6328
 	 * Attached to `style_loader_src` filter.
6307 6329
 	 *
6308
-	 * @param string $tag The tag that would link to the external asset.
6309 6330
 	 * @param string $handle The registered handle of the script in question.
6310
-	 * @param string $href The url of the asset in question.
6311 6331
 	 */
6312 6332
 	public static function set_suffix_on_min( $src, $handle ) {
6313 6333
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6494,8 +6514,8 @@  discard block
 block discarded – undo
6494 6514
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6495 6515
 	 *  - Domain root relative URLs `/feh.png`
6496 6516
 	 *
6497
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6498
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6517
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6518
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6499 6519
 	 *
6500 6520
 	 * @return mixed|string
6501 6521
 	 */
@@ -6738,7 +6758,7 @@  discard block
 block discarded – undo
6738 6758
 	/**
6739 6759
 	 * Stores and prints out domains to prefetch for page speed optimization.
6740 6760
 	 *
6741
-	 * @param mixed $new_urls
6761
+	 * @param string[] $new_urls
6742 6762
 	 */
6743 6763
 	public static function dns_prefetch( $new_urls = null ) {
6744 6764
 		static $prefetch_urls = array();
@@ -6793,7 +6813,6 @@  discard block
 block discarded – undo
6793 6813
 	}
6794 6814
 
6795 6815
 	/**
6796
-	 * @param mixed $result Value for the user's option
6797 6816
 	 * @return mixed
6798 6817
 	 */
6799 6818
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.