Completed
Push — update/remove-manage-module ( 50a0e4 )
by
unknown
12:40
created
class.jetpack.php 1 patch
Doc Comments   +41 added lines, -18 removed lines patch added patch discarded remove patch
@@ -686,7 +686,7 @@  discard block
 block discarded – undo
686 686
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
687 687
 	 *
688 688
 	 * @param $domains
689
-	 * @return array
689
+	 * @return string[]
690 690
 	 */
691 691
 	function allow_wpcom_domain( $domains ) {
692 692
 		if ( empty( $domains ) ) {
@@ -1132,7 +1132,7 @@  discard block
 block discarded – undo
1132 1132
 	}
1133 1133
 	/**
1134 1134
 	 * Does the network allow admins to add new users.
1135
-	 * @return boolian
1135
+	 * @return boolean
1136 1136
 	 */
1137 1137
 	static function network_add_new_users( $option = null ) {
1138 1138
 		return (bool) get_site_option( 'add_new_users' );
@@ -1237,7 +1237,7 @@  discard block
 block discarded – undo
1237 1237
 	 * database which could be set to anything as opposed to what this function returns.
1238 1238
 	 * @param  bool  $option
1239 1239
 	 *
1240
-	 * @return boolean
1240
+	 * @return string
1241 1241
 	 */
1242 1242
 	public function is_main_network_option( $option ) {
1243 1243
 		// return '1' or ''
@@ -1248,7 +1248,7 @@  discard block
 block discarded – undo
1248 1248
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1249 1249
 	 *
1250 1250
 	 * @param  string  $option
1251
-	 * @return boolean
1251
+	 * @return string
1252 1252
 	 */
1253 1253
 	public function is_multisite( $option ) {
1254 1254
 		return (string) (bool) is_multisite();
@@ -1310,7 +1310,7 @@  discard block
 block discarded – undo
1310 1310
 
1311 1311
 	/**
1312 1312
 	 * Returns true if the site has file write access false otherwise.
1313
-	 * @return string ( '1' | '0' )
1313
+	 * @return integer ( '1' | '0' )
1314 1314
 	 **/
1315 1315
 	public static function file_system_write_access() {
1316 1316
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2111,6 +2111,7 @@  discard block
 block discarded – undo
2111 2111
 	 * @param int $user_id
2112 2112
 	 * @param string $token
2113 2113
 	 * return bool
2114
+	 * @param boolean $is_master_user
2114 2115
 	 */
2115 2116
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2116 2117
 		// not designed for concurrent updates
@@ -2513,6 +2514,7 @@  discard block
 block discarded – undo
2513 2514
 
2514 2515
 	/**
2515 2516
 	 * Like core's get_file_data implementation, but caches the result.
2517
+	 * @param string $file
2516 2518
 	 */
2517 2519
 	public static function get_file_data( $file, $headers ) {
2518 2520
 		//Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated
@@ -2549,7 +2551,7 @@  discard block
 block discarded – undo
2549 2551
 	 *
2550 2552
 	 * @param string $tag Tag as it appears in each module heading.
2551 2553
 	 *
2552
-	 * @return mixed
2554
+	 * @return string
2553 2555
 	 */
2554 2556
 	public static function translate_module_tag( $tag ) {
2555 2557
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2669,8 +2671,8 @@  discard block
 block discarded – undo
2669 2671
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2670 2672
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2671 2673
 	 *
2672
-	 * @param $string
2673
-	 * @return mixed
2674
+	 * @param string $string
2675
+	 * @return string|null
2674 2676
 	 */
2675 2677
 	public static function alias_directories( $string ) {
2676 2678
 		// ABSPATH has a trailing slash.
@@ -2950,6 +2952,9 @@  discard block
 block discarded – undo
2950 2952
 		return self::update_active_modules( $new );
2951 2953
 	}
2952 2954
 
2955
+	/**
2956
+	 * @param string $module
2957
+	 */
2953 2958
 	public static function enable_module_configurable( $module ) {
2954 2959
 		$module = Jetpack::get_module_slug( $module );
2955 2960
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -2960,16 +2965,25 @@  discard block
 block discarded – undo
2960 2965
 		return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) );
2961 2966
 	}
2962 2967
 
2968
+	/**
2969
+	 * @param string $module
2970
+	 */
2963 2971
 	public static function module_configuration_load( $module, $method ) {
2964 2972
 		$module = Jetpack::get_module_slug( $module );
2965 2973
 		add_action( 'jetpack_module_configuration_load_' . $module, $method );
2966 2974
 	}
2967 2975
 
2976
+	/**
2977
+	 * @param string $module
2978
+	 */
2968 2979
 	public static function module_configuration_head( $module, $method ) {
2969 2980
 		$module = Jetpack::get_module_slug( $module );
2970 2981
 		add_action( 'jetpack_module_configuration_head_' . $module, $method );
2971 2982
 	}
2972 2983
 
2984
+	/**
2985
+	 * @param string $module
2986
+	 */
2973 2987
 	public static function module_configuration_screen( $module, $method ) {
2974 2988
 		$module = Jetpack::get_module_slug( $module );
2975 2989
 		add_action( 'jetpack_module_configuration_screen_' . $module, $method );
@@ -2982,6 +2996,9 @@  discard block
 block discarded – undo
2982 2996
 
2983 2997
 /* Installation */
2984 2998
 
2999
+	/**
3000
+	 * @param string $message
3001
+	 */
2985 3002
 	public static function bail_on_activation( $message, $deactivate = true ) {
2986 3003
 ?>
2987 3004
 <!doctype html>
@@ -3717,7 +3734,7 @@  discard block
 block discarded – undo
3717 3734
 	 * Add help to the Jetpack page
3718 3735
 	 *
3719 3736
 	 * @since Jetpack (1.2.3)
3720
-	 * @return false if not the Jetpack page
3737
+	 * @return false|null if not the Jetpack page
3721 3738
 	 */
3722 3739
 	function admin_help() {
3723 3740
 		$current_screen = get_current_screen();
@@ -4679,6 +4696,7 @@  discard block
 block discarded – undo
4679 4696
 	/**
4680 4697
 	 * Returns the requested Jetpack API URL
4681 4698
 	 *
4699
+	 * @param string $relative_url
4682 4700
 	 * @return string
4683 4701
 	 */
4684 4702
 	public static function api_url( $relative_url ) {
@@ -4870,7 +4888,8 @@  discard block
 block discarded – undo
4870 4888
 	 * Note these tokens are unique per call, NOT static per site for connecting.
4871 4889
 	 *
4872 4890
 	 * @since 2.6
4873
-	 * @return array
4891
+	 * @param string $action
4892
+	 * @return boolean
4874 4893
 	 */
4875 4894
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
4876 4895
 		if ( ! $user_id ) {
@@ -5422,7 +5441,6 @@  discard block
 block discarded – undo
5422 5441
 	/**
5423 5442
 	 * Report authentication status to the WP REST API.
5424 5443
 	 *
5425
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5426 5444
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5427 5445
 	 */
5428 5446
 	public function wp_rest_authentication_errors( $value ) {
@@ -5432,6 +5450,10 @@  discard block
 block discarded – undo
5432 5450
 		return $this->rest_authentication_status;
5433 5451
 	}
5434 5452
 
5453
+	/**
5454
+	 * @param integer $timestamp
5455
+	 * @param string $nonce
5456
+	 */
5435 5457
 	function add_nonce( $timestamp, $nonce ) {
5436 5458
 		global $wpdb;
5437 5459
 		static $nonces_used_this_request = array();
@@ -5577,6 +5599,7 @@  discard block
 block discarded – undo
5577 5599
 	 * @param string $key
5578 5600
 	 * @param string $value
5579 5601
 	 * @param bool $restate private
5602
+	 * @return string
5580 5603
 	 */
5581 5604
 	public static function state( $key = null, $value = null, $restate = false ) {
5582 5605
 		static $state = array();
@@ -5633,6 +5656,9 @@  discard block
 block discarded – undo
5633 5656
 		Jetpack::state( null, null, true );
5634 5657
 	}
5635 5658
 
5659
+	/**
5660
+	 * @param string $file
5661
+	 */
5636 5662
 	public static function check_privacy( $file ) {
5637 5663
 		static $is_site_publicly_accessible = null;
5638 5664
 
@@ -6250,9 +6276,7 @@  discard block
 block discarded – undo
6250 6276
 	 *
6251 6277
 	 * Attached to `style_loader_src` filter.
6252 6278
 	 *
6253
-	 * @param string $tag The tag that would link to the external asset.
6254 6279
 	 * @param string $handle The registered handle of the script in question.
6255
-	 * @param string $href The url of the asset in question.
6256 6280
 	 */
6257 6281
 	public static function set_suffix_on_min( $src, $handle ) {
6258 6282
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6429,8 +6453,8 @@  discard block
 block discarded – undo
6429 6453
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6430 6454
 	 *  - Domain root relative URLs `/feh.png`
6431 6455
 	 *
6432
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6433
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6456
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6457
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6434 6458
 	 *
6435 6459
 	 * @return mixed|string
6436 6460
 	 */
@@ -6659,7 +6683,7 @@  discard block
 block discarded – undo
6659 6683
 	 *
6660 6684
 	 * @param string $option_name
6661 6685
 	 *
6662
-	 * @return bool
6686
+	 * @return false|null
6663 6687
 	 */
6664 6688
 	public static function jumpstart_has_updated_module_option( $option_name = '' ) {
6665 6689
 		// Bail if Jump Start has already been dismissed
@@ -6700,7 +6724,7 @@  discard block
 block discarded – undo
6700 6724
 	/**
6701 6725
 	 * Stores and prints out domains to prefetch for page speed optimization.
6702 6726
 	 *
6703
-	 * @param mixed $new_urls
6727
+	 * @param string[] $new_urls
6704 6728
 	 */
6705 6729
 	public static function dns_prefetch( $new_urls = null ) {
6706 6730
 		static $prefetch_urls = array();
@@ -6746,7 +6770,6 @@  discard block
 block discarded – undo
6746 6770
 	}
6747 6771
 
6748 6772
 	/**
6749
-	 * @param mixed $result Value for the user's option
6750 6773
 	 * @return mixed
6751 6774
 	 */
6752 6775
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.