From de06d17c6d047de3e719d146efe3cef51a7d24ee Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Tue, 3 Feb 2015 14:32:10 +0000 Subject: [PATCH] Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com --- includes/class-wc-frontend-scripts.php | 2 +- includes/class-wc-tax.php | 9 +++++---- includes/gateways/paypal/class-wc-gateway-paypal.php | 2 +- .../includes/class-wc-gateway-paypal-ipn-handler.php | 3 +-- .../paypal/includes/class-wc-gateway-paypal-request.php | 1 + .../class-wc-gateway-simplify-commerce.php | 1 + 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/includes/class-wc-frontend-scripts.php b/includes/class-wc-frontend-scripts.php index 3f9988db26c..5c4d0c45c59 100644 --- a/includes/class-wc-frontend-scripts.php +++ b/includes/class-wc-frontend-scripts.php @@ -71,7 +71,7 @@ class WC_Frontend_Scripts { * @access private * @param string $handle [description] * @param string $path [description] - * @param array $deps [description] + * @param string[] $deps [description] * @param string $version [description] * @param boolean $in_footer [description] */ diff --git a/includes/class-wc-tax.php b/includes/class-wc-tax.php index 691f9c993f1..9a2af6d6479 100644 --- a/includes/class-wc-tax.php +++ b/includes/class-wc-tax.php @@ -91,6 +91,7 @@ class WC_Tax { * return round( $in / 5, 2 ) * 5; * } * add_filter( 'woocommerce_tax_round', 'euro_5cent_rounding' ); + * @return double */ public static function round( $in ) { return apply_filters( 'woocommerce_tax_round', round( $in, self::$precision ), $in ); @@ -255,7 +256,7 @@ class WC_Tax { * @param string $postcode * @param string $city * @param string $tax_class - * @param array $valid_postcodes + * @param string[] $valid_postcodes * @return array */ private static function get_matched_tax_rates( $country, $state, $postcode, $city, $tax_class, $valid_postcodes ) { @@ -634,7 +635,7 @@ class WC_Tax { /** * format the rate * @param double $rate - * @return float + * @return string */ private static function format_tax_rate( $rate ) { return number_format( (double) $rate, 4, '.', '' ); @@ -786,7 +787,7 @@ class WC_Tax { * @access private * * @param int $tax_rate_id - * @param string $cities + * @param string $type * @return string */ private static function _update_tax_rate_locations( $tax_rate_id, $values, $type ) { @@ -847,7 +848,7 @@ class WC_Tax { * @access private * * @param string $postcode array of values - * @return array Array of postcodes with wildcards + * @return string[] Array of postcodes with wildcards */ private static function _get_wildcard_postcodes( $postcode ) { $postcodes = array( '*', strtoupper( $postcode ) ); diff --git a/includes/gateways/paypal/class-wc-gateway-paypal.php b/includes/gateways/paypal/class-wc-gateway-paypal.php index 963052659e7..9a392514595 100644 --- a/includes/gateways/paypal/class-wc-gateway-paypal.php +++ b/includes/gateways/paypal/class-wc-gateway-paypal.php @@ -249,7 +249,7 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway { * @param int $order_id * @param float $amount * @param string $reason - * @return bool|wp_error True or false based on success, or a WP_Error object + * @return boolean True or false based on success, or a WP_Error object */ public function process_refund( $order_id, $amount = null, $reason = '' ) { $order = wc_get_order( $order_id ); diff --git a/includes/gateways/paypal/includes/class-wc-gateway-paypal-ipn-handler.php b/includes/gateways/paypal/includes/class-wc-gateway-paypal-ipn-handler.php index 4cd393a762d..18066a96220 100644 --- a/includes/gateways/paypal/includes/class-wc-gateway-paypal-ipn-handler.php +++ b/includes/gateways/paypal/includes/class-wc-gateway-paypal-ipn-handler.php @@ -137,7 +137,6 @@ class WC_Gateway_Paypal_IPN_Handler extends WC_Gateway_Paypal_Response { /** * Check payment amount from IPN matches the order * @param WC_Order $order - * @param string $currency */ private function validate_amount( $order, $amount ) { if ( number_format( $order->get_total(), 2, '.', '' ) != number_format( $amount, 2, '.', '' ) ) { @@ -152,7 +151,6 @@ class WC_Gateway_Paypal_IPN_Handler extends WC_Gateway_Paypal_Response { /** * Check payment amount from IPN matches the order * @param WC_Order $order - * @param string $currency */ private function validate_receiver_email( $order, $receiver_email ) { if ( strcasecmp( trim( $receiver_email ), trim( $this->receiver_email ) ) != 0 ) { @@ -272,6 +270,7 @@ class WC_Gateway_Paypal_IPN_Handler extends WC_Gateway_Paypal_Response { /** * Save important data from the IPN to the order + * @param WC_Order $order */ private function save_paypal_meta_data( $order, $posted ) { if ( ! empty( $posted['payer_email'] ) ) { diff --git a/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php b/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php index 513cf928182..f19496b0846 100644 --- a/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php +++ b/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php @@ -29,6 +29,7 @@ class WC_Gateway_Paypal_Request { /** * Constructor + * @param WC_Gateway_Paypal $gateway */ public function __construct( $gateway ) { $this->gateway = $gateway; diff --git a/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php b/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php index 6d78f12c4e6..df7bab4275b 100644 --- a/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php +++ b/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php @@ -370,6 +370,7 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway { /** * Process standard payments * + * @param WC_Order $order * @return array */ protected function process_hosted_payments( $order ) {