| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 18 | public function isValidModel(Model $model) |
||
| 19 | { |
||
| 20 | if (!empty(config('increment-decrement.order_column_name'))) { |
||
| 21 | if (Schema::hasColumn($model->getTable(), config('increment-decrement.order_column_name'))) { |
||
| 22 | return true; |
||
| 23 | } |
||
| 24 | |||
| 25 | throw Exceptions::columnNotFound($model); |
||
| 26 | } |
||
| 27 | |||
| 28 | throw Exceptions::columnNotSet(); |
||
| 29 | } |
||
| 30 | |||
| 51 |