Completed
Push — branch-9.0-built ( 7e9beb...186083 )
by Jeremy
08:28
created
class.photon.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	/**
43 43
 	 * Singleton implementation
44 44
 	 *
45
-	 * @return object
45
+	 * @return Jetpack_Photon|null
46 46
 	 */
47 47
 	public static function instance() {
48 48
 		if ( ! is_a( self::$instance, 'Jetpack_Photon' ) ) {
@@ -1382,7 +1382,7 @@  discard block
 block discarded – undo
1382 1382
 	 * after ourselves without breaking anyone else's filters.
1383 1383
 	 *
1384 1384
 	 * @internal
1385
-	 * @return true
1385
+	 * @return boolean
1386 1386
 	 */
1387 1387
 	public function override_image_downsize_in_rest_edit_context() {
1388 1388
 		return true;
Please login to merge, or discard this patch.
class.jetpack.php 1 patch
Doc Comments   +34 added lines, -16 removed lines patch added patch discarded remove patch
@@ -937,7 +937,7 @@  discard block
 block discarded – undo
937 937
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
938 938
 	 *
939 939
 	 * @param $domains
940
-	 * @return array
940
+	 * @return string[]
941 941
 	 */
942 942
 	function allow_wpcom_domain( $domains ) {
943 943
 		if ( empty( $domains ) ) {
@@ -1305,7 +1305,7 @@  discard block
 block discarded – undo
1305 1305
 	/**
1306 1306
 	 * Does the network allow admins to add new users.
1307 1307
 	 *
1308
-	 * @return boolian
1308
+	 * @return boolean
1309 1309
 	 */
1310 1310
 	static function network_add_new_users( $option = null ) {
1311 1311
 		return (bool) get_site_option( 'add_new_users' );
@@ -1415,7 +1415,7 @@  discard block
 block discarded – undo
1415 1415
 	 *
1416 1416
 	 * @param  bool $option
1417 1417
 	 *
1418
-	 * @return boolean
1418
+	 * @return string
1419 1419
 	 */
1420 1420
 	public function is_main_network_option( $option ) {
1421 1421
 		// return '1' or ''
@@ -1426,7 +1426,7 @@  discard block
 block discarded – undo
1426 1426
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1427 1427
 	 *
1428 1428
 	 * @param  string $option
1429
-	 * @return boolean
1429
+	 * @return string
1430 1430
 	 */
1431 1431
 	public function is_multisite( $option ) {
1432 1432
 		return (string) (bool) is_multisite();
@@ -1489,7 +1489,7 @@  discard block
 block discarded – undo
1489 1489
 	/**
1490 1490
 	 * Returns true if the site has file write access false otherwise.
1491 1491
 	 *
1492
-	 * @return string ( '1' | '0' )
1492
+	 * @return integer ( '1' | '0' )
1493 1493
 	 **/
1494 1494
 	public static function file_system_write_access() {
1495 1495
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2662,7 +2662,7 @@  discard block
 block discarded – undo
2662 2662
 	 *
2663 2663
 	 * @param string $tag Tag as it appears in each module heading.
2664 2664
 	 *
2665
-	 * @return mixed
2665
+	 * @return string
2666 2666
 	 */
2667 2667
 	public static function translate_module_tag( $tag ) {
2668 2668
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2777,8 +2777,8 @@  discard block
 block discarded – undo
2777 2777
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2778 2778
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2779 2779
 	 *
2780
-	 * @param $string
2781
-	 * @return mixed
2780
+	 * @param string $string
2781
+	 * @return string|null
2782 2782
 	 */
2783 2783
 	public static function alias_directories( $string ) {
2784 2784
 		// ABSPATH has a trailing slash.
@@ -2789,6 +2789,10 @@  discard block
 block discarded – undo
2789 2789
 		return $string;
2790 2790
 	}
2791 2791
 
2792
+	/**
2793
+	 * @param boolean $redirect
2794
+	 * @param boolean $send_state_messages
2795
+	 */
2792 2796
 	public static function activate_default_modules(
2793 2797
 		$min_version = false,
2794 2798
 		$max_version = false,
@@ -3054,6 +3058,9 @@  discard block
 block discarded – undo
3054 3058
 		_deprecated_function( __METHOD__, 'jetpack-4.2' );
3055 3059
 	}
3056 3060
 
3061
+	/**
3062
+	 * @return string
3063
+	 */
3057 3064
 	public static function deactivate_module( $module ) {
3058 3065
 		/**
3059 3066
 		 * Fires when a module is deactivated.
@@ -3072,6 +3079,9 @@  discard block
 block discarded – undo
3072 3079
 		return self::update_active_modules( $new );
3073 3080
 	}
3074 3081
 
3082
+	/**
3083
+	 * @param string $module
3084
+	 */
3075 3085
 	public static function enable_module_configurable( $module ) {
3076 3086
 		$module = self::get_module_slug( $module );
3077 3087
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -3100,6 +3110,10 @@  discard block
 block discarded – undo
3100 3110
 	}
3101 3111
 
3102 3112
 	/* Installation */
3113
+
3114
+	/**
3115
+	 * @param string $message
3116
+	 */
3103 3117
 	public static function bail_on_activation( $message, $deactivate = true ) {
3104 3118
 		?>
3105 3119
 <!doctype html>
@@ -3869,7 +3883,7 @@  discard block
 block discarded – undo
3869 3883
 	 * Add help to the Jetpack page
3870 3884
 	 *
3871 3885
 	 * @since Jetpack (1.2.3)
3872
-	 * @return false if not the Jetpack page
3886
+	 * @return false|null if not the Jetpack page
3873 3887
 	 */
3874 3888
 	function admin_help() {
3875 3889
 		$current_screen = get_current_screen();
@@ -4573,6 +4587,7 @@  discard block
 block discarded – undo
4573 4587
 
4574 4588
 	/**
4575 4589
 	 * Record a stat for later output.  This will only currently output in the admin_footer.
4590
+	 * @param string $group
4576 4591
 	 */
4577 4592
 	function stat( $group, $detail ) {
4578 4593
 		$this->initialize_stats();
@@ -5277,7 +5292,7 @@  discard block
 block discarded – undo
5277 5292
 	 * @param String  $action  The action name.
5278 5293
 	 * @param Integer $user_id The user identifier.
5279 5294
 	 * @param Integer $exp     Expiration time in seconds.
5280
-	 * @return array
5295
+	 * @return boolean
5281 5296
 	 */
5282 5297
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
5283 5298
 		return self::connection()->generate_secrets( $action, $user_id, $exp );
@@ -5533,7 +5548,6 @@  discard block
 block discarded – undo
5533 5548
 	 * @deprecated since 8.9.0
5534 5549
 	 * @see Automattic\Jetpack\Connection\Rest_Authentication::wp_rest_authentication_errors()
5535 5550
 	 *
5536
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5537 5551
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5538 5552
 	 */
5539 5553
 	public function wp_rest_authentication_errors( $value ) {
@@ -5658,6 +5672,7 @@  discard block
 block discarded – undo
5658 5672
 	 * @param string $key
5659 5673
 	 * @param string $value
5660 5674
 	 * @param bool   $restate private
5675
+	 * @return string
5661 5676
 	 */
5662 5677
 	public static function state( $key = null, $value = null, $restate = false ) {
5663 5678
 		static $state = array();
@@ -5739,6 +5754,9 @@  discard block
 block discarded – undo
5739 5754
 		return true;
5740 5755
 	}
5741 5756
 
5757
+	/**
5758
+	 * @param string $file
5759
+	 */
5742 5760
 	public static function check_privacy( $file ) {
5743 5761
 		static $is_site_publicly_accessible = null;
5744 5762
 
@@ -5819,6 +5837,9 @@  discard block
 block discarded – undo
5819 5837
 		}
5820 5838
 	}
5821 5839
 
5840
+	/**
5841
+	 * @param string $url
5842
+	 */
5822 5843
 	public static function staticize_subdomain( $url ) {
5823 5844
 
5824 5845
 		// Extract hostname from URL
@@ -6319,9 +6340,7 @@  discard block
 block discarded – undo
6319 6340
 	 *
6320 6341
 	 * Attached to `style_loader_src` filter.
6321 6342
 	 *
6322
-	 * @param string $tag The tag that would link to the external asset.
6323 6343
 	 * @param string $handle The registered handle of the script in question.
6324
-	 * @param string $href The url of the asset in question.
6325 6344
 	 */
6326 6345
 	public static function set_suffix_on_min( $src, $handle ) {
6327 6346
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6563,8 +6582,8 @@  discard block
 block discarded – undo
6563 6582
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6564 6583
 	 *  - Domain root relative URLs `/feh.png`
6565 6584
 	 *
6566
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6567
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6585
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6586
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6568 6587
 	 *
6569 6588
 	 * @return mixed|string
6570 6589
 	 */
@@ -6863,7 +6882,6 @@  discard block
 block discarded – undo
6863 6882
 	}
6864 6883
 
6865 6884
 	/**
6866
-	 * @param mixed $result Value for the user's option
6867 6885
 	 * @return mixed
6868 6886
 	 */
6869 6887
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.
class.jetpack-gutenberg.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
 	 * Only enqueue block assets when needed.
584 584
 	 *
585 585
 	 * @param string $type Slug of the block.
586
-	 * @param array  $script_dependencies Script dependencies. Will be merged with automatically
586
+	 * @param string[]  $script_dependencies Script dependencies. Will be merged with automatically
587 587
 	 *                                    detected script dependencies from the webpack build.
588 588
 	 *
589 589
 	 * @return void
@@ -837,7 +837,7 @@  discard block
 block discarded – undo
837 837
 	 *
838 838
 	 * @param string $slug  Block slug.
839 839
 	 * @param array  $attr  Block attributes.
840
-	 * @param array  $extra Potential extra classes you may want to provide.
840
+	 * @param string[]  $extra Potential extra classes you may want to provide.
841 841
 	 *
842 842
 	 * @return string $classes List of CSS classes for a block.
843 843
 	 */
@@ -934,10 +934,10 @@  discard block
 block discarded – undo
934 934
 	 * @since 8.3.0
935 935
 	 *
936 936
 	 * @param string $url      URL saved as an attribute in block.
937
-	 * @param array  $allowed  Array of allowed hosts for that block, or regexes to check against.
937
+	 * @param string[]  $allowed  Array of allowed hosts for that block, or regexes to check against.
938 938
 	 * @param bool   $is_regex Array of regexes matching the URL that could be used in block.
939 939
 	 *
940
-	 * @return bool|string
940
+	 * @return false|string
941 941
 	 */
942 942
 	public static function validate_block_embed_url( $url, $allowed = array(), $is_regex = false ) {
943 943
 		if (
Please login to merge, or discard this patch.
class.jetpack-client-server.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
 	/**
106 106
 	 * Returns an instance of the Jetpack object.
107 107
 	 *
108
-	 * @return Automattic\Jetpack
108
+	 * @return Jetpack
109 109
 	 */
110 110
 	public function get_jetpack() {
111 111
 		return Jetpack::init();
Please login to merge, or discard this patch.