Completed
Pull Request — master (#24892)
by Claudio
08:16
created
includes/class-wc-post-types.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -580,7 +580,7 @@
 block discarded – undo
580 580
 	 * Added product for Jetpack related posts.
581 581
 	 *
582 582
 	 * @param  array $post_types Post types.
583
-	 * @return array
583
+	 * @return string[]
584 584
 	 */
585 585
 	public static function rest_api_allowed_post_types( $post_types ) {
586 586
 		$post_types[] = 'product';
Please login to merge, or discard this patch.
includes/class-wc-structured-data.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -370,7 +370,7 @@
 block discarded – undo
370 370
 	 *
371 371
 	 * Hooked into `woocommerce_email_order_details` action hook.
372 372
 	 *
373
-	 * @param WP_Order $order         Order data.
373
+	 * @param WC_Order $order         Order data.
374 374
 	 * @param bool     $sent_to_admin Send to admin (default: false).
375 375
 	 * @param bool     $plain_text    Plain text email (default: false).
376 376
 	 */
Please login to merge, or discard this patch.
includes/abstracts/abstract-wc-order.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	 * should be used. It is possible, but the aforementioned are preferred and are the only.
91 91
 	 * methods that will be maintained going forward.
92 92
 	 *
93
-	 * @param  int|object|WC_Order $order Order to read.
93
+	 * @param  integer $order Order to read.
94 94
 	 */
95 95
 	public function __construct( $order = 0 ) {
96 96
 		parent::__construct( $order );
@@ -1237,7 +1237,7 @@  discard block
 block discarded – undo
1237 1237
 	 * Calculate shipping total.
1238 1238
 	 *
1239 1239
 	 * @since 2.2
1240
-	 * @return float
1240
+	 * @return string
1241 1241
 	 */
1242 1242
 	public function calculate_shipping() {
1243 1243
 		$shipping_total = 0;
@@ -1474,7 +1474,7 @@  discard block
 block discarded – undo
1474 1474
 	/**
1475 1475
 	 * Get item subtotal - this is the cost before discount.
1476 1476
 	 *
1477
-	 * @param object $item Item to get total from.
1477
+	 * @param WC_Order_Item $item Item to get total from.
1478 1478
 	 * @param bool   $inc_tax (default: false).
1479 1479
 	 * @param bool   $round (default: true).
1480 1480
 	 * @return float
Please login to merge, or discard this patch.
includes/gateways/paypal/includes/class-wc-gateway-paypal-pdt-handler.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
 	 * Validate a PDT transaction to ensure its authentic.
41 41
 	 *
42 42
 	 * @param  string $transaction TX ID.
43
-	 * @return bool|array False or result array if successful and valid.
43
+	 * @return WC_Order False or result array if successful and valid.
44 44
 	 */
45 45
 	protected function validate_transaction( $transaction ) {
46 46
 		$pdt = array(
Please login to merge, or discard this patch.
includes/wc-formatting-functions.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1350,7 +1350,7 @@
 block discarded – undo
1350 1350
  *
1351 1351
  * @since 3.4.0
1352 1352
  * @param mixed $raw_value Value stored in DB.
1353
- * @return array Nicely formatted array with number and unit values.
1353
+ * @return integer Nicely formatted array with number and unit values.
1354 1354
  */
1355 1355
 function wc_parse_relative_date_option( $raw_value ) {
1356 1356
 	$periods = array(
Please login to merge, or discard this patch.
includes/wc-template-functions.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
  * @since 3.3.0
203 203
  * @param string $prop Prop to get.
204 204
  * @param string $default Default if the prop does not exist.
205
- * @return mixed
205
+ * @return string
206 206
  */
207 207
 function wc_get_loop_prop( $prop, $default = '' ) {
208 208
 	wc_setup_loop(); // Ensure shop loop is setup.
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
  * Add body classes for WC pages.
263 263
  *
264 264
  * @param  array $classes Body Classes.
265
- * @return array
265
+ * @return string[]
266 266
  */
267 267
 function wc_body_class( $classes ) {
268 268
 	$classes = (array) $classes;
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
  *
657 657
  * @since 3.0.0
658 658
  * @param string|array $values Name value pairs, or a URL to parse.
659
- * @param array        $exclude Keys to exclude.
659
+ * @param string[]        $exclude Keys to exclude.
660 660
  * @param string       $current_key Current key we are outputting.
661 661
  * @param bool         $return Whether to return.
662 662
  * @return string
@@ -1699,7 +1699,7 @@  discard block
 block discarded – undo
1699 1699
 			 *
1700 1700
 			 * @param array $a Comparison A.
1701 1701
 			 * @param array $b Comparison B.
1702
-			 * @return bool
1702
+			 * @return integer
1703 1703
 			 */
1704 1704
 			function _sort_priority_callback( $a, $b ) {
1705 1705
 				if ( ! isset( $a['priority'], $b['priority'] ) || $a['priority'] === $b['priority'] ) {
Please login to merge, or discard this patch.
includes/wc-order-item-functions.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
  * @param array $item_array Items list.
18 18
  *
19 19
  * @throws Exception        When `WC_Data_Store::load` validation fails.
20
- * @return int|bool         Item ID or false
20
+ * @return integer         Item ID or false
21 21
  */
22 22
 function wc_add_order_item( $order_id, $item_array ) {
23 23
 	$order_id = absint( $order_id );
Please login to merge, or discard this patch.
includes/wc-rest-functions.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -338,7 +338,7 @@
 block discarded – undo
338 338
  *
339 339
  * @since 3.5.0
340 340
  * @param string $context   Request context.
341
- * @param string $object_id Object ID.
341
+ * @param integer $object_id Object ID.
342 342
  * @return bool
343 343
  */
344 344
 function wc_rest_check_product_reviews_permissions( $context = 'read', $object_id = 0 ) {
Please login to merge, or discard this patch.
includes/class-wc-order-factory.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 * Get order item.
56 56
 	 *
57 57
 	 * @param int $item_id Order item ID to get.
58
-	 * @return WC_Order_Item|false if not found
58
+	 * @return WC_Order_Item if not found
59 59
 	 */
60 60
 	public static function get_order_item( $item_id = 0 ) {
61 61
 		if ( is_numeric( $item_id ) ) {
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 *
112 112
 	 * @since 3.0.0
113 113
 	 * @param  mixed $order Order data to convert to an ID.
114
-	 * @return int|bool false on failure
114
+	 * @return boolean false on failure
115 115
 	 */
116 116
 	public static function get_order_id( $order ) {
117 117
 		global $post;
Please login to merge, or discard this patch.