Completed
Push — fix/photon-big-image-srcset ( 4acd53...70032e )
by
unknown
08:51
created
class.jetpack.php 1 patch
Doc Comments   +43 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1130,7 +1130,7 @@  discard block
 block discarded – undo
1130 1130
 	}
1131 1131
 	/**
1132 1132
 	 * Does the network allow admins to add new users.
1133
-	 * @return boolian
1133
+	 * @return boolean
1134 1134
 	 */
1135 1135
 	static function network_add_new_users( $option = null ) {
1136 1136
 		return (bool) get_site_option( 'add_new_users' );
@@ -1178,7 +1178,7 @@  discard block
 block discarded – undo
1178 1178
 	 * database which could be set to anything as opposed to what this function returns.
1179 1179
 	 * @param  bool  $option
1180 1180
 	 *
1181
-	 * @return boolean
1181
+	 * @return string
1182 1182
 	 */
1183 1183
 	public function is_main_network_option( $option ) {
1184 1184
 		// return '1' or ''
@@ -1189,7 +1189,7 @@  discard block
 block discarded – undo
1189 1189
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1190 1190
 	 *
1191 1191
 	 * @param  string  $option
1192
-	 * @return boolean
1192
+	 * @return string
1193 1193
 	 */
1194 1194
 	public function is_multisite( $option ) {
1195 1195
 		return (string) (bool) is_multisite();
@@ -1287,7 +1287,7 @@  discard block
 block discarded – undo
1287 1287
 
1288 1288
 	/**
1289 1289
 	 * Returns true if the site has file write access false otherwise.
1290
-	 * @return string ( '1' | '0' )
1290
+	 * @return integer ( '1' | '0' )
1291 1291
 	 **/
1292 1292
 	public static function file_system_write_access() {
1293 1293
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2097,7 +2097,7 @@  discard block
 block discarded – undo
2097 2097
 	 * Returns the requested option.  Looks in jetpack_options or jetpack_$name as appropriate.
2098 2098
  	 *
2099 2099
 	 * @param string $name    Option name
2100
-	 * @param mixed  $default (optional)
2100
+	 * @param boolean  $default (optional)
2101 2101
 	 */
2102 2102
 	public static function get_option( $name, $default = false ) {
2103 2103
 		return Jetpack_Options::get_option( $name, $default );
@@ -2107,6 +2107,7 @@  discard block
 block discarded – undo
2107 2107
 	* Stores two secrets and a timestamp so WordPress.com can make a request back and verify an action
2108 2108
 	* Does some extra verification so urls (such as those to public-api, register, etc) can't just be crafted
2109 2109
 	* $name must be a registered option name.
2110
+	* @param string $name
2110 2111
 	*/
2111 2112
 	public static function create_nonce( $name ) {
2112 2113
 		$secret = wp_generate_password( 32, false ) . ':' . wp_generate_password( 32, false ) . ':' . ( time() + 600 );
@@ -2164,6 +2165,7 @@  discard block
 block discarded – undo
2164 2165
 	 * @param int $user_id
2165 2166
 	 * @param string $token
2166 2167
 	 * return bool
2168
+	 * @param boolean $is_master_user
2167 2169
 	 */
2168 2170
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2169 2171
 		// not designed for concurrent updates
@@ -2558,6 +2560,7 @@  discard block
 block discarded – undo
2558 2560
 
2559 2561
 	/**
2560 2562
 	 * Like core's get_file_data implementation, but caches the result.
2563
+	 * @param string $file
2561 2564
 	 */
2562 2565
 	public static function get_file_data( $file, $headers ) {
2563 2566
 		//Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated
@@ -2586,7 +2589,7 @@  discard block
 block discarded – undo
2586 2589
 	 *
2587 2590
 	 * @param string $tag Tag as it appears in each module heading.
2588 2591
 	 *
2589
-	 * @return mixed
2592
+	 * @return string
2590 2593
 	 */
2591 2594
 	public static function translate_module_tag( $tag ) {
2592 2595
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2901,6 +2904,9 @@  discard block
 block discarded – undo
2901 2904
 		$this->sync->sync_all_module_options( $module );
2902 2905
 	}
2903 2906
 
2907
+	/**
2908
+	 * @return string
2909
+	 */
2904 2910
 	public static function deactivate_module( $module ) {
2905 2911
 		/**
2906 2912
 		 * Fires when a module is deactivated.
@@ -2939,6 +2945,9 @@  discard block
 block discarded – undo
2939 2945
 		return Jetpack_Options::update_option( 'active_modules', array_unique( $new ) );
2940 2946
 	}
2941 2947
 
2948
+	/**
2949
+	 * @param string $module
2950
+	 */
2942 2951
 	public static function enable_module_configurable( $module ) {
2943 2952
 		$module = Jetpack::get_module_slug( $module );
2944 2953
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -2949,21 +2958,33 @@  discard block
 block discarded – undo
2949 2958
 		return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) );
2950 2959
 	}
2951 2960
 
2961
+	/**
2962
+	 * @param string $module
2963
+	 */
2952 2964
 	public static function module_configuration_load( $module, $method ) {
2953 2965
 		$module = Jetpack::get_module_slug( $module );
2954 2966
 		add_action( 'jetpack_module_configuration_load_' . $module, $method );
2955 2967
 	}
2956 2968
 
2969
+	/**
2970
+	 * @param string $module
2971
+	 */
2957 2972
 	public static function module_configuration_head( $module, $method ) {
2958 2973
 		$module = Jetpack::get_module_slug( $module );
2959 2974
 		add_action( 'jetpack_module_configuration_head_' . $module, $method );
2960 2975
 	}
2961 2976
 
2977
+	/**
2978
+	 * @param string $module
2979
+	 */
2962 2980
 	public static function module_configuration_screen( $module, $method ) {
2963 2981
 		$module = Jetpack::get_module_slug( $module );
2964 2982
 		add_action( 'jetpack_module_configuration_screen_' . $module, $method );
2965 2983
 	}
2966 2984
 
2985
+	/**
2986
+	 * @param string $module
2987
+	 */
2967 2988
 	public static function module_configuration_activation_screen( $module, $method ) {
2968 2989
 		$module = Jetpack::get_module_slug( $module );
2969 2990
 		add_action( 'display_activate_module_setting_' . $module, $method );
@@ -2971,6 +2992,9 @@  discard block
 block discarded – undo
2971 2992
 
2972 2993
 /* Installation */
2973 2994
 
2995
+	/**
2996
+	 * @param string $message
2997
+	 */
2974 2998
 	public static function bail_on_activation( $message, $deactivate = true ) {
2975 2999
 ?>
2976 3000
 <!doctype html>
@@ -3584,7 +3608,7 @@  discard block
 block discarded – undo
3584 3608
 	 * Add help to the Jetpack page
3585 3609
 	 *
3586 3610
 	 * @since Jetpack (1.2.3)
3587
-	 * @return false if not the Jetpack page
3611
+	 * @return false|null if not the Jetpack page
3588 3612
 	 */
3589 3613
 	function admin_help() {
3590 3614
 		$current_screen = get_current_screen();
@@ -4874,6 +4898,7 @@  discard block
 block discarded – undo
4874 4898
 	/**
4875 4899
 	 * Returns the requested Jetpack API URL
4876 4900
 	 *
4901
+	 * @param string $relative_url
4877 4902
 	 * @return string
4878 4903
 	 */
4879 4904
 	public static function api_url( $relative_url ) {
@@ -5298,6 +5323,10 @@  discard block
 block discarded – undo
5298 5323
 		return new WP_User( $token_details['user_id'] );
5299 5324
 	}
5300 5325
 
5326
+	/**
5327
+	 * @param integer $timestamp
5328
+	 * @param string $nonce
5329
+	 */
5301 5330
 	function add_nonce( $timestamp, $nonce ) {
5302 5331
 		global $wpdb;
5303 5332
 		static $nonces_used_this_request = array();
@@ -5503,6 +5532,9 @@  discard block
 block discarded – undo
5503 5532
 		Jetpack::state( null, null, true );
5504 5533
 	}
5505 5534
 
5535
+	/**
5536
+	 * @param string $file
5537
+	 */
5506 5538
 	public static function check_privacy( $file ) {
5507 5539
 		static $is_site_publicly_accessible = null;
5508 5540
 
@@ -5830,7 +5862,7 @@  discard block
 block discarded – undo
5830 5862
 	/**
5831 5863
 	 * Pings the WordPress.com Mirror Site for the specified options.
5832 5864
 	 *
5833
-	 * @param string|array $option_names The option names to request from the WordPress.com Mirror Site
5865
+	 * @param string[] $option_names The option names to request from the WordPress.com Mirror Site
5834 5866
 	 *
5835 5867
 	 * @return array An associative array of the option values as stored in the WordPress.com Mirror Site
5836 5868
 	 */
@@ -5854,7 +5886,7 @@  discard block
 block discarded – undo
5854 5886
 	/**
5855 5887
 	 * Fetch the filtered array of options that we should compare to determine an identity crisis.
5856 5888
 	 *
5857
-	 * @return array An array of options to check.
5889
+	 * @return string[] An array of options to check.
5858 5890
 	 */
5859 5891
 	public static function identity_crisis_options_to_check() {
5860 5892
 		return array(
@@ -6524,8 +6556,8 @@  discard block
 block discarded – undo
6524 6556
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6525 6557
 	 *  - Domain root relative URLs `/feh.png`
6526 6558
 	 *
6527
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6528
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6559
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6560
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6529 6561
 	 *
6530 6562
 	 * @return mixed|string
6531 6563
 	 */
@@ -6921,7 +6953,6 @@  discard block
 block discarded – undo
6921 6953
 	}
6922 6954
 
6923 6955
 	/**
6924
-	 * @param mixed $result Value for the user's option
6925 6956
 	 * @return mixed
6926 6957
 	 */
6927 6958
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.
sal/class.json-api-site-jetpack-base.php 1 patch
Doc Comments   +15 added lines patch added patch discarded remove patch
@@ -4,12 +4,27 @@
 block discarded – undo
4 4
 require_once dirname( __FILE__ ) . '/class.json-api-site-base.php';
5 5
 
6 6
 abstract class Abstract_Jetpack_Site extends SAL_Site {
7
+
8
+	/**
9
+	 * @param string $name
10
+	 */
7 11
 	abstract protected function get_constant( $name );
8 12
 
13
+	/**
14
+	 * @param string $feature_name
15
+	 */
9 16
 	abstract protected function current_theme_supports( $feature_name );
10 17
 
18
+	/**
19
+	 * @param string $feature_name
20
+	 */
11 21
 	abstract protected function get_theme_support( $feature_name );
12 22
 
23
+	/**
24
+	 * @param string $name
25
+	 *
26
+	 * @return string
27
+	 */
13 28
 	abstract protected function get_mock_option( $name );
14 29
 
15 30
 	abstract protected function get_jetpack_version();
Please login to merge, or discard this patch.
sal/class.json-api-post-base.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -16,6 +16,9 @@  discard block
 block discarded – undo
16 16
 	public $context;
17 17
 	public $site;
18 18
 
19
+	/**
20
+	 * @param Jetpack_Site $site
21
+	 */
19 22
 	function __construct( $site, $post, $context ) {
20 23
 		$this->post = $post;
21 24
 		$this->context = $context;
@@ -487,6 +490,10 @@  discard block
 block discarded – undo
487 490
 		return $suggestions;
488 491
 	}
489 492
 
493
+	/**
494
+	 * @param string $taxonomy_type
495
+	 * @param string $context
496
+	 */
490 497
 	private function format_taxonomy( $taxonomy, $taxonomy_type, $context ) {
491 498
 		// Permissions
492 499
 		switch ( $context ) {
Please login to merge, or discard this patch.
sal/class.json-api-links.php 1 patch
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,6 @@  discard block
 block discarded – undo
26 26
 	 *
27 27
 	 * Used to construct meta links in API responses
28 28
 	 *
29
-	 * @param mixed $args Optional arguments to be appended to URL
30 29
 	 * @return string Endpoint URL
31 30
 	 **/
32 31
 	function get_link() {
@@ -117,7 +116,7 @@  discard block
 block discarded – undo
117 116
 	 * This method is used in get_link() to construct meta links for API responses.
118 117
 	 * 
119 118
 	 * @param $template_path The generic endpoint path, e.g. /sites/%s
120
-	 * @param $path string The current endpoint path, relative to the version, e.g. /sites/12345
119
+	 * @param string $path string The current endpoint path, relative to the version, e.g. /sites/12345
121 120
 	 * @param $method string Request method used to access the endpoint path
122 121
 	 * @return string The current version, or otherwise the maximum version available
123 122
 	 */
Please login to merge, or discard this patch.
class.json-api-endpoints.php 1 patch
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -1341,6 +1341,7 @@  discard block
 block discarded – undo
1341 1341
 	 * timezone set in the options table for the blog or the GMT offset.
1342 1342
 	 *
1343 1343
 	 * @param datetime string
1344
+	 * @param string $date_string
1344 1345
 	 *
1345 1346
 	 * @return array( $local_time_string, $gmt_time_string )
1346 1347
 	 */
@@ -1458,6 +1459,10 @@  discard block
 block discarded – undo
1458 1459
 		do_action( 'restapi_theme_init' );
1459 1460
 	}
1460 1461
 
1462
+	/**
1463
+	 * @param string $from_hook
1464
+	 * @param string $to_hook
1465
+	 */
1461 1466
 	function copy_hooks( $from_hook, $to_hook, $base_paths ) {
1462 1467
 		global $wp_filter;
1463 1468
 		foreach ( $wp_filter as $hook => $actions ) {
Please login to merge, or discard this patch.
sal/class.json-api-site-base.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -23,6 +23,9 @@
 block discarded – undo
23 23
 	public $blog_id;
24 24
 	public $platform;
25 25
 
26
+	/**
27
+	 * @param WPORG_Platform $platform
28
+	 */
26 29
 	public function __construct( $blog_id, $platform ) {
27 30
 		$this->blog_id = $blog_id;
28 31
 		$this->platform = $platform;
Please login to merge, or discard this patch.
json-endpoints/class.wpcom-json-api-post-v1-1-endpoint.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -120,6 +120,9 @@  discard block
 block discarded – undo
120 120
 		return $response;
121 121
 	}
122 122
 
123
+	/**
124
+	 * @param string $field
125
+	 */
123 126
 	protected function get_sal_post_by( $field, $field_value, $context ) {
124 127
 		global $blog_id;
125 128
 
@@ -132,6 +135,9 @@  discard block
 block discarded – undo
132 135
 		return $post;
133 136
 	}
134 137
 
138
+	/**
139
+	 * @param string $context
140
+	 */
135 141
 	private function render_response_keys( $post, $context, $keys ) {
136 142
 		foreach ( $keys as $key ) {
137 143
 			switch ( $key ) {
Please login to merge, or discard this patch.