Completed
Push — add/private-sites ( 3559f7...c48986 )
by
unknown
44:12 queued 33:50
created
class.jetpack.php 1 patch
Doc Comments   +37 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' ) ) {
@@ -1844,7 +1844,7 @@  discard block
 block discarded – undo
1844 1844
 	/**
1845 1845
 	 * Loads modules from given array, otherwise all the currently active modules.
1846 1846
 	 *
1847
-	 * @param array $modules Specific modules to be loaded.
1847
+	 * @param string[] $modules Specific modules to be loaded.
1848 1848
 	 */
1849 1849
 	public static function load_modules( $modules = array() ) {
1850 1850
 		if (
@@ -2193,6 +2193,7 @@  discard block
 block discarded – undo
2193 2193
 	 * @param int $user_id
2194 2194
 	 * @param string $token
2195 2195
 	 * return bool
2196
+	 * @param boolean $is_master_user
2196 2197
 	 */
2197 2198
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2198 2199
 		// not designed for concurrent updates
@@ -2595,6 +2596,7 @@  discard block
 block discarded – undo
2595 2596
 
2596 2597
 	/**
2597 2598
 	 * Like core's get_file_data implementation, but caches the result.
2599
+	 * @param string $file
2598 2600
 	 */
2599 2601
 	public static function get_file_data( $file, $headers ) {
2600 2602
 		//Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated
@@ -2631,7 +2633,7 @@  discard block
 block discarded – undo
2631 2633
 	 *
2632 2634
 	 * @param string $tag Tag as it appears in each module heading.
2633 2635
 	 *
2634
-	 * @return mixed
2636
+	 * @return string
2635 2637
 	 */
2636 2638
 	public static function translate_module_tag( $tag ) {
2637 2639
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2803,8 +2805,8 @@  discard block
 block discarded – undo
2803 2805
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2804 2806
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2805 2807
 	 *
2806
-	 * @param $string
2807
-	 * @return mixed
2808
+	 * @param string $string
2809
+	 * @return string|null
2808 2810
 	 */
2809 2811
 	public static function alias_directories( $string ) {
2810 2812
 		// ABSPATH has a trailing slash.
@@ -3064,6 +3066,9 @@  discard block
 block discarded – undo
3064 3066
 		return self::update_active_modules( $new );
3065 3067
 	}
3066 3068
 
3069
+	/**
3070
+	 * @param string $module
3071
+	 */
3067 3072
 	public static function enable_module_configurable( $module ) {
3068 3073
 		$module = Jetpack::get_module_slug( $module );
3069 3074
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -3092,6 +3097,9 @@  discard block
 block discarded – undo
3092 3097
 	}
3093 3098
 
3094 3099
 /* Installation */
3100
+	/**
3101
+	 * @param string $message
3102
+	 */
3095 3103
 	public static function bail_on_activation( $message, $deactivate = true ) {
3096 3104
 ?>
3097 3105
 <!doctype html>
@@ -3826,7 +3834,7 @@  discard block
 block discarded – undo
3826 3834
 	 * Add help to the Jetpack page
3827 3835
 	 *
3828 3836
 	 * @since Jetpack (1.2.3)
3829
-	 * @return false if not the Jetpack page
3837
+	 * @return false|null if not the Jetpack page
3830 3838
 	 */
3831 3839
 	function admin_help() {
3832 3840
 		$current_screen = get_current_screen();
@@ -4648,6 +4656,9 @@  discard block
 block discarded – undo
4648 4656
 		return $url;
4649 4657
 	}
4650 4658
 
4659
+	/**
4660
+	 * @return string
4661
+	 */
4651 4662
 	public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) {
4652 4663
 		$actionurl = str_replace( '&amp;', '&', $actionurl );
4653 4664
 		return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
@@ -4707,6 +4718,7 @@  discard block
 block discarded – undo
4707 4718
 	/**
4708 4719
 	 * Returns the requested Jetpack API URL
4709 4720
 	 *
4721
+	 * @param string $relative_url
4710 4722
 	 * @return string
4711 4723
 	 */
4712 4724
 	public static function api_url( $relative_url ) {
@@ -4898,6 +4910,7 @@  discard block
 block discarded – undo
4898 4910
 	 * Note these tokens are unique per call, NOT static per site for connecting.
4899 4911
 	 *
4900 4912
 	 * @since 2.6
4913
+	 * @param string $action
4901 4914
 	 * @return array
4902 4915
 	 */
4903 4916
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
@@ -5432,7 +5445,6 @@  discard block
 block discarded – undo
5432 5445
 	/**
5433 5446
 	 * Report authentication status to the WP REST API.
5434 5447
 	 *
5435
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5436 5448
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5437 5449
 	 */
5438 5450
 	public function wp_rest_authentication_errors( $value ) {
@@ -5442,6 +5454,10 @@  discard block
 block discarded – undo
5442 5454
 		return $this->rest_authentication_status;
5443 5455
 	}
5444 5456
 
5457
+	/**
5458
+	 * @param integer $timestamp
5459
+	 * @param string $nonce
5460
+	 */
5445 5461
 	function add_nonce( $timestamp, $nonce ) {
5446 5462
 		global $wpdb;
5447 5463
 		static $nonces_used_this_request = array();
@@ -5587,6 +5603,7 @@  discard block
 block discarded – undo
5587 5603
 	 * @param string $key
5588 5604
 	 * @param string $value
5589 5605
 	 * @param bool $restate private
5606
+	 * @return string
5590 5607
 	 */
5591 5608
 	public static function state( $key = null, $value = null, $restate = false ) {
5592 5609
 		static $state = array();
@@ -5643,6 +5660,9 @@  discard block
 block discarded – undo
5643 5660
 		Jetpack::state( null, null, true );
5644 5661
 	}
5645 5662
 
5663
+	/**
5664
+	 * @param string $file
5665
+	 */
5646 5666
 	public static function check_privacy( $file ) {
5647 5667
 		static $is_site_publicly_accessible = null;
5648 5668
 
@@ -5725,6 +5745,9 @@  discard block
 block discarded – undo
5725 5745
 		}
5726 5746
 	}
5727 5747
 
5748
+	/**
5749
+	 * @param string $url
5750
+	 */
5728 5751
 	public static function staticize_subdomain( $url ) {
5729 5752
 
5730 5753
 		// Extract hostname from URL
@@ -6275,9 +6298,7 @@  discard block
 block discarded – undo
6275 6298
 	 *
6276 6299
 	 * Attached to `style_loader_src` filter.
6277 6300
 	 *
6278
-	 * @param string $tag The tag that would link to the external asset.
6279 6301
 	 * @param string $handle The registered handle of the script in question.
6280
-	 * @param string $href The url of the asset in question.
6281 6302
 	 */
6282 6303
 	public static function set_suffix_on_min( $src, $handle ) {
6283 6304
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6464,8 +6485,8 @@  discard block
 block discarded – undo
6464 6485
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6465 6486
 	 *  - Domain root relative URLs `/feh.png`
6466 6487
 	 *
6467
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6468
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6488
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6489
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6469 6490
 	 *
6470 6491
 	 * @return mixed|string
6471 6492
 	 */
@@ -6708,7 +6729,7 @@  discard block
 block discarded – undo
6708 6729
 	/**
6709 6730
 	 * Stores and prints out domains to prefetch for page speed optimization.
6710 6731
 	 *
6711
-	 * @param mixed $new_urls
6732
+	 * @param string[] $new_urls
6712 6733
 	 */
6713 6734
 	public static function dns_prefetch( $new_urls = null ) {
6714 6735
 		static $prefetch_urls = array();
@@ -6763,7 +6784,6 @@  discard block
 block discarded – undo
6763 6784
 	}
6764 6785
 
6765 6786
 	/**
6766
-	 * @param mixed $result Value for the user's option
6767 6787
 	 * @return mixed
6768 6788
 	 */
6769 6789
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.