Merge pull request #19305 from woocommerce/update/coupon-functions-phpcs

Fixed includes/wc-coupon-functions.php PHPCS violations
This commit is contained in:
Mike Jolley 2018-03-08 15:06:07 +00:00 committed by GitHub
commit 43655f349e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 16 deletions

View File

@ -1,36 +1,34 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* WooCommerce Coupons Functions
*
* Functions for coupon specific things.
*
* @author WooThemes
* @category Core
* @package WooCommerce/Functions
* @version 3.0.0
*/
defined( 'ABSPATH' ) || exit;
/**
* Get coupon types.
*
* @return array
*/
function wc_get_coupon_types() {
return (array) apply_filters( 'woocommerce_coupon_discount_types', array(
return (array) apply_filters(
'woocommerce_coupon_discount_types', array(
'percent' => __( 'Percentage discount', 'woocommerce' ),
'fixed_cart' => __( 'Fixed cart discount', 'woocommerce' ),
'fixed_product' => __( 'Fixed product discount', 'woocommerce' ),
) );
)
);
}
/**
* Get a coupon type's name.
*
* @param string $type (default: '')
* @param string $type Coupon type.
* @return string
*/
function wc_get_coupon_type( $type = '' ) {
@ -86,7 +84,7 @@ function wc_get_coupon_code_by_id( $id ) {
* Get coupon code by ID.
*
* @since 3.0.0
* @param string $code
* @param string $code Coupon code.
* @param int $exclude Used to exclude an ID from the check if you're checking existence.
* @return int
*/