WC_Coupon D

Total Complexity 162
Dependencies 5
Dependents 17
Total lines 1,080
Lines of code 451
Logical lines of code 266
Comment lines 483
Methods 64
Properties 2

Methods 64

Method Rating Maintainability Complexity Lines of code
get_coupon_error()
C
34 28 81
read_manual_coupon()
A
45 15 41
is_valid_for_product()
A
50 15 27
__construct()
A
51 9 27
get_discount_amount()
A
51 9 25
set_amount()
S
60 5 13
decrease_usage_count()
S
64 5 9
add_coupon_message()
S
63 4 11
increase_usage_count()
S
64 4 9
get_coupon_message()
S
60 3 14
get_generic_coupon_error()
S
60 3 14
set_discount_type()
S
64 3 9
set_email_restrictions()
S
64 3 9
is_type()
S
77 3 3
set_limit_usage_to_x_items()
S
78 2 3
read_object_from_database()
S
71 2 6
is_valid()
S
65 2 9
set_usage_limit()
S
79 1 3
set_usage_limit_per_user()
S
79 1 3
set_free_shipping()
S
79 1 3
set_product_categories()
S
78 1 3
set_excluded_product_categories()
S
78 1 3
set_exclude_sale_items()
S
79 1 3
set_minimum_amount()
S
79 1 3
set_maximum_amount()
S
79 1 3
set_used_by()
S
79 1 3
set_product_ids()
S
78 1 3
set_virtual()
S
79 1 3
get_amount()
S
79 1 3
get_discount_type()
S
79 1 3
get_status()
S
79 1 3
get_error_message()
S
82 1 3
is_valid_for_cart()
S
78 1 3
get_description()
S
79 1 3
get_code()
S
79 1 3
get_hook_prefix()
S
82 1 3
set_excluded_product_ids()
S
78 1 3
get_date_modified()
S
79 1 3
set_individual_use()
S
79 1 3
get_minimum_amount()
S
79 1 3
get_individual_use()
S
79 1 3
get_product_ids()
S
79 1 3
get_excluded_product_ids()
S
79 1 3
get_usage_limit()
S
79 1 3
get_usage_limit_per_user()
S
79 1 3
get_limit_usage_to_x_items()
S
79 1 3
get_free_shipping()
S
79 1 3
get_product_categories()
S
79 1 3
get_excluded_product_categories()
S
79 1 3
get_exclude_sale_items()
S
79 1 3
get_maximum_amount()
S
79 1 3
get_usage_count()
S
79 1 3
get_email_restrictions()
S
79 1 3
get_used_by()
S
79 1 3
get_virtual()
S
79 1 3
get_date_created()
S
79 1 3
set_code()
S
79 1 3
set_description()
S
80 1 3
set_status()
S
80 1 3
get_date_expires()
S
79 1 3
set_date_expires()
S
80 1 3
set_date_created()
S
80 1 3
set_date_modified()
S
80 1 3
set_usage_count()
S
79 1 3