FlycartWooDiscountRulesCartRules D

Total Complexity 849
Dependencies 10
Dependents 2
Total lines 2,935
Lines of code 2,288
Logical lines of code 1,579
Comment lines 391
Methods 56
Properties 25

Methods 56

Method Rating Maintainability Complexity Lines of code
applyCartBOGORule()
D
0
176 444
applyRule()
D
0
170 422
save()
D
26
40 143
getDiscountAmount()
D
29
39 124
validateCartItemsBasedOnPurchaseHistory()
D
29 39 111
calculateProductDiscount()
C
35 30 74
checkForCategoryAndProductMatchesForAnProduct()
B
40 23 64
checkForProductConditionsMatchesForAnProduct()
B
41 20 58
checkAllCategoryFoundInCart()
B
40 19 57
generateRuleSets()
B
45 20 31
getRules()
B
45 19 33
validateCartItemsInSelectedProductsAndCategories()
A
45 15 40
checkQtySubTotalConditionsMatches()
A
49 14 33
filterRules()
A
48 14 30
addVirtualCoupon()
A
42 12 48
addVirtualCouponForBOGO()
A
44 10 43
applyFakeCouponsForBOGO()
A
48 10 33
validateCartCouponAppliedAllSelected()
A
51 10 28
validateCartCouponAppliedAnyOne()
A
52 10 26
calculate_conditional_subtotal()
A
51 10 24
get_discounted_categories_from_json()
A
51 9 30
applyFakeCoupons()
A
50 8 29
is_product_specific()
A
52 8 26
processPromotionMessage()
A
53 8 22
calculateCartSubtotal()
S
57 7 15
calculateDiscount()
S
59 7 14
getSubTotalOfCartItem()
S
57 6 15
validateCart()
S
58 6 15
validateBOGOCart()
S
58 6 15
cartItemQtyTotal()
S
60 6 12
getVariantsOfSelectedProduct()
S
62 6 12
analyse()
S
55 5 19
getProductsFromRule()
S
59 5 15
trigger_event_woocommerce_applied_coupon()
S
59 5 15
validateTLD()
S
61 5 14
orderRules()
S
60 5 13
getTLDFromEmail()
S
59 4 15
checkCategoryMatches()
S
61 4 13
view()
S
63 4 11
__construct()
S
63 4 9
getCouponCode()
S
65 4 8
does_item_belong_to_category()
S
66 3 8
applyRules()
S
68 3 7
makeLog()
S
66 3 8
checkProductMatches()
S
67 2 8
getDomainFromEmail()
S
68 2 7
is_category_specific()
S
71 2 6
getPriceOfCartItem()
S
66 2 8
checkPoint()
S
80 2 3
setAppliedCoupon()
S
72 2 5
organizeRules()
S
78 1 4
woocommerceEnableCoupons()
S
82 1 3
removeWoocommerceCoupon()
S
80 1 3
getAppliedCoupons()
S
80 1 3
formatBOGOCouponCode()
S
67 1 7
filterCouponCode()
S
72 1 5