CoCart_Cart_V2_Controller D

Total Complexity 246
Dependencies 12
Dependents 4
Total lines 2,994
Lines of code 1,964
Logical lines of code 543
Comment lines 810
Methods 50
Properties 2

Methods 50

Method Rating Maintainability Complexity Lines of code
get_public_cart_schema()
D
10
1 991
get_cart_template_limited()
D
29
37 123
return_cart_contents()
B
41 16 49
validate_product()
A
40 14 59
get_shipping_details()
A
40 12 57
validate_variable_product()
A
45 11 38
get_item()
A
39 9 59
validate_add_to_cart()
A
45 9 39
validate_quantity()
A
51 8 25
get_items()
A
51 8 24
validate_product_id()
S
51 7 25
format_variation_data()
S
53 7 21
get_removed_items()
S
55 7 17
get_cross_sells()
S
47 5 33
get_cart_key()
S
57 6 16
has_enough_stock()
S
57 6 14
get_cart_template()
S
45 4 40
coupon_html()
S
56 5 17
validate_item_quantity()
S
55 5 17
get_variable_product_attributes()
S
58 5 14
print_notices()
S
59 4 14
validate_product_for_cart()
S
60 4 12
get_customer_fields()
S
60 4 12
get_cart()
S
60 4 12
get_variation_id_from_variation_data()
S
59 3 13
get_fees()
S
60 3 13
add_cart_item()
S
52 2 26
maybe_return_notices()
S
65 3 9
clean_meta_data()
S
63 3 10
is_completely_empty()
S
70 3 6
get_cart_instance()
S
67 3 7
convert_notices_to_exceptions()
S
63 3 10
get_collection_params()
S
52 1 28
get_tax_lines()
S
63 2 11
prepare_item()
S
60 1 15
get_product_slug()
S
64 2 10
get_cart_item()
S
73 2 4
throw_missing_item_key()
S
64 2 9
get_product_quantity_in_cart()
S
70 2 6
get_cart_items()
S
78 2 3
register_routes()
S
60 1 15
fee_html()
S
73 2 4
get_store_currency()
S
75 1 4
cache_cart_item()
S
75 1 4
throw_product_not_purchasable()
S
66 1 8
prepare_money_response()
S
74 1 4
get_remaining_stock_for_product()
S
69 1 6
calculate_totals()
S
75 1 5
filter_request_data()
S
79 1 3
get_removed_cart_contents_count()
S
78 1 3