ServiceDatatable   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 5
dl 0
loc 9
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 7 1
1
<?php namespace Distilleries\Expendable\Http\Datatables\Service;
2
3
use Distilleries\Expendable\Http\Datatables\BaseDatatable;
4
5
class ServiceDatatable extends BaseDatatable {
6
7 2
    public function build()
8
    {
9
        $this
10 2
            ->add('id', null, trans('expendable::datatable.id'))
0 ignored issues
show
Bug introduced by
It seems like trans('expendable::datatable.id') can also be of type array; however, parameter $translation of Distilleries\DatatableBu...loquentDatatable::add() does only seem to accept Symfony\Component\Transl...nslatorInterface|string, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

10
            ->add('id', null, /** @scrutinizer ignore-type */ trans('expendable::datatable.id'))
Loading history...
11 2
            ->add('action', null, trans('expendable::datatable.action'));
12
13 2
        $this->addDefaultAction();
14
15
    }
16
}