@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | /** |
116 | 116 | * Get post types. |
117 | 117 | * |
118 | - * @return array |
|
118 | + * @return string[] |
|
119 | 119 | */ |
120 | 120 | protected function get_post_types() { |
121 | 121 | return array( 'product', 'product_variation' ); |
@@ -817,7 +817,7 @@ discard block |
||
817 | 817 | /** |
818 | 818 | * Save downloadable files. |
819 | 819 | * |
820 | - * @param in $product_id |
|
820 | + * @param integer $product_id |
|
821 | 821 | * @param array $downloads |
822 | 822 | * @param int $variation_id |
823 | 823 | */ |
@@ -115,7 +115,7 @@ |
||
115 | 115 | /** |
116 | 116 | * Get post types. |
117 | 117 | * |
118 | - * @return array |
|
118 | + * @return string[] |
|
119 | 119 | */ |
120 | 120 | protected function get_post_types() { |
121 | 121 | return array( 'product', 'product_variation' ); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | /** |
146 | 146 | * Decode and format a URL. |
147 | 147 | * @param string $url |
148 | - * @return array |
|
148 | + * @return string |
|
149 | 149 | */ |
150 | 150 | protected function get_formatted_url( $url ) { |
151 | 151 | $url = urldecode( $url ); |
@@ -519,6 +519,9 @@ discard block |
||
519 | 519 | return true; |
520 | 520 | } |
521 | 521 | |
522 | + /** |
|
523 | + * @param integer $key_id |
|
524 | + */ |
|
522 | 525 | public static function update_last_access( $key_id ) { |
523 | 526 | return self::update_api_key( $key_id, array( 'last_access' => current_time( 'mysql' ) ) ); |
524 | 527 | } |
@@ -715,6 +718,9 @@ discard block |
||
715 | 718 | return $result; |
716 | 719 | } |
717 | 720 | |
721 | + /** |
|
722 | + * @param integer $key_id |
|
723 | + */ |
|
718 | 724 | public static function clear_api_key_cache( $key_id ) { |
719 | 725 | $data = self::get_api_key_data( $key_id ); |
720 | 726 | if ( ! $data ) { |
@@ -341,7 +341,7 @@ |
||
341 | 341 | * Outputs hidden form inputs for each query string variable. |
342 | 342 | * @since 2.7.0 |
343 | 343 | * @param array $values Name value pairs. |
344 | - * @param array $exclude Keys to exclude. |
|
344 | + * @param string[] $exclude Keys to exclude. |
|
345 | 345 | * @param string $current_key Current key we are outputting. |
346 | 346 | */ |
347 | 347 | function wc_query_string_form_fields( $values = null, $exclude = array(), $current_key = '', $return = false ) { |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | * should be used. It is possible, but the aforementioned are preferred and are the only. |
96 | 96 | * methods that will be maintained going forward. |
97 | 97 | * |
98 | - * @param int|object|WC_Order $order Order to init. |
|
98 | + * @param integer $order Order to init. |
|
99 | 99 | */ |
100 | 100 | public function __construct( $order = 0 ) { |
101 | 101 | if ( is_numeric( $order ) && $order > 0 ) { |
@@ -216,6 +216,7 @@ discard block |
||
216 | 216 | /** |
217 | 217 | * Post meta update wrapper. Sets or deletes based on value. |
218 | 218 | * @since 2.7.0 |
219 | + * @param string $key |
|
219 | 220 | * @return bool Was it changed? |
220 | 221 | */ |
221 | 222 | protected function update_post_meta( $key, $value ) { |
@@ -1135,6 +1136,7 @@ discard block |
||
1135 | 1136 | * Add a shipping row to the order. |
1136 | 1137 | * Order must be saved prior to adding items. |
1137 | 1138 | * @param WC_Shipping_Rate shipping_rate |
1139 | + * @param WC_Shipping_Rate $shipping_rate |
|
1138 | 1140 | * @return int order item ID |
1139 | 1141 | */ |
1140 | 1142 | public function add_shipping( $shipping_rate ) { |
@@ -1159,7 +1161,7 @@ discard block |
||
1159 | 1161 | /** |
1160 | 1162 | * Add a fee to the order. |
1161 | 1163 | * Order must be saved prior to adding items. |
1162 | - * @param object $fee |
|
1164 | + * @param stdClass $fee |
|
1163 | 1165 | * @return int updated order item ID |
1164 | 1166 | */ |
1165 | 1167 | public function add_fee( $fee ) { |
@@ -1232,7 +1234,7 @@ discard block |
||
1232 | 1234 | * Calculate shipping total. |
1233 | 1235 | * |
1234 | 1236 | * @since 2.2 |
1235 | - * @return float |
|
1237 | + * @return string |
|
1236 | 1238 | */ |
1237 | 1239 | public function calculate_shipping() { |
1238 | 1240 | $shipping_total = 0; |
@@ -539,7 +539,6 @@ |
||
539 | 539 | /** |
540 | 540 | * Create or update an order shipping method. |
541 | 541 | * |
542 | - * @param $posted $shipping Item data. |
|
543 | 542 | * @param string $action 'create' to add shipping or 'update' to update it. |
544 | 543 | * @throws WC_REST_Exception Invalid data, server error. |
545 | 544 | */ |
@@ -597,8 +597,8 @@ discard block |
||
597 | 597 | * WooCommerce Order Item Meta API - Update term meta. |
598 | 598 | * |
599 | 599 | * @access public |
600 | - * @param mixed $item_id |
|
601 | - * @param mixed $meta_key |
|
600 | + * @param integer $item_id |
|
601 | + * @param string $meta_key |
|
602 | 602 | * @param mixed $meta_value |
603 | 603 | * @param string $prev_value (default: '') |
604 | 604 | * @return bool |
@@ -617,7 +617,7 @@ discard block |
||
617 | 617 | * |
618 | 618 | * @access public |
619 | 619 | * @param mixed $item_id |
620 | - * @param mixed $meta_key |
|
620 | + * @param string $meta_key |
|
621 | 621 | * @param mixed $meta_value |
622 | 622 | * @param bool $unique (default: false) |
623 | 623 | * @return int New row ID or 0 |
@@ -655,7 +655,7 @@ discard block |
||
655 | 655 | * |
656 | 656 | * @access public |
657 | 657 | * @param mixed $item_id |
658 | - * @param mixed $key |
|
658 | + * @param string $key |
|
659 | 659 | * @param bool $single (default: true) |
660 | 660 | * @return mixed |
661 | 661 | */ |