Completed
Push — phpcs/jetpack ( 47f0fe...5df116 )
by
unknown
79:11 queued 69:20
created
jetpack/_inc/lib/jetpack-wpes-query-builder/jetpack-wpes-query-builder.php 1 patch
Doc Comments   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 *
92 92
 	 * @param $function array A function structure to apply to the query
93 93
 	 *
94
-	 * @return void
94
+	 * @return Jetpack_WPES_Query_Builder
95 95
 	 */
96 96
 	public function add_weighting_function( $function ) {
97 97
 		// check for danger.
@@ -114,10 +114,10 @@  discard block
 block discarded – undo
114 114
 	 *
115 115
 	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html
116 116
 	 *
117
-	 * @param $function string name of the function
117
+	 * @param string $function string name of the function
118 118
 	 * @param $params array functions parameters
119 119
 	 *
120
-	 * @return void
120
+	 * @return Jetpack_WPES_Query_Builder
121 121
 	 */
122 122
 	public function add_function( $function, $params ) {
123 123
 		$this->functions[ $function ][] = $params;
@@ -133,10 +133,10 @@  discard block
 block discarded – undo
133 133
 	 *
134 134
 	 * @see https://www.elastic.co/guide/en/elasticsearch/guide/current/decay-functions.html
135 135
 	 *
136
-	 * @param $function string name of the decay function - linear, exp, or gauss
136
+	 * @param string $function string name of the decay function - linear, exp, or gauss
137 137
 	 * @param $params array The decay functions parameters, passed to ES directly
138 138
 	 *
139
-	 * @return void
139
+	 * @return Jetpack_WPES_Query_Builder
140 140
 	 */
141 141
 	public function add_decay( $function, $params ) {
142 142
 		$this->decays[ $function ][] = $params;
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 *
152 152
 	 * @param $mode string name of how to score
153 153
 	 *
154
-	 * @return void
154
+	 * @return Jetpack_WPES_Query_Builder
155 155
 	 */
156 156
 	public function add_score_mode_to_functions( $mode='multiply' ) {
157 157
 		$this->functions_score_mode = $mode;
@@ -177,6 +177,9 @@  discard block
 block discarded – undo
177 177
 		return $this;
178 178
 	}
179 179
 
180
+	/**
181
+	 * @param string $aggs_name
182
+	 */
180 183
 	public function add_aggs( $aggs_name, $aggs ) {
181 184
 		$this->aggs_query = true;
182 185
 		$this->aggs[$aggs_name] = $aggs;
Please login to merge, or discard this patch.
projects/packages/analyzer/src/class-declarations.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -22,6 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
 	/**
24 24
 	 * Scan every PHP in the root
25
+	 * @param string $root
25 26
 	 */
26 27
 	public function scan( $root, $exclude = array() ) {
27 28
 		if ( is_dir( $root ) ) {
@@ -33,6 +34,9 @@  discard block
 block discarded – undo
33 34
 		}
34 35
 	}
35 36
 
37
+	/**
38
+	 * @param string $root
39
+	 */
36 40
 	public function scan_dir( $root, $exclude = array() ) {
37 41
 
38 42
 		if ( is_null( $exclude ) || ! is_array( $exclude ) ) {
Please login to merge, or discard this patch.
projects/plugins/beta/class-jetpack-beta.php 1 patch
Doc Comments   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -639,6 +639,7 @@  discard block
 block discarded – undo
639 639
 	 * Fetch latest Jetpack version.
640 640
 	 *
641 641
 	 * @param bool $is_dev_version - If JP Dev version is being queried.
642
+	 * @return string
642 643
 	 */
643 644
 	public static function get_new_jetpack_version( $is_dev_version = false ) {
644 645
 		$manifest = self::get_beta_manifest();
@@ -714,6 +715,7 @@  discard block
 block discarded – undo
714 715
 	 *
715 716
 	 * @param string $branch  - Branch.
716 717
 	 * @param string $section - Section.
718
+	 * @return string
717 719
 	 */
718 720
 	public static function get_install_url( $branch = null, $section = null ) {
719 721
 		if ( is_null( $section ) ) {
@@ -769,7 +771,7 @@  discard block
 block discarded – undo
769 771
 	/**
770 772
 	 * Get JP plugin data.
771 773
 	 *
772
-	 * @param mixed $plugin_file - JP or JP Dev plugin path.
774
+	 * @param string $plugin_file - JP or JP Dev plugin path.
773 775
 	 */
774 776
 	public static function get_jetpack_plugin_info( $plugin_file = null ) {
775 777
 
@@ -1418,7 +1420,7 @@  discard block
 block discarded – undo
1418 1420
 	/**
1419 1421
 	 * Checks if a dir is empty.
1420 1422
 	 *
1421
-	 * @param [type] $dir The absolute directory path to check.
1423
+	 * @param string $dir The absolute directory path to check.
1422 1424
 	 * @return boolean
1423 1425
 	 */
1424 1426
 	public static function is_dir_empty( $dir ) {
Please login to merge, or discard this patch.
projects/plugins/beta/class-jetpack-beta-admin.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -729,6 +729,7 @@
 block discarded – undo
729 729
 	 *
730 730
 	 * @param string $branch - Branch that's ready for update.
731 731
 	 * @param string $section - What kind of branch we're updated (master, rc, pr).
732
+	 * @return string
732 733
 	 */
733 734
 	public static function update_action_url( $branch, $section ) {
734 735
 		$query = array(
Please login to merge, or discard this patch.
projects/plugins/jetpack/_inc/lib/functions.wp-notify.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@
 block discarded – undo
229 229
  *
230 230
  * @param string $notify_moderator The value of the moderation_notify option OR if the comment is awaiting moderation.
231 231
  * @param int    $comment_id Comment ID.
232
- * @return boolean Returns false to shortcircuit the execution of wp_notify_moderator
232
+ * @return string|false Returns false to shortcircuit the execution of wp_notify_moderator
233 233
  */
234 234
 function jetpack_notify_moderator( $notify_moderator, $comment_id ) {
235 235
 	/*
Please login to merge, or discard this patch.
projects/packages/autoloader/src/CustomAutoloaderPlugin.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
168 168
 	/**
169 169
 	 * Checks to see whether or not the root package is the one that required the autoloader.
170 170
 	 *
171
-	 * @return bool
171
+	 * @return null|boolean
172 172
 	 */
173 173
 	private function isRequiredByRoot() {
174 174
 		$package  = $this->composer->getPackage();
Please login to merge, or discard this patch.
projects/plugins/jetpack/modules/memberships/class-jetpack-memberships.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 	 * @param array $post_types - other post types.
194 194
 	 *
195 195
 	 * @see hook 'rest_api_allowed_post_types'
196
-	 * @return array
196
+	 * @return string[]
197 197
 	 */
198 198
 	public function allow_rest_api_types( $post_types ) {
199 199
 		$post_types[] = self::$post_type_plan;
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 	 * (because it requires a plan upgrade or Stripe connection), and the
255 255
 	 * button is a child of a Premium Content block.
256 256
 	 *
257
-	 * @param WP_Block $block Recurring Payments block instance.
257
+	 * @param WP_Block|null $block Recurring Payments block instance.
258 258
 	 *
259 259
 	 * @return boolean
260 260
 	 */
Please login to merge, or discard this patch.
projects/plugins/jetpack/class.jetpack.php 1 patch
Doc Comments   +34 added lines, -11 removed lines patch added patch discarded remove patch
@@ -900,7 +900,7 @@  discard block
 block discarded – undo
900 900
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
901 901
 	 *
902 902
 	 * @param $domains
903
-	 * @return array
903
+	 * @return string[]
904 904
 	 */
905 905
 	function allow_wpcom_domain( $domains ) {
906 906
 		if ( empty( $domains ) ) {
@@ -1202,7 +1202,7 @@  discard block
 block discarded – undo
1202 1202
 	/**
1203 1203
 	 * Does the network allow admins to add new users.
1204 1204
 	 *
1205
-	 * @return boolian
1205
+	 * @return boolean
1206 1206
 	 */
1207 1207
 	static function network_add_new_users( $option = null ) {
1208 1208
 		return (bool) get_site_option( 'add_new_users' );
@@ -1312,7 +1312,7 @@  discard block
 block discarded – undo
1312 1312
 	 *
1313 1313
 	 * @param  bool $option
1314 1314
 	 *
1315
-	 * @return boolean
1315
+	 * @return string
1316 1316
 	 */
1317 1317
 	public function is_main_network_option( $option ) {
1318 1318
 		// return '1' or ''
@@ -1323,7 +1323,7 @@  discard block
 block discarded – undo
1323 1323
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1324 1324
 	 *
1325 1325
 	 * @param  string $option
1326
-	 * @return boolean
1326
+	 * @return string
1327 1327
 	 */
1328 1328
 	public function is_multisite( $option ) {
1329 1329
 		return (string) (bool) is_multisite();
@@ -1370,7 +1370,7 @@  discard block
 block discarded – undo
1370 1370
 	/**
1371 1371
 	 * Returns true if the site has file write access false otherwise.
1372 1372
 	 *
1373
-	 * @return string ( '1' | '0' )
1373
+	 * @return integer ( '1' | '0' )
1374 1374
 	 **/
1375 1375
 	public static function file_system_write_access() {
1376 1376
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2340,7 +2340,7 @@  discard block
 block discarded – undo
2340 2340
 	 *
2341 2341
 	 * @param string $tag Tag as it appears in each module heading.
2342 2342
 	 *
2343
-	 * @return mixed
2343
+	 * @return string
2344 2344
 	 */
2345 2345
 	public static function translate_module_tag( $tag ) {
2346 2346
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2455,8 +2455,8 @@  discard block
 block discarded – undo
2455 2455
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2456 2456
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2457 2457
 	 *
2458
-	 * @param $string
2459
-	 * @return mixed
2458
+	 * @param string $string
2459
+	 * @return string|null
2460 2460
 	 */
2461 2461
 	public static function alias_directories( $string ) {
2462 2462
 		// ABSPATH has a trailing slash.
@@ -2467,6 +2467,10 @@  discard block
 block discarded – undo
2467 2467
 		return $string;
2468 2468
 	}
2469 2469
 
2470
+	/**
2471
+	 * @param boolean $redirect
2472
+	 * @param boolean $send_state_messages
2473
+	 */
2470 2474
 	public static function activate_default_modules(
2471 2475
 		$min_version = false,
2472 2476
 		$max_version = false,
@@ -2746,6 +2750,9 @@  discard block
 block discarded – undo
2746 2750
 		return self::update_active_modules( $new );
2747 2751
 	}
2748 2752
 
2753
+	/**
2754
+	 * @param string $module
2755
+	 */
2749 2756
 	public static function enable_module_configurable( $module ) {
2750 2757
 		$module = self::get_module_slug( $module );
2751 2758
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -2774,6 +2781,10 @@  discard block
 block discarded – undo
2774 2781
 	}
2775 2782
 
2776 2783
 	/* Installation */
2784
+
2785
+	/**
2786
+	 * @param string $message
2787
+	 */
2777 2788
 	public static function bail_on_activation( $message, $deactivate = true ) {
2778 2789
 		?>
2779 2790
 <!doctype html>
@@ -2819,6 +2830,7 @@  discard block
 block discarded – undo
2819 2830
 	 * Attached to activate_{ plugin_basename( __FILES__ ) } by register_activation_hook()
2820 2831
 	 *
2821 2832
 	 * @static
2833
+	 * @param boolean $network_wide
2822 2834
 	 */
2823 2835
 	public static function plugin_activation( $network_wide ) {
2824 2836
 		Jetpack_Options::update_option( 'activated', 1 );
@@ -3525,7 +3537,7 @@  discard block
 block discarded – undo
3525 3537
 	 * Add help to the Jetpack page
3526 3538
 	 *
3527 3539
 	 * @since Jetpack (1.2.3)
3528
-	 * @return false if not the Jetpack page
3540
+	 * @return false|null if not the Jetpack page
3529 3541
 	 */
3530 3542
 	function admin_help() {
3531 3543
 		$current_screen = get_current_screen();
@@ -4223,6 +4235,7 @@  discard block
 block discarded – undo
4223 4235
 
4224 4236
 	/**
4225 4237
 	 * Record a stat for later output.  This will only currently output in the admin_footer.
4238
+	 * @param string $group
4226 4239
 	 */
4227 4240
 	function stat( $group, $detail ) {
4228 4241
 		$this->initialize_stats();
@@ -4534,6 +4547,9 @@  discard block
 block discarded – undo
4534 4547
 		return $url;
4535 4548
 	}
4536 4549
 
4550
+	/**
4551
+	 * @param string $actionurl
4552
+	 */
4537 4553
 	public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) {
4538 4554
 		$actionurl = str_replace( '&amp;', '&', $actionurl );
4539 4555
 		return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
@@ -4790,12 +4806,15 @@  discard block
 block discarded – undo
4790 4806
 	 * @param String  $action  The action name.
4791 4807
 	 * @param Integer $user_id The user identifier.
4792 4808
 	 * @param Integer $exp     Expiration time in seconds.
4793
-	 * @return array
4809
+	 * @return boolean
4794 4810
 	 */
4795 4811
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
4796 4812
 		return self::connection()->generate_secrets( $action, $user_id, $exp );
4797 4813
 	}
4798 4814
 
4815
+	/**
4816
+	 * @param string $action
4817
+	 */
4799 4818
 	public static function get_secrets( $action, $user_id ) {
4800 4819
 		$secrets = self::connection()->get_secrets( $action, $user_id );
4801 4820
 
@@ -4931,6 +4950,7 @@  discard block
 block discarded – undo
4931 4950
 	 * @param string $key
4932 4951
 	 * @param string $value
4933 4952
 	 * @param bool   $restate private
4953
+	 * @return string
4934 4954
 	 */
4935 4955
 	public static function state( $key = null, $value = null, $restate = false ) {
4936 4956
 		static $state = array();
@@ -5012,6 +5032,9 @@  discard block
 block discarded – undo
5012 5032
 		return true;
5013 5033
 	}
5014 5034
 
5035
+	/**
5036
+	 * @param string $file
5037
+	 */
5015 5038
 	public static function check_privacy( $file ) {
5016 5039
 		static $is_site_publicly_accessible = null;
5017 5040
 
@@ -5941,7 +5964,7 @@  discard block
 block discarded – undo
5941 5964
 	 * @param string $css The raw CSS -- should be read in directly from the file.
5942 5965
 	 * @param string $css_file_url The URL that the file can be accessed at, for calculating paths from.
5943 5966
 	 *
5944
-	 * @return mixed|string
5967
+	 * @return string
5945 5968
 	 */
5946 5969
 	public static function absolutize_css_urls( $css, $css_file_url ) {
5947 5970
 		$pattern = '#url\((?P<path>[^)]*)\)#i';
Please login to merge, or discard this patch.