| Total Complexity | 9 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | class Number extends AbstractField |
||
|
|
|||
| 15 | { |
||
| 16 | use Orderable; |
||
| 17 | use Nullable; |
||
| 18 | use Tooltip; |
||
| 19 | use Clipboard; |
||
| 20 | use Inline; |
||
| 21 | use Placeholder; |
||
| 22 | use MinMaxStep; |
||
| 23 | |||
| 24 | 1 | public function value(Request $request) |
|
| 25 | { |
||
| 26 | 1 | $value = $request->get($this->name()); |
|
| 27 | 1 | if (!$value && $value !== "0" && $this->isNullable()) { |
|
| 28 | 1 | return null; |
|
| 29 | } |
||
| 30 | |||
| 31 | 1 | return is_null($value) ? 0 : (float) $value; |
|
| 32 | } |
||
| 33 | |||
| 34 | 1 | public function getListView($model) |
|
| 35 | { |
||
| 36 | 1 | return view('jarboe::crud.fields.number.list', [ |
|
| 37 | 1 | 'model' => $model, |
|
| 38 | 1 | 'field' => $this, |
|
| 39 | ]); |
||
| 40 | } |
||
| 41 | |||
| 42 | 1 | public function getEditFormView($model) |
|
| 49 | ]); |
||
| 50 | } |
||
| 51 | |||
| 52 | 1 | public function getCreateFormView() |
|
| 56 | ]); |
||
| 57 | } |
||
| 59 |
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