Completed
Push — add/amp-slideshow ( cd3502...edf28b )
by
unknown
10:38
created
modules/carousel/jetpack-carousel.php 1 patch
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -129,6 +129,9 @@  discard block
 block discarded – undo
129 129
 		return apply_filters( 'jp_carousel_load_for_images_linked_to_file', false );
130 130
 	}
131 131
 
132
+	/**
133
+	 * @param string $version
134
+	 */
132 135
 	function asset_version( $version ) {
133 136
 		/**
134 137
 		 * Filter the version string used when enqueuing Carousel assets.
@@ -511,6 +514,9 @@  discard block
 block discarded – undo
511 514
 		return $attr;
512 515
 	}
513 516
 
517
+	/**
518
+	 * @param string $html
519
+	 */
514 520
 	function add_data_to_container( $html ) {
515 521
 		global $post;
516 522
 		if (
@@ -757,6 +763,9 @@  discard block
 block discarded – undo
757 763
 		return ( 1 == $value ) ? 1 : 0;
758 764
 	}
759 765
 
766
+	/**
767
+	 * @param string $name
768
+	 */
760 769
 	function settings_checkbox( $name, $label_text, $extra_text = '', $default_to_checked = true ) {
761 770
 		if ( empty( $name ) ) {
762 771
 			return;
@@ -772,6 +781,9 @@  discard block
 block discarded – undo
772 781
 		echo '</fieldset>';
773 782
 	}
774 783
 
784
+	/**
785
+	 * @param string $name
786
+	 */
775 787
 	function settings_select( $name, $values, $extra_text = '' ) {
776 788
 		if ( empty( $name ) || ! is_array( $values ) || empty( $values ) ) {
777 789
 			return;
Please login to merge, or discard this patch.
modules/shortcodes/soundcloud.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 /**
143 143
  * Plugin options getter
144 144
  *
145
- * @param  string|array $option  Option name.
145
+ * @param  string $option  Option name.
146 146
  * @param  mixed        $default Default value.
147 147
  *
148 148
  * @return mixed                   Option value
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
  *
159 159
  * @param string $url Soundcloud URL.
160 160
  *
161
- * @return boolean
161
+ * @return integer
162 162
  */
163 163
 function soundcloud_url_has_tracklist( $url ) {
164 164
 	return preg_match( '/^(.+?)\/(sets|groups|playlists)\/(.+?)$/', $url );
Please login to merge, or discard this patch.
class.jetpack.php 1 patch
Doc Comments   +35 added lines, -16 removed lines patch added patch discarded remove patch
@@ -716,7 +716,7 @@  discard block
 block discarded – undo
716 716
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
717 717
 	 *
718 718
 	 * @param $domains
719
-	 * @return array
719
+	 * @return string[]
720 720
 	 */
721 721
 	function allow_wpcom_domain( $domains ) {
722 722
 		if ( empty( $domains ) ) {
@@ -1236,7 +1236,7 @@  discard block
 block discarded – undo
1236 1236
 	}
1237 1237
 	/**
1238 1238
 	 * Does the network allow admins to add new users.
1239
-	 * @return boolian
1239
+	 * @return boolean
1240 1240
 	 */
1241 1241
 	static function network_add_new_users( $option = null ) {
1242 1242
 		return (bool) get_site_option( 'add_new_users' );
@@ -1341,7 +1341,7 @@  discard block
 block discarded – undo
1341 1341
 	 * database which could be set to anything as opposed to what this function returns.
1342 1342
 	 * @param  bool  $option
1343 1343
 	 *
1344
-	 * @return boolean
1344
+	 * @return string
1345 1345
 	 */
1346 1346
 	public function is_main_network_option( $option ) {
1347 1347
 		// return '1' or ''
@@ -1352,7 +1352,7 @@  discard block
 block discarded – undo
1352 1352
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1353 1353
 	 *
1354 1354
 	 * @param  string  $option
1355
-	 * @return boolean
1355
+	 * @return string
1356 1356
 	 */
1357 1357
 	public function is_multisite( $option ) {
1358 1358
 		return (string) (bool) is_multisite();
@@ -1414,7 +1414,7 @@  discard block
 block discarded – undo
1414 1414
 
1415 1415
 	/**
1416 1416
 	 * Returns true if the site has file write access false otherwise.
1417
-	 * @return string ( '1' | '0' )
1417
+	 * @return integer ( '1' | '0' )
1418 1418
 	 **/
1419 1419
 	public static function file_system_write_access() {
1420 1420
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2145,6 +2145,7 @@  discard block
 block discarded – undo
2145 2145
 	 * @param int $user_id
2146 2146
 	 * @param string $token
2147 2147
 	 * return bool
2148
+	 * @param boolean $is_master_user
2148 2149
 	 */
2149 2150
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2150 2151
 		// not designed for concurrent updates
@@ -2591,7 +2592,7 @@  discard block
 block discarded – undo
2591 2592
 	 *
2592 2593
 	 * @param string $tag Tag as it appears in each module heading.
2593 2594
 	 *
2594
-	 * @return mixed
2595
+	 * @return string
2595 2596
 	 */
2596 2597
 	public static function translate_module_tag( $tag ) {
2597 2598
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2763,8 +2764,8 @@  discard block
 block discarded – undo
2763 2764
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2764 2765
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2765 2766
 	 *
2766
-	 * @param $string
2767
-	 * @return mixed
2767
+	 * @param string $string
2768
+	 * @return string|null
2768 2769
 	 */
2769 2770
 	public static function alias_directories( $string ) {
2770 2771
 		// ABSPATH has a trailing slash.
@@ -3024,6 +3025,9 @@  discard block
 block discarded – undo
3024 3025
 		return self::update_active_modules( $new );
3025 3026
 	}
3026 3027
 
3028
+	/**
3029
+	 * @param string $module
3030
+	 */
3027 3031
 	public static function enable_module_configurable( $module ) {
3028 3032
 		$module = Jetpack::get_module_slug( $module );
3029 3033
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -3052,6 +3056,9 @@  discard block
 block discarded – undo
3052 3056
 	}
3053 3057
 
3054 3058
 /* Installation */
3059
+	/**
3060
+	 * @param string $message
3061
+	 */
3055 3062
 	public static function bail_on_activation( $message, $deactivate = true ) {
3056 3063
 ?>
3057 3064
 <!doctype html>
@@ -3786,7 +3793,7 @@  discard block
 block discarded – undo
3786 3793
 	 * Add help to the Jetpack page
3787 3794
 	 *
3788 3795
 	 * @since Jetpack (1.2.3)
3789
-	 * @return false if not the Jetpack page
3796
+	 * @return false|null if not the Jetpack page
3790 3797
 	 */
3791 3798
 	function admin_help() {
3792 3799
 		$current_screen = get_current_screen();
@@ -4605,6 +4612,9 @@  discard block
 block discarded – undo
4605 4612
 		return $url;
4606 4613
 	}
4607 4614
 
4615
+	/**
4616
+	 * @return string
4617
+	 */
4608 4618
 	public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) {
4609 4619
 		$actionurl = str_replace( '&amp;', '&', $actionurl );
4610 4620
 		return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
@@ -4664,6 +4674,7 @@  discard block
 block discarded – undo
4664 4674
 	/**
4665 4675
 	 * Returns the requested Jetpack API URL
4666 4676
 	 *
4677
+	 * @param string $relative_url
4667 4678
 	 * @return string
4668 4679
 	 */
4669 4680
 	public static function api_url( $relative_url ) {
@@ -4855,6 +4866,7 @@  discard block
 block discarded – undo
4855 4866
 	 * Note these tokens are unique per call, NOT static per site for connecting.
4856 4867
 	 *
4857 4868
 	 * @since 2.6
4869
+	 * @param string $action
4858 4870
 	 * @return array
4859 4871
 	 */
4860 4872
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
@@ -5389,7 +5401,6 @@  discard block
 block discarded – undo
5389 5401
 	/**
5390 5402
 	 * Report authentication status to the WP REST API.
5391 5403
 	 *
5392
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5393 5404
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5394 5405
 	 */
5395 5406
 	public function wp_rest_authentication_errors( $value ) {
@@ -5399,6 +5410,10 @@  discard block
 block discarded – undo
5399 5410
 		return $this->rest_authentication_status;
5400 5411
 	}
5401 5412
 
5413
+	/**
5414
+	 * @param integer $timestamp
5415
+	 * @param string $nonce
5416
+	 */
5402 5417
 	function add_nonce( $timestamp, $nonce ) {
5403 5418
 		global $wpdb;
5404 5419
 		static $nonces_used_this_request = array();
@@ -5544,6 +5559,7 @@  discard block
 block discarded – undo
5544 5559
 	 * @param string $key
5545 5560
 	 * @param string $value
5546 5561
 	 * @param bool $restate private
5562
+	 * @return string
5547 5563
 	 */
5548 5564
 	public static function state( $key = null, $value = null, $restate = false ) {
5549 5565
 		static $state = array();
@@ -5600,6 +5616,9 @@  discard block
 block discarded – undo
5600 5616
 		Jetpack::state( null, null, true );
5601 5617
 	}
5602 5618
 
5619
+	/**
5620
+	 * @param string $file
5621
+	 */
5603 5622
 	public static function check_privacy( $file ) {
5604 5623
 		static $is_site_publicly_accessible = null;
5605 5624
 
@@ -5682,6 +5701,9 @@  discard block
 block discarded – undo
5682 5701
 		}
5683 5702
 	}
5684 5703
 
5704
+	/**
5705
+	 * @param string $url
5706
+	 */
5685 5707
 	public static function staticize_subdomain( $url ) {
5686 5708
 
5687 5709
 		// Extract hostname from URL
@@ -6232,9 +6254,7 @@  discard block
 block discarded – undo
6232 6254
 	 *
6233 6255
 	 * Attached to `style_loader_src` filter.
6234 6256
 	 *
6235
-	 * @param string $tag The tag that would link to the external asset.
6236 6257
 	 * @param string $handle The registered handle of the script in question.
6237
-	 * @param string $href The url of the asset in question.
6238 6258
 	 */
6239 6259
 	public static function set_suffix_on_min( $src, $handle ) {
6240 6260
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6422,8 +6442,8 @@  discard block
 block discarded – undo
6422 6442
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6423 6443
 	 *  - Domain root relative URLs `/feh.png`
6424 6444
 	 *
6425
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6426
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6445
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6446
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6427 6447
 	 *
6428 6448
 	 * @return mixed|string
6429 6449
 	 */
@@ -6666,7 +6686,7 @@  discard block
 block discarded – undo
6666 6686
 	/**
6667 6687
 	 * Stores and prints out domains to prefetch for page speed optimization.
6668 6688
 	 *
6669
-	 * @param mixed $new_urls
6689
+	 * @param string[] $new_urls
6670 6690
 	 */
6671 6691
 	public static function dns_prefetch( $new_urls = null ) {
6672 6692
 		static $prefetch_urls = array();
@@ -6721,7 +6741,6 @@  discard block
 block discarded – undo
6721 6741
 	}
6722 6742
 
6723 6743
 	/**
6724
-	 * @param mixed $result Value for the user's option
6725 6744
 	 * @return mixed
6726 6745
 	 */
6727 6746
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.
json-endpoints/jetpack/class.jetpack-json-api-sync-endpoint.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -228,6 +228,9 @@
 block discarded – undo
228 228
 		);
229 229
 	}
230 230
 
231
+	/**
232
+	 * @param Queue $queue
233
+	 */
231 234
 	protected function get_buffer( $queue, $number_of_items ) {
232 235
 		$start = time();
233 236
 		$max_duration = 5; // this will try to get the buffer
Please login to merge, or discard this patch.
packages/sync/src/Actions.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -321,6 +321,9 @@  discard block
 block discarded – undo
321 321
 		return $sync_modules;
322 322
 	}
323 323
 
324
+	/**
325
+	 * @return string
326
+	 */
324 327
 	static function sanitize_filtered_sync_cron_schedule( $schedule ) {
325 328
 		$schedule  = sanitize_key( $schedule );
326 329
 		$schedules = wp_get_schedules();
@@ -358,6 +361,9 @@  discard block
 block discarded – undo
358 361
 		);
359 362
 	}
360 363
 
364
+	/**
365
+	 * @param string $hook
366
+	 */
361 367
 	static function maybe_schedule_sync_cron( $schedule, $hook ) {
362 368
 		if ( ! $hook ) {
363 369
 			return;
Please login to merge, or discard this patch.
packages/sync/src/Functions.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -148,6 +148,7 @@  discard block
 block discarded – undo
148 148
 	 * Helper function that is used when getting home or siteurl values. Decides
149 149
 	 * whether to get the raw or filtered value.
150 150
 	 *
151
+	 * @param string $url_type
151 152
 	 * @return string
152 153
 	 */
153 154
 	public static function get_raw_or_filtered_url( $url_type ) {
@@ -197,6 +198,9 @@  discard block
 block discarded – undo
197 198
 		return self::get_protocol_normalized_url( 'main_network_site_url', network_site_url() );
198 199
 	}
199 200
 
201
+	/**
202
+	 * @param string $callable
203
+	 */
200 204
 	public static function get_protocol_normalized_url( $callable, $new_value ) {
201 205
 		$option_key = self::HTTPS_CHECK_OPTION_PREFIX . $callable;
202 206
 
@@ -236,6 +240,9 @@  discard block
 block discarded – undo
236 240
 		return $value;
237 241
 	}
238 242
 
243
+	/**
244
+	 * @param string $url_function
245
+	 */
239 246
 	public static function normalize_www_in_url( $option, $url_function ) {
240 247
 		$url        = wp_parse_url( call_user_func( $url_function ) );
241 248
 		$option_url = wp_parse_url( get_option( $option ) );
Please login to merge, or discard this patch.
packages/sync/src/Listener.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -177,6 +177,9 @@
 block discarded – undo
177 177
 		$queue->add_all( $data_to_enqueue );
178 178
 	}
179 179
 
180
+	/**
181
+	 * @param Queue $queue
182
+	 */
180 183
 	function enqueue_action( $current_filter, $args, $queue ) {
181 184
 		// don't enqueue an action during the outbound http request - this prevents recursion
182 185
 		if ( Settings::is_sending() ) {
Please login to merge, or discard this patch.
packages/sync/src/Queue.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -240,6 +240,9 @@  discard block
 block discarded – undo
240 240
 		return true;
241 241
 	}
242 242
 
243
+	/**
244
+	 * @param Queue_Buffer $buffer
245
+	 */
243 246
 	function close( $buffer, $ids_to_remove = null ) {
244 247
 		$is_valid = $this->validate_checkout( $buffer );
245 248
 
@@ -344,6 +347,9 @@  discard block
 block discarded – undo
344 347
 		return false;
345 348
 	}
346 349
 
350
+	/**
351
+	 * @param string $checkout_id
352
+	 */
347 353
 	private function set_checkout_id( $checkout_id ) {
348 354
 		global $wpdb;
349 355
 
Please login to merge, or discard this patch.
packages/sync/src/Sender.php 1 patch
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -70,6 +70,9 @@  discard block
 block discarded – undo
70 70
 		return (float) get_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, 0 );
71 71
 	}
72 72
 
73
+	/**
74
+	 * @param integer $time
75
+	 */
73 76
 	public function set_next_sync_time( $time, $queue_name ) {
74 77
 		return update_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, $time, true );
75 78
 	}
@@ -100,6 +103,9 @@  discard block
 block discarded – undo
100 103
 		return $this->do_sync_and_set_delays( $this->sync_queue );
101 104
 	}
102 105
 
106
+	/**
107
+	 * @param Queue $queue
108
+	 */
103 109
 	public function do_sync_and_set_delays( $queue ) {
104 110
 		// don't sync if importing
105 111
 		if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) {
@@ -357,6 +363,10 @@  discard block
 block discarded – undo
357 363
 	}
358 364
 
359 365
 	// in seconds
366
+
367
+	/**
368
+	 * @param double $seconds
369
+	 */
360 370
 	function set_max_dequeue_time( $seconds ) {
361 371
 		$this->max_dequeue_time = $seconds;
362 372
 	}
Please login to merge, or discard this patch.