Completed
Push — update/dashboard-use-settings-... ( 7ca0ae...a2daf5 )
by
unknown
22:20 queued 06:05
created
class.jetpack.php 1 patch
Doc Comments   +44 added lines, -15 removed lines patch added patch discarded remove patch
@@ -934,7 +934,7 @@  discard block
 block discarded – undo
934 934
 	}
935 935
 	/**
936 936
 	 * Does the network allow admins to add new users.
937
-	 * @return boolian
937
+	 * @return boolean
938 938
 	 */
939 939
 	static function network_add_new_users( $option = null ) {
940 940
 		return (bool) get_site_option( 'add_new_users' );
@@ -1039,7 +1039,7 @@  discard block
 block discarded – undo
1039 1039
 	 * database which could be set to anything as opposed to what this function returns.
1040 1040
 	 * @param  bool  $option
1041 1041
 	 *
1042
-	 * @return boolean
1042
+	 * @return string
1043 1043
 	 */
1044 1044
 	public function is_main_network_option( $option ) {
1045 1045
 		// return '1' or ''
@@ -1050,7 +1050,7 @@  discard block
 block discarded – undo
1050 1050
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1051 1051
 	 *
1052 1052
 	 * @param  string  $option
1053
-	 * @return boolean
1053
+	 * @return string
1054 1054
 	 */
1055 1055
 	public function is_multisite( $option ) {
1056 1056
 		return (string) (bool) is_multisite();
@@ -1112,7 +1112,7 @@  discard block
 block discarded – undo
1112 1112
 
1113 1113
 	/**
1114 1114
 	 * Returns true if the site has file write access false otherwise.
1115
-	 * @return string ( '1' | '0' )
1115
+	 * @return integer ( '1' | '0' )
1116 1116
 	 **/
1117 1117
 	public static function file_system_write_access() {
1118 1118
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -1351,6 +1351,7 @@  discard block
 block discarded – undo
1351 1351
 	 * @access public
1352 1352
 	 * @static
1353 1353
 	 *
1354
+	 * @param string $feature
1354 1355
 	 * @return bool True if plan supports feature, false if not
1355 1356
 	 */
1356 1357
 	public static function active_plan_supports( $feature ) {
@@ -1887,6 +1888,7 @@  discard block
 block discarded – undo
1887 1888
 	 * @param int $user_id
1888 1889
 	 * @param string $token
1889 1890
 	 * return bool
1891
+	 * @param boolean $is_master_user
1890 1892
 	 */
1891 1893
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
1892 1894
 		// not designed for concurrent updates
@@ -2281,6 +2283,7 @@  discard block
 block discarded – undo
2281 2283
 
2282 2284
 	/**
2283 2285
 	 * Like core's get_file_data implementation, but caches the result.
2286
+	 * @param string $file
2284 2287
 	 */
2285 2288
 	public static function get_file_data( $file, $headers ) {
2286 2289
 		//Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated
@@ -2326,7 +2329,7 @@  discard block
 block discarded – undo
2326 2329
 	 *
2327 2330
 	 * @param string $tag Tag as it appears in each module heading.
2328 2331
 	 *
2329
-	 * @return mixed
2332
+	 * @return string
2330 2333
 	 */
2331 2334
 	public static function translate_module_tag( $tag ) {
2332 2335
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2339,7 +2342,7 @@  discard block
 block discarded – undo
2339 2342
 	 *
2340 2343
 	 * @param array $modules
2341 2344
 	 *
2342
-	 * @return string|void
2345
+	 * @return string
2343 2346
 	 */
2344 2347
 	public static function get_translated_modules( $modules ) {
2345 2348
 		foreach ( $modules as $index => $module ) {
@@ -2429,8 +2432,8 @@  discard block
 block discarded – undo
2429 2432
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2430 2433
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2431 2434
 	 *
2432
-	 * @param $string
2433
-	 * @return mixed
2435
+	 * @param string $string
2436
+	 * @return string|null
2434 2437
 	 */
2435 2438
 	public static function alias_directories( $string ) {
2436 2439
 		// ABSPATH has a trailing slash.
@@ -2685,6 +2688,9 @@  discard block
 block discarded – undo
2685 2688
 		return self::update_active_modules( $new );
2686 2689
 	}
2687 2690
 
2691
+	/**
2692
+	 * @param string $module
2693
+	 */
2688 2694
 	public static function enable_module_configurable( $module ) {
2689 2695
 		$module = Jetpack::get_module_slug( $module );
2690 2696
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -2695,21 +2701,33 @@  discard block
 block discarded – undo
2695 2701
 		return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) );
2696 2702
 	}
2697 2703
 
2704
+	/**
2705
+	 * @param string $module
2706
+	 */
2698 2707
 	public static function module_configuration_load( $module, $method ) {
2699 2708
 		$module = Jetpack::get_module_slug( $module );
2700 2709
 		add_action( 'jetpack_module_configuration_load_' . $module, $method );
2701 2710
 	}
2702 2711
 
2712
+	/**
2713
+	 * @param string $module
2714
+	 */
2703 2715
 	public static function module_configuration_head( $module, $method ) {
2704 2716
 		$module = Jetpack::get_module_slug( $module );
2705 2717
 		add_action( 'jetpack_module_configuration_head_' . $module, $method );
2706 2718
 	}
2707 2719
 
2720
+	/**
2721
+	 * @param string $module
2722
+	 */
2708 2723
 	public static function module_configuration_screen( $module, $method ) {
2709 2724
 		$module = Jetpack::get_module_slug( $module );
2710 2725
 		add_action( 'jetpack_module_configuration_screen_' . $module, $method );
2711 2726
 	}
2712 2727
 
2728
+	/**
2729
+	 * @param string $module
2730
+	 */
2713 2731
 	public static function module_configuration_activation_screen( $module, $method ) {
2714 2732
 		$module = Jetpack::get_module_slug( $module );
2715 2733
 		add_action( 'display_activate_module_setting_' . $module, $method );
@@ -2717,6 +2735,9 @@  discard block
 block discarded – undo
2717 2735
 
2718 2736
 /* Installation */
2719 2737
 
2738
+	/**
2739
+	 * @param string $message
2740
+	 */
2720 2741
 	public static function bail_on_activation( $message, $deactivate = true ) {
2721 2742
 ?>
2722 2743
 <!doctype html>
@@ -3416,7 +3437,7 @@  discard block
 block discarded – undo
3416 3437
 	 * Add help to the Jetpack page
3417 3438
 	 *
3418 3439
 	 * @since Jetpack (1.2.3)
3419
-	 * @return false if not the Jetpack page
3440
+	 * @return false|null if not the Jetpack page
3420 3441
 	 */
3421 3442
 	function admin_help() {
3422 3443
 		$current_screen = get_current_screen();
@@ -4421,6 +4442,7 @@  discard block
 block discarded – undo
4421 4442
 	/**
4422 4443
 	 * Returns the requested Jetpack API URL
4423 4444
 	 *
4445
+	 * @param string $relative_url
4424 4446
 	 * @return string
4425 4447
 	 */
4426 4448
 	public static function api_url( $relative_url ) {
@@ -4565,7 +4587,8 @@  discard block
 block discarded – undo
4565 4587
 	 * Note these tokens are unique per call, NOT static per site for connecting.
4566 4588
 	 *
4567 4589
 	 * @since 2.6
4568
-	 * @return array
4590
+	 * @param string $action
4591
+	 * @return string|boolean
4569 4592
 	 */
4570 4593
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
4571 4594
 		require_once JETPACK__PLUGIN_DIR . 'sync/class.jetpack-sync-options.php';
@@ -5047,7 +5070,6 @@  discard block
 block discarded – undo
5047 5070
 	/**
5048 5071
 	 * Report authentication status to the WP REST API.
5049 5072
 	 *
5050
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5051 5073
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5052 5074
 	 */
5053 5075
 	public function wp_rest_authentication_errors( $value ) {
@@ -5057,6 +5079,10 @@  discard block
 block discarded – undo
5057 5079
 		return $this->rest_authentication_status;
5058 5080
 	}
5059 5081
 
5082
+	/**
5083
+	 * @param integer $timestamp
5084
+	 * @param string $nonce
5085
+	 */
5060 5086
 	function add_nonce( $timestamp, $nonce ) {
5061 5087
 		global $wpdb;
5062 5088
 		static $nonces_used_this_request = array();
@@ -5202,6 +5228,7 @@  discard block
 block discarded – undo
5202 5228
 	 * @param string $key
5203 5229
 	 * @param string $value
5204 5230
 	 * @param bool $restate private
5231
+	 * @return string
5205 5232
 	 */
5206 5233
 	public static function state( $key = null, $value = null, $restate = false ) {
5207 5234
 		static $state = array();
@@ -5258,6 +5285,9 @@  discard block
 block discarded – undo
5258 5285
 		Jetpack::state( null, null, true );
5259 5286
 	}
5260 5287
 
5288
+	/**
5289
+	 * @param string $file
5290
+	 */
5261 5291
 	public static function check_privacy( $file ) {
5262 5292
 		static $is_site_publicly_accessible = null;
5263 5293
 
@@ -5990,8 +6020,8 @@  discard block
 block discarded – undo
5990 6020
 	 *  - Absolute URLs             `http://domain.com/feh.png`
5991 6021
 	 *  - Domain root relative URLs `/feh.png`
5992 6022
 	 *
5993
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
5994
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6023
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6024
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
5995 6025
 	 *
5996 6026
 	 * @return mixed|string
5997 6027
 	 */
@@ -6282,7 +6312,7 @@  discard block
 block discarded – undo
6282 6312
 	 *
6283 6313
 	 * @param string $option_name
6284 6314
 	 *
6285
-	 * @return bool
6315
+	 * @return false|null
6286 6316
 	 */
6287 6317
 	public static function jumpstart_has_updated_module_option( $option_name = '' ) {
6288 6318
 		// Bail if Jump Start has already been dismissed
@@ -6373,7 +6403,6 @@  discard block
 block discarded – undo
6373 6403
 	}
6374 6404
 
6375 6405
 	/**
6376
-	 * @param mixed $result Value for the user's option
6377 6406
 	 * @return mixed
6378 6407
 	 */
6379 6408
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.