DummyField::shouldSkip()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
ccs 2
cts 2
cp 1
crap 1
1
<?php
2
3
namespace Yaro\Jarboe\Table\Fields\Markup;
4
5
use Illuminate\Http\Request;
6
use Yaro\Jarboe\Table\Fields\AbstractField;
0 ignored issues
show
Bug introduced by
The type Yaro\Jarboe\Table\Fields\AbstractField was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
8
class DummyField extends AbstractField
9
{
10
    protected $hidden = [
11
        'list'   => true,
12
        'edit'   => false,
13
        'create' => false,
14
    ];
15
16 1
    public function shouldSkip(Request $request)
17
    {
18 1
        return true;
19
    }
20
21 1
    public function getListView($model)
22
    {
23 1
        return view('jarboe::crud.fields.markup.dummy.list', [
24 1
            'model' => $model,
25 1
            'field' => $this,
26
        ]);
27
    }
28
29 1
    public function getEditFormView($model)
30
    {
31 1
        $template = $this->isReadonly() ? 'readonly' : 'edit';
32
33 1
        return view('jarboe::crud.fields.markup.dummy.'. $template, [
34 1
            'model' => $model,
35 1
            'field' => $this,
36
        ]);
37
    }
38
39 1
    public function getCreateFormView()
40
    {
41 1
        return view('jarboe::crud.fields.markup.dummy.create', [
42 1
            'field' => $this,
43
        ]);
44
    }
45
}
46