CoCart_REST_Cart_V2_Controller D

Total Complexity 253
Dependencies 13
Dependents 3
Total lines 3,319
Lines of code 2,026
Logical lines of code 548
Comment lines 1,070
Methods 50
Properties 3

Methods 50

Method Rating Maintainability Complexity Lines of code
get_public_item_schema()
D
9
2 1,003
get_cart_template_limited()
D
29
37 123
return_cart_contents()
B
40 16 52
validate_product()
A
40 14 59
validate_variable_product()
A
42 13 48
get_shipping_details()
A
40 12 57
get_item()
A
39 9 60
validate_add_to_cart()
A
43 9 50
validate_quantity()
A
48 8 33
get_items()
A
50 8 27
validate_product_id()
S
51 7 25
format_variation_data()
S
53 7 21
get_removed_items()
S
55 7 17
get_cart_template()
S
44 5 40
has_enough_stock()
S
54 6 19
get_cross_sells()
S
47 5 33
get_cart_key()
S
57 6 16
get_variable_product_attributes()
S
58 6 14
validate_item_quantity()
S
54 5 20
coupon_html()
S
56 5 17
print_notices()
S
58 5 14
validate_product_for_cart()
S
60 5 12
get_cart()
S
60 4 12
get_customer_fields()
S
60 4 12
get_variation_id_from_variation_data()
S
59 3 13
get_fees()
S
60 3 13
convert_notices_to_exceptions()
S
62 3 11
add_cart_item()
S
52 2 26
get_collection_params()
S
50 1 34
is_completely_empty()
S
70 3 6
get_cart_instance()
S
67 3 7
clean_meta_data()
S
63 3 10
maybe_return_notices()
S
65 3 9
get_tax_lines()
S
63 2 11
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
72 2 5
get_cart_items()
S
78 2 3
register_routes()
S
60 1 15
prepare_item()
S
60 1 15
fee_html()
S
73 2 4
get_removed_cart_contents_count()
S
78 1 3
filter_request_data()
S
79 1 3
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
get_store_currency()
S
75 1 4