@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | /** |
64 | 64 | * Returns the payment token ID. |
65 | 65 | * @since 2.6.0 |
66 | - * @return ID Token ID |
|
66 | + * @return integer Token ID |
|
67 | 67 | */ |
68 | 68 | public function get_id() { |
69 | 69 | return absint( $this->_data['id'] ); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | /** |
188 | 188 | * Update a payment token. |
189 | 189 | * @since 2.6.0 |
190 | - * @return True on success, false if validation failed and a payment token could not be updated |
|
190 | + * @return boolean on success, false if validation failed and a payment token could not be updated |
|
191 | 191 | */ |
192 | 192 | public function update() { |
193 | 193 | if ( false === $this->validate() ) { |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | /** |
224 | 224 | * Create a new payment token in the database. |
225 | 225 | * @since 2.6.0 |
226 | - * @return True on success, false if validation failed and a payment token could not be created |
|
226 | + * @return boolean on success, false if validation failed and a payment token could not be created |
|
227 | 227 | */ |
228 | 228 | public function create() { |
229 | 229 | if ( false === $this->validate() ) { |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | /** |
263 | 263 | * Saves a payment token to the database - does not require you to know if this is a new token or an update token. |
264 | 264 | * @since 2.6.0 |
265 | - * @return True on success, false if validation failed and a payment token could not be saved |
|
265 | + * @return boolean on success, false if validation failed and a payment token could not be saved |
|
266 | 266 | */ |
267 | 267 | public function save() { |
268 | 268 | if ( $this->get_id() > 0 ) { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * |
45 | 45 | * @param string $id |
46 | 46 | * @param string $label |
47 | - * @param float $cost |
|
47 | + * @param integer $cost |
|
48 | 48 | * @param array $taxes |
49 | 49 | * @param string $method_id |
50 | 50 | */ |
@@ -87,8 +87,6 @@ discard block |
||
87 | 87 | /** |
88 | 88 | * Get all meta data for this rate. |
89 | 89 | * @since 2.6.0 |
90 | - * @param string $key |
|
91 | - * @param string $value |
|
92 | 90 | */ |
93 | 91 | public function get_meta_data() { |
94 | 92 | return $this->meta_data; |
@@ -201,7 +201,7 @@ |
||
201 | 201 | /** |
202 | 202 | * Parse file path and see if its remote or local. |
203 | 203 | * @param string $file_path |
204 | - * @return array |
|
204 | + * @return string |
|
205 | 205 | */ |
206 | 206 | public static function parse_file_path( $file_path ) { |
207 | 207 | $wp_uploads = wp_upload_dir(); |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | * |
559 | 559 | * @param WP_Term $term |
560 | 560 | * @param WP_REST_Request $request |
561 | - * @return bool|WP_Error |
|
561 | + * @return boolean |
|
562 | 562 | */ |
563 | 563 | protected function update_term_meta_fields( $term, $request ) { |
564 | 564 | return true; |
@@ -730,7 +730,7 @@ discard block |
||
730 | 730 | * Get taxonomy. |
731 | 731 | * |
732 | 732 | * @param WP_REST_Request $request Full details about the request. |
733 | - * @return int|WP_Error |
|
733 | + * @return string |
|
734 | 734 | */ |
735 | 735 | protected function get_taxonomy( $request ) { |
736 | 736 | // Check if taxonomy is defined. |
@@ -184,7 +184,7 @@ |
||
184 | 184 | * |
185 | 185 | * @param stdClass $user |
186 | 186 | * @param array $params The request parameters. |
187 | - * @return null|WP_Error |
|
187 | + * @return stdClass |
|
188 | 188 | */ |
189 | 189 | private function check_oauth_signature( $user, $params ) { |
190 | 190 | $http_method = strtoupper( $_SERVER['REQUEST_METHOD'] ); |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | * |
286 | 286 | * @param WP_Post $post |
287 | 287 | * @param WP_REST_Request $request |
288 | - * @return bool|WP_Error |
|
288 | + * @return boolean |
|
289 | 289 | */ |
290 | 290 | protected function add_post_meta_fields( $post, $request ) { |
291 | 291 | $data = $request->get_json_params(); |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | * |
341 | 341 | * @param WP_Post $post |
342 | 342 | * @param WP_REST_Request $request |
343 | - * @return bool|WP_Error |
|
343 | + * @return boolean |
|
344 | 344 | */ |
345 | 345 | protected function update_post_meta_fields( $post, $request ) { |
346 | 346 | if ( isset( $request['amount'] ) ) { |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | * Create order. |
414 | 414 | * |
415 | 415 | * @param WP_REST_Request $request Full details about the request. |
416 | - * @return int|WP_Error |
|
416 | + * @return integer |
|
417 | 417 | */ |
418 | 418 | protected function create_order( $request ) { |
419 | 419 | wc_transaction_query( 'start' ); |
@@ -789,7 +789,7 @@ discard block |
||
789 | 789 | * 1) Only non-protected meta (no leading underscore) can be set |
790 | 790 | * 2) Meta values must be scalar (int, string, bool) |
791 | 791 | * |
792 | - * @param WC_Order $order Order data. |
|
792 | + * @param integer $order_id Order data. |
|
793 | 793 | * @param array $meta_data Meta data in array( 'meta_key' => 'meta_value' ) format. |
794 | 794 | */ |
795 | 795 | protected function update_meta_data( $order_id, $meta_data ) { |
@@ -896,7 +896,7 @@ discard block |
||
896 | 896 | * |
897 | 897 | * @param WP_REST_Request $request Full details about the request. |
898 | 898 | * @param WP_Post $post Post data. |
899 | - * @return int|WP_Error |
|
899 | + * @return integer |
|
900 | 900 | */ |
901 | 901 | protected function update_order( $request, $post ) { |
902 | 902 | try { |
@@ -470,7 +470,6 @@ discard block |
||
470 | 470 | * Prepare links for the request. |
471 | 471 | * |
472 | 472 | * @param object $attribute Attribute object. |
473 | - * @param WP_REST_Request $request Full details about the request. |
|
474 | 473 | * @return array Links for the given attribute. |
475 | 474 | */ |
476 | 475 | protected function prepare_links( $attribute ) { |
@@ -562,7 +561,7 @@ discard block |
||
562 | 561 | * Get attribute name. |
563 | 562 | * |
564 | 563 | * @param WP_REST_Request $request Full details about the request. |
565 | - * @return int|WP_Error |
|
564 | + * @return string |
|
566 | 565 | */ |
567 | 566 | protected function get_taxonomy( $request ) { |
568 | 567 | if ( '' !== $this->attribute ) { |
@@ -380,7 +380,6 @@ |
||
380 | 380 | /** |
381 | 381 | * Prepare a single webhook output for response. |
382 | 382 | * |
383 | - * @param WP_Post $webhook Webhook object. |
|
384 | 383 | * @param WP_REST_Request $request Request object. |
385 | 384 | * @return WP_REST_Response $response Response data. |
386 | 385 | */ |