| Conditions | 2 |
| Paths | 6 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 13 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php namespace Bedard\Shop\Controllers; |
||
| 45 | View Code Duplication | public function validate() |
|
| 46 | { |
||
| 47 | try { |
||
| 48 | $data = input('option'); |
||
| 49 | $option = Option::with('values')->findOrNew($data['id']); |
||
| 50 | $option->fill($data); |
||
| 51 | $option->validate(); |
||
| 52 | |||
| 53 | return Response::make($option, 200); |
||
| 54 | } catch (Exception $e) { |
||
| 55 | return Response::make($e->getMessage(), 500); |
||
| 56 | } |
||
| 57 | } |
||
| 58 | } |
||
| 59 |