WC_Discounts D

Total Complexity 167
Dependencies 8
Dependents 4
Total lines 1,010
Lines of code 503
Logical lines of code 327
Comment lines 367
Methods 37
Properties 3

Methods 37

Method Rating Maintainability Complexity Lines of code
apply_coupon_percent()
A
45 11 36
validate_coupon_user_usage_limit()
A
52 10 24
apply_coupon_fixed_product()
A
48 9 29
validate_coupon_product_categories()
A
53 9 22
apply_coupon()
A
49 8 29
validate_coupon_excluded_product_categories()
A
51 8 25
apply_coupon_fixed_cart()
A
52 8 23
validate_coupon_usage_limit()
A
49 7 31
validate_coupon_excluded_items()
S
57 7 16
validate_coupon_product_ids()
S
57 7 15
validate_coupon_excluded_product_ids()
S
58 7 14
apply_coupon_custom()
S
53 6 19
validate_coupon_sale_items()
S
58 6 15
get_items_to_apply_coupon()
S
59 6 14
apply_coupon_remainder()
S
56 5 18
is_coupon_valid()
S
51 4 27
set_items_from_order()
S
54 4 21
get_object_subtotal()
S
60 4 13
set_items_from_cart()
S
56 3 18
validate_coupon_exists()
S
68 4 6
get_discounts_by_item()
S
63 4 10
__construct()
S
69 3 7
sort_by_price()
S
66 3 8
validate_coupon_maximum_amount()
S
66 3 7
validate_coupon_minimum_amount()
S
66 3 7
validate_coupon_expiry_date()
S
68 3 6
get_discounts()
S
75 2 4
get_discounts_by_coupon()
S
74 2 4
get_discount()
S
74 2 4
validate_coupon_eligible_items()
S
67 2 8
get_items_to_validate()
S
79 1 3
get_items()
S
82 1 3
get_object()
S
82 1 3
get_discounted_price()
S
80 1 3
get_discounted_price_in_cents()
S
78 1 3
set_items()
S
73 1 5
filter_products_with_price()
S
80 1 3