| Conditions | 2 |
| Paths | 6 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 13 |
| Ratio | 100 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace Bedard\Shop\Controllers; |
||
| 40 | View Code Duplication | public function validate() |
|
| 41 | { |
||
| 42 | try { |
||
| 43 | $data = input('inventory'); |
||
| 44 | $inventory = Inventory::findOrNew($data['id']); |
||
| 45 | $inventory->fill($data); |
||
| 46 | $inventory->validate(); |
||
| 47 | |||
| 48 | return Response::make($inventory, 200); |
||
| 49 | } catch (Exception $e) { |
||
| 50 | return Response::make($e->getMessage(), 500); |
||
| 51 | } |
||
| 52 | } |
||
| 53 | } |
||
| 54 |