Completed
Pull Request — master (#24892)
by Claudio
08:16
created
includes/class-wc-regenerate-images.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
 	/**
277 277
 	 * Ensure we are dealing with the correct image attachment
278 278
 	 *
279
-	 * @param int|WP_Post $attachment Attachment object or ID.
279
+	 * @param integer $attachment Attachment object or ID.
280 280
 	 * @return boolean
281 281
 	 */
282 282
 	public static function is_regeneratable( $attachment ) {
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 	 * Only regenerate images for the requested size.
296 296
 	 *
297 297
 	 * @param array $sizes Array of image sizes.
298
-	 * @return array
298
+	 * @return string[]
299 299
 	 */
300 300
 	public static function adjust_intermediate_image_sizes( $sizes ) {
301 301
 		return array( self::$regenerate_size );
Please login to merge, or discard this patch.
includes/wc-core-functions.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
  *
154 154
  * WC_TEMPLATE_DEBUG_MODE will prevent overrides in themes from taking priority.
155 155
  *
156
- * @param mixed  $slug Template slug.
156
+ * @param string  $slug Template slug.
157 157
  * @param string $name Template name (default: '').
158 158
  */
159 159
 function wc_get_template_part( $slug, $name = '' ) {
@@ -747,7 +747,7 @@  discard block
 block discarded – undo
747 747
  * defines sizes.
748 748
  *
749 749
  * @param array|string $image_size Name of the image size to get, or an array of dimensions.
750
- * @return array Array of dimensions including width, height, and cropping mode. Cropping mode is 0 for no crop, and 1 for hard crop.
750
+ * @return string Array of dimensions including width, height, and cropping mode. Cropping mode is 0 for no crop, and 1 for hard crop.
751 751
  */
752 752
 function wc_get_image_size( $image_size ) {
753 753
 	$cache_key = 'size-' . ( is_array( $image_size ) ? implode( '-', $image_size ) : $image_size );
@@ -1851,7 +1851,7 @@  discard block
 block discarded – undo
1851 1851
  *
1852 1852
  * @since 3.0.0
1853 1853
  * @param array      $list              List of objects or arrays.
1854
- * @param int|string $callback_or_field Callback method from the object to place instead of the entire object.
1854
+ * @param string $callback_or_field Callback method from the object to place instead of the entire object.
1855 1855
  * @param int|string $index_key         Optional. Field from the object to use as keys for the new array.
1856 1856
  *                                      Default null.
1857 1857
  * @return array Array of values.
@@ -1997,7 +1997,7 @@  discard block
 block discarded – undo
1997 1997
  * @since  3.2.0
1998 1998
  * @param  mixed  $var     Variable.
1999 1999
  * @param  string $default Default value.
2000
- * @return mixed
2000
+ * @return string|null
2001 2001
  */
2002 2002
 function wc_get_var( &$var, $default = null ) {
2003 2003
 	return isset( $var ) ? $var : $default;
@@ -2114,7 +2114,7 @@  discard block
 block discarded – undo
2114 2114
  * See if theme/s is activate or not.
2115 2115
  *
2116 2116
  * @since 3.3.0
2117
- * @param string|array $theme Theme name or array of theme names to check.
2117
+ * @param string[] $theme Theme name or array of theme names to check.
2118 2118
  * @return boolean
2119 2119
  */
2120 2120
 function wc_is_active_theme( $theme ) {
Please login to merge, or discard this patch.
includes/wc-user-functions.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	 * @param  string $username Customer username.
37 37
 	 * @param  string $password Customer password.
38 38
 	 * @param  array  $args     List of arguments to pass to `wp_insert_user()`.
39
-	 * @return int|WP_Error Returns WP_Error on failure, Int (user ID) on success.
39
+	 * @return integer Returns WP_Error on failure, Int (user ID) on success.
40 40
 	 */
41 41
 	function wc_create_new_customer( $email, $username = '', $password = '', $args = array() ) {
42 42
 		if ( empty( $email ) || ! is_email( $email ) ) {
@@ -611,7 +611,7 @@  discard block
 block discarded – undo
611 611
  * Get total spent by customer.
612 612
  *
613 613
  * @param  int $user_id User ID.
614
- * @return string
614
+ * @return double
615 615
  */
616 616
 function wc_get_customer_total_spent( $user_id ) {
617 617
 	$customer = new WC_Customer( $user_id );
@@ -756,7 +756,7 @@  discard block
 block discarded – undo
756 756
  *
757 757
  * @since 3.2.0
758 758
  * @param array $search_columns Column names.
759
- * @return array
759
+ * @return string[]
760 760
  */
761 761
 function wc_user_search_columns( $search_columns ) {
762 762
 	$search_columns[] = 'display_name';
Please login to merge, or discard this patch.
includes/tracks/class-wc-tracks-client.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 	/**
41 41
 	 * Check if identiy cookie is set, if not set it.
42 42
 	 *
43
-	 * @return void
43
+	 * @return null|false
44 44
 	 */
45 45
 	public static function maybe_set_identity_cookie() {
46 46
 		// Bail if cookie already set.
Please login to merge, or discard this patch.
includes/wc-product-functions.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1504,8 +1504,8 @@
 block discarded – undo
1504 1504
  * Populate a batch of rating count lookup table data for products.
1505 1505
  *
1506 1506
  * @since 3.6.2
1507
- * @param array $offset Offset to query.
1508
- * @param array $limit  Limit to query.
1507
+ * @param integer $offset Offset to query.
1508
+ * @param integer $limit  Limit to query.
1509 1509
  */
1510 1510
 function wc_update_product_lookup_tables_rating_count_batch( $offset = 0, $limit = 0 ) {
1511 1511
 	global $wpdb;
Please login to merge, or discard this patch.
includes/data-stores/class-wc-data-store-wp.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
 	 * the approximate search engines list, and is translatable.
494 494
 	 *
495 495
 	 * @since 3.4.0
496
-	 * @param array $terms Terms to check.
496
+	 * @param string[] $terms Terms to check.
497 497
 	 * @return array Terms that are not stopwords.
498 498
 	 */
499 499
 	protected function get_valid_search_terms( $terms ) {
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
 	 * @param int    $id ID of object to update.
580 580
 	 * @param string $table Lookup table name.
581 581
 	 *
582
-	 * @return NULL
582
+	 * @return false|null
583 583
 	 */
584 584
 	protected function update_lookup_table( $id, $table ) {
585 585
 		global $wpdb;
Please login to merge, or discard this patch.
includes/abstracts/abstract-wc-product.php 1 patch
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 	 * This class should NOT be instantiated, but the wc_get_product() function
117 117
 	 * should be used. It is possible, but the wc_get_product() is preferred.
118 118
 	 *
119
-	 * @param int|WC_Product|object $product Product to init.
119
+	 * @param integer $product Product to init.
120 120
 	 */
121 121
 	public function __construct( $product = 0 ) {
122 122
 		parent::__construct( $product );
@@ -855,7 +855,7 @@  discard block
 block discarded – undo
855 855
 	 * Set date on sale from.
856 856
 	 *
857 857
 	 * @since 3.0.0
858
-	 * @param string|integer|null $date UTC timestamp, or ISO 8601 DateTime. If the DateTime string has no timezone or offset, WordPress site timezone will be assumed. Null if their is no date.
858
+	 * @param string $date UTC timestamp, or ISO 8601 DateTime. If the DateTime string has no timezone or offset, WordPress site timezone will be assumed. Null if their is no date.
859 859
 	 */
860 860
 	public function set_date_on_sale_from( $date = null ) {
861 861
 		$this->set_date_prop( 'date_on_sale_from', $date );
@@ -865,7 +865,7 @@  discard block
 block discarded – undo
865 865
 	 * Set date on sale to.
866 866
 	 *
867 867
 	 * @since 3.0.0
868
-	 * @param string|integer|null $date UTC timestamp, or ISO 8601 DateTime. If the DateTime string has no timezone or offset, WordPress site timezone will be assumed. Null if their is no date.
868
+	 * @param string $date UTC timestamp, or ISO 8601 DateTime. If the DateTime string has no timezone or offset, WordPress site timezone will be assumed. Null if their is no date.
869 869
 	 */
870 870
 	public function set_date_on_sale_to( $date = null ) {
871 871
 		$this->set_date_prop( 'date_on_sale_to', $date );
@@ -982,7 +982,7 @@  discard block
 block discarded – undo
982 982
 	/**
983 983
 	 * Set low stock amount.
984 984
 	 *
985
-	 * @param int|string $amount Empty string if value not set.
985
+	 * @param string $amount Empty string if value not set.
986 986
 	 * @since 3.5.0
987 987
 	 */
988 988
 	public function set_low_stock_amount( $amount ) {
@@ -1286,7 +1286,7 @@  discard block
 block discarded – undo
1286 1286
 	 * Set main image ID.
1287 1287
 	 *
1288 1288
 	 * @since 3.0.0
1289
-	 * @param int|string $image_id Product image id.
1289
+	 * @param integer $image_id Product image id.
1290 1290
 	 */
1291 1291
 	public function set_image_id( $image_id = '' ) {
1292 1292
 		$this->set_prop( 'image_id', $image_id );
@@ -1295,7 +1295,7 @@  discard block
 block discarded – undo
1295 1295
 	/**
1296 1296
 	 * Set rating counts. Read only.
1297 1297
 	 *
1298
-	 * @param array $counts Product rating counts.
1298
+	 * @param integer $counts Product rating counts.
1299 1299
 	 */
1300 1300
 	public function set_rating_counts( $counts ) {
1301 1301
 		$this->set_prop( 'rating_counts', array_filter( array_map( 'absint', (array) $counts ) ) );
Please login to merge, or discard this patch.
includes/wc-webhook-functions.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
  * Get webhoook REST API versions.
169 169
  *
170 170
  * @since 3.5.1
171
- * @return array
171
+ * @return string[]
172 172
  */
173 173
 function wc_get_webhook_rest_api_versions() {
174 174
 	return array(
Please login to merge, or discard this patch.
includes/wccom-site/class-wc-wccom-site-installer.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -464,7 +464,7 @@
 block discarded – undo
464 464
 	 *
465 465
 	 * @since 3.7.0
466 466
 	 * @param int $product_id Product ID.
467
-	 * @return bool|string
467
+	 * @return false|string
468 468
 	 */
469 469
 	private static function get_wporg_product_dir_name( $product_id ) {
470 470
 		$steps   = self::get_state( 'steps' );
Please login to merge, or discard this patch.