Completed
Push — update/manage-baked-in ( a896c8...5a228f )
by
unknown
40:30 queued 31:04
created
class.jetpack.php 1 patch
Doc Comments   +43 added lines, -16 removed lines patch added patch discarded remove patch
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
614 614
 	 *
615 615
 	 * @param $domains
616
-	 * @return array
616
+	 * @return string[]
617 617
 	 */
618 618
 	function allow_wpcom_domain( $domains ) {
619 619
 		if ( empty( $domains ) ) {
@@ -956,7 +956,7 @@  discard block
 block discarded – undo
956 956
 	}
957 957
 	/**
958 958
 	 * Does the network allow admins to add new users.
959
-	 * @return boolian
959
+	 * @return boolean
960 960
 	 */
961 961
 	static function network_add_new_users( $option = null ) {
962 962
 		return (bool) get_site_option( 'add_new_users' );
@@ -1061,7 +1061,7 @@  discard block
 block discarded – undo
1061 1061
 	 * database which could be set to anything as opposed to what this function returns.
1062 1062
 	 * @param  bool  $option
1063 1063
 	 *
1064
-	 * @return boolean
1064
+	 * @return string
1065 1065
 	 */
1066 1066
 	public function is_main_network_option( $option ) {
1067 1067
 		// return '1' or ''
@@ -1072,7 +1072,7 @@  discard block
 block discarded – undo
1072 1072
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1073 1073
 	 *
1074 1074
 	 * @param  string  $option
1075
-	 * @return boolean
1075
+	 * @return string
1076 1076
 	 */
1077 1077
 	public function is_multisite( $option ) {
1078 1078
 		return (string) (bool) is_multisite();
@@ -1134,7 +1134,7 @@  discard block
 block discarded – undo
1134 1134
 
1135 1135
 	/**
1136 1136
 	 * Returns true if the site has file write access false otherwise.
1137
-	 * @return string ( '1' | '0' )
1137
+	 * @return integer ( '1' | '0' )
1138 1138
 	 **/
1139 1139
 	public static function file_system_write_access() {
1140 1140
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -1373,6 +1373,7 @@  discard block
 block discarded – undo
1373 1373
 	 * @access public
1374 1374
 	 * @static
1375 1375
 	 *
1376
+	 * @param string $feature
1376 1377
 	 * @return bool True if plan supports feature, false if not
1377 1378
 	 */
1378 1379
 	public static function active_plan_supports( $feature ) {
@@ -1872,6 +1873,7 @@  discard block
 block discarded – undo
1872 1873
 	* Stores two secrets and a timestamp so WordPress.com can make a request back and verify an action
1873 1874
 	* Does some extra verification so urls (such as those to public-api, register, etc) can't just be crafted
1874 1875
 	* $name must be a registered option name.
1876
+	* @param string $name
1875 1877
 	*/
1876 1878
 	public static function create_nonce( $name ) {
1877 1879
 		$secret = wp_generate_password( 32, false ) . ':' . wp_generate_password( 32, false ) . ':' . ( time() + 600 );
@@ -1929,6 +1931,7 @@  discard block
 block discarded – undo
1929 1931
 	 * @param int $user_id
1930 1932
 	 * @param string $token
1931 1933
 	 * return bool
1934
+	 * @param boolean $is_master_user
1932 1935
 	 */
1933 1936
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
1934 1937
 		// not designed for concurrent updates
@@ -2323,6 +2326,7 @@  discard block
 block discarded – undo
2323 2326
 
2324 2327
 	/**
2325 2328
 	 * Like core's get_file_data implementation, but caches the result.
2329
+	 * @param string $file
2326 2330
 	 */
2327 2331
 	public static function get_file_data( $file, $headers ) {
2328 2332
 		//Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated
@@ -2368,7 +2372,7 @@  discard block
 block discarded – undo
2368 2372
 	 *
2369 2373
 	 * @param string $tag Tag as it appears in each module heading.
2370 2374
 	 *
2371
-	 * @return mixed
2375
+	 * @return string
2372 2376
 	 */
2373 2377
 	public static function translate_module_tag( $tag ) {
2374 2378
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2381,7 +2385,7 @@  discard block
 block discarded – undo
2381 2385
 	 *
2382 2386
 	 * @param array $modules
2383 2387
 	 *
2384
-	 * @return string|void
2388
+	 * @return string
2385 2389
 	 */
2386 2390
 	public static function get_translated_modules( $modules ) {
2387 2391
 		foreach ( $modules as $index => $module ) {
@@ -2471,8 +2475,8 @@  discard block
 block discarded – undo
2471 2475
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2472 2476
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2473 2477
 	 *
2474
-	 * @param $string
2475
-	 * @return mixed
2478
+	 * @param string $string
2479
+	 * @return string|null
2476 2480
 	 */
2477 2481
 	public static function alias_directories( $string ) {
2478 2482
 		// ABSPATH has a trailing slash.
@@ -2727,6 +2731,9 @@  discard block
 block discarded – undo
2727 2731
 		return self::update_active_modules( $new );
2728 2732
 	}
2729 2733
 
2734
+	/**
2735
+	 * @param string $module
2736
+	 */
2730 2737
 	public static function enable_module_configurable( $module ) {
2731 2738
 		$module = Jetpack::get_module_slug( $module );
2732 2739
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -2737,16 +2744,25 @@  discard block
 block discarded – undo
2737 2744
 		return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) );
2738 2745
 	}
2739 2746
 
2747
+	/**
2748
+	 * @param string $module
2749
+	 */
2740 2750
 	public static function module_configuration_load( $module, $method ) {
2741 2751
 		$module = Jetpack::get_module_slug( $module );
2742 2752
 		add_action( 'jetpack_module_configuration_load_' . $module, $method );
2743 2753
 	}
2744 2754
 
2755
+	/**
2756
+	 * @param string $module
2757
+	 */
2745 2758
 	public static function module_configuration_head( $module, $method ) {
2746 2759
 		$module = Jetpack::get_module_slug( $module );
2747 2760
 		add_action( 'jetpack_module_configuration_head_' . $module, $method );
2748 2761
 	}
2749 2762
 
2763
+	/**
2764
+	 * @param string $module
2765
+	 */
2750 2766
 	public static function module_configuration_screen( $module, $method ) {
2751 2767
 		$module = Jetpack::get_module_slug( $module );
2752 2768
 		add_action( 'jetpack_module_configuration_screen_' . $module, $method );
@@ -2759,6 +2775,9 @@  discard block
 block discarded – undo
2759 2775
 
2760 2776
 /* Installation */
2761 2777
 
2778
+	/**
2779
+	 * @param string $message
2780
+	 */
2762 2781
 	public static function bail_on_activation( $message, $deactivate = true ) {
2763 2782
 ?>
2764 2783
 <!doctype html>
@@ -3436,7 +3455,7 @@  discard block
 block discarded – undo
3436 3455
 	 * Add help to the Jetpack page
3437 3456
 	 *
3438 3457
 	 * @since Jetpack (1.2.3)
3439
-	 * @return false if not the Jetpack page
3458
+	 * @return false|null if not the Jetpack page
3440 3459
 	 */
3441 3460
 	function admin_help() {
3442 3461
 		$current_screen = get_current_screen();
@@ -4286,6 +4305,7 @@  discard block
 block discarded – undo
4286 4305
 	/**
4287 4306
 	 * Returns the requested Jetpack API URL
4288 4307
 	 *
4308
+	 * @param string $relative_url
4289 4309
 	 * @return string
4290 4310
 	 */
4291 4311
 	public static function api_url( $relative_url ) {
@@ -4430,7 +4450,8 @@  discard block
 block discarded – undo
4430 4450
 	 * Note these tokens are unique per call, NOT static per site for connecting.
4431 4451
 	 *
4432 4452
 	 * @since 2.6
4433
-	 * @return array
4453
+	 * @param string $action
4454
+	 * @return string
4434 4455
 	 */
4435 4456
 	public function generate_secrets( $action, $exp = 600 ) {
4436 4457
 	    $secret = wp_generate_password( 32, false ) // secret_1
@@ -4863,7 +4884,6 @@  discard block
 block discarded – undo
4863 4884
 	/**
4864 4885
 	 * Report authentication status to the WP REST API.
4865 4886
 	 *
4866
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
4867 4887
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
4868 4888
 	 */
4869 4889
 	public function wp_rest_authentication_errors( $value ) {
@@ -4873,6 +4893,10 @@  discard block
 block discarded – undo
4873 4893
 		return $this->rest_authentication_status;
4874 4894
 	}
4875 4895
 
4896
+	/**
4897
+	 * @param integer $timestamp
4898
+	 * @param string $nonce
4899
+	 */
4876 4900
 	function add_nonce( $timestamp, $nonce ) {
4877 4901
 		global $wpdb;
4878 4902
 		static $nonces_used_this_request = array();
@@ -5018,6 +5042,7 @@  discard block
 block discarded – undo
5018 5042
 	 * @param string $key
5019 5043
 	 * @param string $value
5020 5044
 	 * @param bool $restate private
5045
+	 * @return string
5021 5046
 	 */
5022 5047
 	public static function state( $key = null, $value = null, $restate = false ) {
5023 5048
 		static $state = array();
@@ -5074,6 +5099,9 @@  discard block
 block discarded – undo
5074 5099
 		Jetpack::state( null, null, true );
5075 5100
 	}
5076 5101
 
5102
+	/**
5103
+	 * @param string $file
5104
+	 */
5077 5105
 	public static function check_privacy( $file ) {
5078 5106
 		static $is_site_publicly_accessible = null;
5079 5107
 
@@ -5806,8 +5834,8 @@  discard block
 block discarded – undo
5806 5834
 	 *  - Absolute URLs             `http://domain.com/feh.png`
5807 5835
 	 *  - Domain root relative URLs `/feh.png`
5808 5836
 	 *
5809
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
5810
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
5837
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
5838
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
5811 5839
 	 *
5812 5840
 	 * @return mixed|string
5813 5841
 	 */
@@ -6098,7 +6126,7 @@  discard block
 block discarded – undo
6098 6126
 	 *
6099 6127
 	 * @param string $option_name
6100 6128
 	 *
6101
-	 * @return bool
6129
+	 * @return false|null
6102 6130
 	 */
6103 6131
 	public static function jumpstart_has_updated_module_option( $option_name = '' ) {
6104 6132
 		// Bail if Jump Start has already been dismissed
@@ -6189,7 +6217,6 @@  discard block
 block discarded – undo
6189 6217
 	}
6190 6218
 
6191 6219
 	/**
6192
-	 * @param mixed $result Value for the user's option
6193 6220
 	 * @return mixed
6194 6221
 	 */
6195 6222
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.