@@ -247,6 +247,7 @@ |
||
247 | 247 | |
248 | 248 | /** |
249 | 249 | * Return settings associated with this payment gateway. |
250 | + * @param WC_Payment_Gateway $gateway |
|
250 | 251 | */ |
251 | 252 | public function get_settings( $gateway ) { |
252 | 253 | $settings = array(); |
@@ -246,7 +246,7 @@ |
||
246 | 246 | * Validate image_width based settings. |
247 | 247 | * |
248 | 248 | * @since 2.7.0 |
249 | - * @param array $value |
|
249 | + * @param array $values |
|
250 | 250 | * @param array $setting |
251 | 251 | * @return string|WP_Error |
252 | 252 | */ |
@@ -50,7 +50,7 @@ discard block |
||
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 |
||
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 ) { |
@@ -112,7 +112,7 @@ discard block |
||
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 |
||
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' ) ) { |
@@ -47,7 +47,7 @@ discard block |
||
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 |
||
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 |
||
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; |
@@ -145,7 +145,7 @@ discard block |
||
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 |
||
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 |
||
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 ); |
@@ -594,6 +594,7 @@ discard block |
||
594 | 594 | * Return true/false depending on if a rate is a compound rate. |
595 | 595 | * |
596 | 596 | * @param int key |
597 | + * @param integer $key |
|
597 | 598 | * @return bool |
598 | 599 | */ |
599 | 600 | public static function is_compound( $key ) { |
@@ -604,7 +605,7 @@ discard block |
||
604 | 605 | /** |
605 | 606 | * Return a given rates label. |
606 | 607 | * |
607 | - * @param mixed $key_or_rate Tax rate ID, or the db row itself in object format |
|
608 | + * @param integer $key_or_rate Tax rate ID, or the db row itself in object format |
|
608 | 609 | * @return string |
609 | 610 | */ |
610 | 611 | public static function get_rate_label( $key_or_rate ) { |
@@ -649,7 +650,7 @@ discard block |
||
649 | 650 | * Get a rates code. Code is made up of COUNTRY-STATE-NAME-Priority. E.g GB-VAT-1, US-AL-TAX-1. |
650 | 651 | * |
651 | 652 | * @access public |
652 | - * @param mixed $key_or_rate Tax rate ID, or the db row itself in object format |
|
653 | + * @param integer $key_or_rate Tax rate ID, or the db row itself in object format |
|
653 | 654 | * @return string |
654 | 655 | */ |
655 | 656 | public static function get_rate_code( $key_or_rate ) { |
@@ -40,7 +40,6 @@ discard block |
||
40 | 40 | |
41 | 41 | /** |
42 | 42 | * Add a tax row to the order. |
43 | - * @param array $args |
|
44 | 43 | * @param int $tax_amount amount of tax. |
45 | 44 | * @param int $shipping_tax_amount shipping amount. |
46 | 45 | * @return int order item ID |
@@ -64,6 +63,7 @@ discard block |
||
64 | 63 | /** |
65 | 64 | * Add a shipping row to the order. |
66 | 65 | * @param WC_Shipping_Rate shipping_rate |
66 | + * @param WC_Shipping_Rate $shipping_rate |
|
67 | 67 | * @return int order item ID |
68 | 68 | */ |
69 | 69 | public function add_shipping( $shipping_rate ) { |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | /** |
87 | 87 | * Add a fee to the order. |
88 | 88 | * Order must be saved prior to adding items. |
89 | - * @param object $fee |
|
89 | + * @param stdClass $fee |
|
90 | 90 | * @return int updated order item ID |
91 | 91 | */ |
92 | 92 | public function add_fee( $fee ) { |
@@ -179,7 +179,7 @@ |
||
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' ); |