| 1 | <?php namespace Bedard\Shop\Api; |
||
| 8 | class Cart extends ApiController |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Add an inventory to the cart. |
||
| 12 | * |
||
| 13 | * @param CartRepository $repository |
||
| 14 | */ |
||
| 15 | public function add(CartRepository $repository) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Show the current cart. |
||
| 28 | * |
||
| 29 | * @param \Bedard\Shop\Repositories\CartRepository $repository |
||
| 30 | * @return \Bedard\Shop\Models\Cart |
||
| 31 | */ |
||
| 32 | public function show(CartRepository $repository) |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Create a new cart. |
||
| 46 | * |
||
| 47 | * @param \Bedard\Shop\Repositories\CartRepository $repository |
||
| 48 | * @return \Bedard\Shop\Models\Cart |
||
| 49 | */ |
||
| 50 | public function store(CartRepository $repository) |
||
| 61 | } |
||
| 62 |
This check looks for
tryblocks that have no statements or where all statements have been commented out. This may be the result of changes for debugging or the code may simply be obsolete.If there is nothing in the
trythen thecatchblock can never be executed either. Thus, thesetrystatements can be removed completely.