Completed
Push — add/pwa ( 45ed8c...dcada3 )
by
unknown
13:01 queued 04:54
created
class.jetpack-options.php 1 patch
Doc Comments   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 	 *
17 17
 	 * @param string $type The type of option to return. Defaults to 'compact'.
18 18
 	 *
19
-	 * @return array
19
+	 * @return string[]
20 20
 	 */
21 21
 	public static function get_option_names( $type = 'compact' ) {
22 22
 		switch ( $type ) {
@@ -199,6 +199,9 @@  discard block
 block discarded – undo
199 199
 		return $value;
200 200
 	}
201 201
 
202
+	/**
203
+	 * @param string $name
204
+	 */
202 205
 	private static function update_grouped_option( $group, $name, $value ) {
203 206
 		$options = get_option( self::$grouped_options[ $group ] );
204 207
 		if ( ! is_array( $options ) ) {
@@ -301,6 +304,9 @@  discard block
 block discarded – undo
301 304
 		return $result;
302 305
 	}
303 306
 
307
+	/**
308
+	 * @param string $name
309
+	 */
304 310
 	private static function get_grouped_option( $group, $name, $default ) {
305 311
 		$options = get_option( self::$grouped_options[ $group ] );
306 312
 		if ( is_array( $options ) && isset( $options[ $name ] ) ) {
@@ -420,7 +426,7 @@  discard block
 block discarded – undo
420 426
 	 * This function checks for a constant that, if present, will disable direct DB queries Jetpack uses to manage certain options and force Jetpack to always use Options API instead.
421 427
 	 * Options can be selectively managed via a blacklist by filtering option names via the jetpack_disabled_raw_option filter.
422 428
 	 *
423
-	 * @param $name Option name
429
+	 * @param string $name Option name
424 430
 	 *
425 431
 	 * @return bool
426 432
 	 */
@@ -445,7 +451,7 @@  discard block
 block discarded – undo
445 451
 	 * @since 5.4.0
446 452
 	 *
447 453
 	 * @param boolean $strip_unsafe_options If true, and by default, will strip out options necessary for the connection to WordPress.com.
448
-	 * @return array An array of all options managed via the Jetpack_Options class.
454
+	 * @return string[] An array of all options managed via the Jetpack_Options class.
449 455
 	 */
450 456
 	static function get_all_jetpack_options( $strip_unsafe_options = true ) {
451 457
 		$jetpack_options            = self::get_option_names();
@@ -488,7 +494,7 @@  discard block
 block discarded – undo
488 494
 	 *
489 495
 	 * @since 5.4.0
490 496
 	 *
491
-	 * @return array
497
+	 * @return string[]
492 498
 	 */
493 499
 	static function get_all_wp_options() {
494 500
 		// A manual build of the wp options
Please login to merge, or discard this patch.
json-endpoints/jetpack/class.jetpack-json-api-plugins-modify-endpoint.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -139,6 +139,9 @@
 block discarded – undo
139 139
 		}
140 140
 	}
141 141
 
142
+	/**
143
+	 * @param string $capability
144
+	 */
142 145
 	protected function current_user_can( $capability, $plugin = null ) {
143 146
 		global $wp_version;
144 147
 		if ( version_compare( $wp_version, '4.9-beta2' ) >= 0 ) {
Please login to merge, or discard this patch.
modules/perf/perf.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -33,6 +33,9 @@
 block discarded – undo
33 33
 		Jetpack_Perf_Optimize_Assets::instance();
34 34
 	}
35 35
 
36
+	/**
37
+	 * @param string $name
38
+	 */
36 39
 	static function get_setting( $name ) {
37 40
 		// by default, our settings are on
38 41
 		$default_value = ( 'inline_on_every_request' === $name ) ? false : true;
Please login to merge, or discard this patch.
class.jetpack.php 1 patch
Doc Comments   +41 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1061,7 +1061,7 @@  discard block
 block discarded – undo
1061 1061
 	}
1062 1062
 	/**
1063 1063
 	 * Does the network allow admins to add new users.
1064
-	 * @return boolian
1064
+	 * @return boolean
1065 1065
 	 */
1066 1066
 	static function network_add_new_users( $option = null ) {
1067 1067
 		return (bool) get_site_option( 'add_new_users' );
@@ -1166,7 +1166,7 @@  discard block
 block discarded – undo
1166 1166
 	 * database which could be set to anything as opposed to what this function returns.
1167 1167
 	 * @param  bool  $option
1168 1168
 	 *
1169
-	 * @return boolean
1169
+	 * @return string
1170 1170
 	 */
1171 1171
 	public function is_main_network_option( $option ) {
1172 1172
 		// return '1' or ''
@@ -1177,7 +1177,7 @@  discard block
 block discarded – undo
1177 1177
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1178 1178
 	 *
1179 1179
 	 * @param  string  $option
1180
-	 * @return boolean
1180
+	 * @return string
1181 1181
 	 */
1182 1182
 	public function is_multisite( $option ) {
1183 1183
 		return (string) (bool) is_multisite();
@@ -1239,7 +1239,7 @@  discard block
 block discarded – undo
1239 1239
 
1240 1240
 	/**
1241 1241
 	 * Returns true if the site has file write access false otherwise.
1242
-	 * @return string ( '1' | '0' )
1242
+	 * @return integer ( '1' | '0' )
1243 1243
 	 **/
1244 1244
 	public static function file_system_write_access() {
1245 1245
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -1479,6 +1479,7 @@  discard block
 block discarded – undo
1479 1479
 	 * @access public
1480 1480
 	 * @static
1481 1481
 	 *
1482
+	 * @param string $feature
1482 1483
 	 * @return bool True if plan supports feature, false if not
1483 1484
 	 */
1484 1485
 	public static function active_plan_supports( $feature ) {
@@ -2019,6 +2020,7 @@  discard block
 block discarded – undo
2019 2020
 	 * @param int $user_id
2020 2021
 	 * @param string $token
2021 2022
 	 * return bool
2023
+	 * @param boolean $is_master_user
2022 2024
 	 */
2023 2025
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2024 2026
 		// not designed for concurrent updates
@@ -2413,6 +2415,7 @@  discard block
 block discarded – undo
2413 2415
 
2414 2416
 	/**
2415 2417
 	 * Like core's get_file_data implementation, but caches the result.
2418
+	 * @param string $file
2416 2419
 	 */
2417 2420
 	public static function get_file_data( $file, $headers ) {
2418 2421
 		//Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated
@@ -2449,7 +2452,7 @@  discard block
 block discarded – undo
2449 2452
 	 *
2450 2453
 	 * @param string $tag Tag as it appears in each module heading.
2451 2454
 	 *
2452
-	 * @return mixed
2455
+	 * @return string
2453 2456
 	 */
2454 2457
 	public static function translate_module_tag( $tag ) {
2455 2458
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2552,8 +2555,8 @@  discard block
 block discarded – undo
2552 2555
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2553 2556
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2554 2557
 	 *
2555
-	 * @param $string
2556
-	 * @return mixed
2558
+	 * @param string $string
2559
+	 * @return string|null
2557 2560
 	 */
2558 2561
 	public static function alias_directories( $string ) {
2559 2562
 		// ABSPATH has a trailing slash.
@@ -2827,6 +2830,9 @@  discard block
 block discarded – undo
2827 2830
 		return self::update_active_modules( $new );
2828 2831
 	}
2829 2832
 
2833
+	/**
2834
+	 * @param string $module
2835
+	 */
2830 2836
 	public static function enable_module_configurable( $module ) {
2831 2837
 		$module = Jetpack::get_module_slug( $module );
2832 2838
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -2837,21 +2843,33 @@  discard block
 block discarded – undo
2837 2843
 		return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) );
2838 2844
 	}
2839 2845
 
2846
+	/**
2847
+	 * @param string $module
2848
+	 */
2840 2849
 	public static function module_configuration_load( $module, $method ) {
2841 2850
 		$module = Jetpack::get_module_slug( $module );
2842 2851
 		add_action( 'jetpack_module_configuration_load_' . $module, $method );
2843 2852
 	}
2844 2853
 
2854
+	/**
2855
+	 * @param string $module
2856
+	 */
2845 2857
 	public static function module_configuration_head( $module, $method ) {
2846 2858
 		$module = Jetpack::get_module_slug( $module );
2847 2859
 		add_action( 'jetpack_module_configuration_head_' . $module, $method );
2848 2860
 	}
2849 2861
 
2862
+	/**
2863
+	 * @param string $module
2864
+	 */
2850 2865
 	public static function module_configuration_screen( $module, $method ) {
2851 2866
 		$module = Jetpack::get_module_slug( $module );
2852 2867
 		add_action( 'jetpack_module_configuration_screen_' . $module, $method );
2853 2868
 	}
2854 2869
 
2870
+	/**
2871
+	 * @param string $module
2872
+	 */
2855 2873
 	public static function module_configuration_activation_screen( $module, $method ) {
2856 2874
 		$module = Jetpack::get_module_slug( $module );
2857 2875
 		add_action( 'display_activate_module_setting_' . $module, $method );
@@ -2859,6 +2877,9 @@  discard block
 block discarded – undo
2859 2877
 
2860 2878
 /* Installation */
2861 2879
 
2880
+	/**
2881
+	 * @param string $message
2882
+	 */
2862 2883
 	public static function bail_on_activation( $message, $deactivate = true ) {
2863 2884
 ?>
2864 2885
 <!doctype html>
@@ -3612,7 +3633,7 @@  discard block
 block discarded – undo
3612 3633
 	 * Add help to the Jetpack page
3613 3634
 	 *
3614 3635
 	 * @since Jetpack (1.2.3)
3615
-	 * @return false if not the Jetpack page
3636
+	 * @return false|null if not the Jetpack page
3616 3637
 	 */
3617 3638
 	function admin_help() {
3618 3639
 		$current_screen = get_current_screen();
@@ -4684,6 +4705,7 @@  discard block
 block discarded – undo
4684 4705
 	/**
4685 4706
 	 * Returns the requested Jetpack API URL
4686 4707
 	 *
4708
+	 * @param string $relative_url
4687 4709
 	 * @return string
4688 4710
 	 */
4689 4711
 	public static function api_url( $relative_url ) {
@@ -4875,7 +4897,8 @@  discard block
 block discarded – undo
4875 4897
 	 * Note these tokens are unique per call, NOT static per site for connecting.
4876 4898
 	 *
4877 4899
 	 * @since 2.6
4878
-	 * @return array
4900
+	 * @param string $action
4901
+	 * @return boolean
4879 4902
 	 */
4880 4903
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
4881 4904
 		if ( ! $user_id ) {
@@ -5420,7 +5443,6 @@  discard block
 block discarded – undo
5420 5443
 	/**
5421 5444
 	 * Report authentication status to the WP REST API.
5422 5445
 	 *
5423
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5424 5446
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5425 5447
 	 */
5426 5448
 	public function wp_rest_authentication_errors( $value ) {
@@ -5430,6 +5452,10 @@  discard block
 block discarded – undo
5430 5452
 		return $this->rest_authentication_status;
5431 5453
 	}
5432 5454
 
5455
+	/**
5456
+	 * @param integer $timestamp
5457
+	 * @param string $nonce
5458
+	 */
5433 5459
 	function add_nonce( $timestamp, $nonce ) {
5434 5460
 		global $wpdb;
5435 5461
 		static $nonces_used_this_request = array();
@@ -5575,6 +5601,7 @@  discard block
 block discarded – undo
5575 5601
 	 * @param string $key
5576 5602
 	 * @param string $value
5577 5603
 	 * @param bool $restate private
5604
+	 * @return string
5578 5605
 	 */
5579 5606
 	public static function state( $key = null, $value = null, $restate = false ) {
5580 5607
 		static $state = array();
@@ -5631,6 +5658,9 @@  discard block
 block discarded – undo
5631 5658
 		Jetpack::state( null, null, true );
5632 5659
 	}
5633 5660
 
5661
+	/**
5662
+	 * @param string $file
5663
+	 */
5634 5664
 	public static function check_privacy( $file ) {
5635 5665
 		static $is_site_publicly_accessible = null;
5636 5666
 
@@ -6188,9 +6218,7 @@  discard block
 block discarded – undo
6188 6218
 	 *
6189 6219
 	 * Attached to `style_loader_src` filter.
6190 6220
 	 *
6191
-	 * @param string $tag The tag that would link to the external asset.
6192 6221
 	 * @param string $handle The registered handle of the script in question.
6193
-	 * @param string $href The url of the asset in question.
6194 6222
 	 */
6195 6223
 	public static function set_suffix_on_min( $src, $handle ) {
6196 6224
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6525,7 +6553,7 @@  discard block
 block discarded – undo
6525 6553
 	 *
6526 6554
 	 * @param string $option_name
6527 6555
 	 *
6528
-	 * @return bool
6556
+	 * @return false|null
6529 6557
 	 */
6530 6558
 	public static function jumpstart_has_updated_module_option( $option_name = '' ) {
6531 6559
 		// Bail if Jump Start has already been dismissed
@@ -6612,7 +6640,6 @@  discard block
 block discarded – undo
6612 6640
 	}
6613 6641
 
6614 6642
 	/**
6615
-	 * @param mixed $result Value for the user's option
6616 6643
 	 * @return mixed
6617 6644
 	 */
6618 6645
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.
modules/perf/class.jetpack-perf-optimize-assets.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -339,6 +339,9 @@  discard block
 block discarded – undo
339 339
 		return $tag;
340 340
 	}
341 341
 
342
+	/**
343
+	 * @param string $css
344
+	 */
342 345
 	public function fix_css_urls( $css, $css_url ) {
343 346
 		$base = trailingslashit( dirname( $css_url ) );
344 347
 		$base = str_replace( site_url(), '', $base );
@@ -415,6 +418,9 @@  discard block
 block discarded – undo
415 418
 		return apply_filters( $filter, $should_inline, $dependency->handle, $dependency->src ) && file_exists( $dependency->extra['jetpack-inline-file'] );
416 419
 	}
417 420
 
421
+	/**
422
+	 * @param string $filter
423
+	 */
418 424
 	private function should_remove_asset( $filter, $dependency ) {
419 425
 		return apply_filters( $filter, false, $dependency->handle, $dependency->src );
420 426
 	}
Please login to merge, or discard this patch.