| Total Complexity | 10 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class Checkbox extends AbstractField |
||
|
|
|||
| 11 | { |
||
| 12 | use Orderable; |
||
| 13 | use Nullable; |
||
| 14 | use Inline; |
||
| 15 | |||
| 16 | 4 | public function value(Request $request) |
|
| 17 | { |
||
| 18 | 4 | $value = parent::value($request); |
|
| 19 | 4 | if (is_null($value) && $this->isNullable()) { |
|
| 20 | 1 | return null; |
|
| 21 | } |
||
| 22 | |||
| 23 | 4 | return (bool) $value; |
|
| 24 | } |
||
| 25 | |||
| 26 | 1 | public function getListView($model) |
|
| 27 | { |
||
| 28 | 1 | return view('jarboe::crud.fields.checkbox.list', [ |
|
| 29 | 1 | 'model' => $model, |
|
| 30 | 1 | 'field' => $this, |
|
| 31 | ]); |
||
| 32 | } |
||
| 33 | |||
| 34 | 1 | public function getEditFormView($model) |
|
| 35 | { |
||
| 36 | 1 | $template = $this->isReadonly() ? 'readonly' : 'edit'; |
|
| 37 | |||
| 38 | 1 | return view('jarboe::crud.fields.checkbox.'. $template, [ |
|
| 39 | 1 | 'model' => $model, |
|
| 40 | 1 | 'field' => $this, |
|
| 41 | ]); |
||
| 42 | } |
||
| 43 | |||
| 44 | 1 | public function getCreateFormView() |
|
| 45 | { |
||
| 46 | 1 | return view('jarboe::crud.fields.checkbox.create', [ |
|
| 47 | 1 | 'field' => $this, |
|
| 48 | ]); |
||
| 49 | } |
||
| 50 | |||
| 51 | 2 | public function oldOrAttribute($model, $locale = null) |
|
| 59 | } |
||
| 60 | } |
||
| 61 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths