Completed
Pull Request — master (#11889)
by Mike
12:12
created
includes/abstracts/abstract-wc-item.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
 	/**
52 52
 	 * Constructor.
53
-	 * @param int|object|array $read ID to load from the DB (optional) or already queried data.
53
+	 * @param integer $read ID to load from the DB (optional) or already queried data.
54 54
 	 */
55 55
 	public function __construct( $read = 0 ) {
56 56
 		parent::__construct( $read );
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
 	/**
70 70
 	 * Type checking
71
-	 * @param  string|array  $Type
71
+	 * @param  string|array  $type
72 72
 	 * @return boolean
73 73
 	 */
74 74
 	public function is_type( $type ) {
Please login to merge, or discard this patch.
includes/class-wc-cart-item.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
 	/**
114 114
 	 * Gets price of the product.
115
-	 * @return float
115
+	 * @return string
116 116
 	 */
117 117
 	public function get_tax_class() {
118 118
 		return $this->get_product() ? $this->get_product()->get_tax_class() : '';
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 
195 195
 	/**
196 196
 	 * Set all data.
197
-	 * @param array $value
197
+	 * @param array $values
198 198
 	 */
199 199
 	public function set_data( $values ) {
200 200
 		if ( is_a( $values, 'WC_Cart_Item' ) ) {
Please login to merge, or discard this patch.
includes/class-wc-cart-items.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 * Get an item by it's key.
48 48
 	 *
49 49
 	 * @param  string $item_key
50
-	 * @return WC_Item_Product|bool
50
+	 * @return integer
51 51
 	 */
52 52
 	public function get_item_by_key( $item_key ) {
53 53
 		return isset( $this->items[ $item_key ] ) ? $this->items[ $item_key ] : false;
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
 	/**
57 57
 	 * Get items.
58
-	 * @return array
58
+	 * @return WC_Item_Product[]
59 59
 	 */
60 60
 	public function get_items() {
61 61
 		return $this->items;
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
 	/**
65 65
 	 * Get removed items.
66
-	 * @return array
66
+	 * @return WC_Item_Product[]
67 67
 	 */
68 68
 	public function get_removed_items() {
69 69
 		return $this->removed_items;
Please login to merge, or discard this patch.
includes/class-wc-cart.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 
146 146
 	/**
147 147
 	 * Returns the contents of the cart in an array.
148
-	 * @return array contents of the cart
148
+	 * @return WC_Item_Product[] contents of the cart
149 149
 	 */
150 150
 	public function get_cart() {
151 151
 		if ( ! did_action( 'wp_loaded' ) ) {
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 
196 196
 	/**
197 197
 	 * Set the quantity for an item in the cart.
198
-	 * @param string	$cart_item_key	contains the id of the cart item
198
+	 * @param integer	$item_key	contains the id of the cart item
199 199
 	 * @param int		$quantity		contains the quantity of the item
200 200
 	 */
201 201
 	public function set_quantity( $item_key, $quantity = 1, $deprecated = true ) {
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 	/**
220 220
 	 * Remove a single coupon by code.
221 221
 	 * @param  string $coupon_code Code of the coupon to remove
222
-	 * @return bool
222
+	 * @return boolean|null
223 223
 	 */
224 224
 	public function remove_coupon( $coupon_code ) {
225 225
 		return $this->coupons->remove_coupon( $coupon_code );
Please login to merge, or discard this patch.
includes/legacy/class-wc-legacy-cart.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@
 block discarded – undo
179 179
 	 * @param int $variation_id
180 180
 	 * @param array $variation attribute values
181 181
 	 * @param array $cart_item_data extra cart item data we want to pass into the item
182
-	 * @return string|bool $cart_item_key
182
+	 * @return string|false $cart_item_key
183 183
 	 */
184 184
 	public function add_to_cart( $product_id = 0, $quantity = 1, $variation_id = 0, $variation = array(), $cart_item_data = array() ) {
185 185
 		_deprecated_function( 'WC_Cart::add_to_cart', '2.7', 'wc_add_to_cart' );
Please login to merge, or discard this patch.
includes/wc-cart-functions.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
  * @param int $product_or_variation_id contains the id of the product to add to the cart.
40 40
  * @param int $quantity contains the quantity of the item to add
41 41
  * @param array $data extra cart item data we want to pass into the item, including any data about the variation if applicable.
42
- * @return string|bool $cart_item_key that was added or false if validation failed.
42
+ * @return string|false $cart_item_key that was added or false if validation failed.
43 43
  */
44 44
 function wc_add_to_cart( $product_or_variation_id = 0, $quantity = 1, $data = array() ) {
45 45
 	try {
Please login to merge, or discard this patch.
includes/wc-core-functions.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
  * WC_TEMPLATE_DEBUG_MODE will prevent overrides in themes from taking priority.
129 129
  *
130 130
  * @access public
131
- * @param mixed $slug
131
+ * @param string $slug
132 132
  * @param string $name (default: '')
133 133
  */
134 134
 function wc_get_template_part( $slug, $name = '' ) {
@@ -1447,7 +1447,7 @@  discard block
 block discarded – undo
1447 1447
  *
1448 1448
  * @since 2.7.0
1449 1449
  * @param array      $list      List of objects or arrays
1450
- * @param int|string $callback_or_field     Callback method from the object to place instead of the entire object
1450
+ * @param string $callback_or_field     Callback method from the object to place instead of the entire object
1451 1451
  * @param int|string $index_key Optional. Field from the object to use as keys for the new array.
1452 1452
  *                              Default null.
1453 1453
  * @return array Array of values.
Please login to merge, or discard this patch.
includes/class-wc-cart-totals.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -392,6 +392,7 @@  discard block
 block discarded – undo
392 392
 	/**
393 393
 	 * Should we calc tax?
394 394
 	 * @param bool
395
+	 * @param boolean $value
395 396
 	 */
396 397
 	public function set_calculate_tax( $value ) {
397 398
 		$this->calculate_tax = (bool) $value;
@@ -408,7 +409,7 @@  discard block
 block discarded – undo
408 409
 
409 410
 	/**
410 411
 	 * Sets items and adds precision which lets us work with integers.
411
-	 * @param array $items
412
+	 * @param WC_Item_Product[] $items
412 413
 	 */
413 414
 	public function set_items( $items ) {
414 415
 		foreach ( $items as $item_key => $maybe_item ) {
Please login to merge, or discard this patch.