-
Home
-
Headless eCommerce API for Developers – CoCart
-
4.0.2
-
Code
-
Classes
- WC_REST_Cart_Controller
| Total Complexity |
67 |
| Dependencies |
3 |
| Dependents |
0 |
| Total lines |
517 |
| Lines of code |
300 |
| Logical lines of code |
128 |
| Comment lines |
173 |
| Methods |
14 |
| Properties |
2 |
Methods 14
| Method |
Rating |
Maintainability
|
Complexity
|
Lines of code
|
| add_to_cart() |
B |
40 |
21 |
53 |
| update_item() |
A |
47 |
12 |
32 |
| register_routes() |
S |
36 |
1 |
119 |
| get_cart() |
S |
55 |
5 |
17 |
| has_enough_stock() |
S |
61 |
5 |
10 |
| remove_item() |
S |
60 |
4 |
12 |
| restore_item() |
S |
60 |
4 |
12 |
| get_cart_contents_count() |
S |
64 |
4 |
8 |
| validate_product_id() |
S |
65 |
3 |
8 |
| clear_cart() |
S |
64 |
2 |
9 |
| validate_quantity() |
S |
71 |
2 |
5 |
| calculate_totals() |
S |
67 |
2 |
7 |
| validate_product() |
S |
77 |
1 |
4 |
| get_totals() |
S |
77 |
1 |
4 |