RoleDatatable::build()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php namespace Distilleries\Expendable\Http\Datatables\Role;
2
3
use Distilleries\Expendable\Http\Datatables\BaseDatatable;
4
5
class RoleDatatable 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('libelle', null, trans('expendable::datatable.libelle'))
12 2
            ->add('initials', null, trans('expendable::datatable.initials'));
13
14 2
        $this->addDefaultAction();
15
16
    }
17
}