EmailDatatable   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
eloc 12
dl 0
loc 18
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 16 1
1
<?php namespace Distilleries\Expendable\Http\Datatables\Email;
2
3
use Distilleries\Expendable\Http\Datatables\BaseDatatable;
4
use Distilleries\Expendable\Helpers\StaticLabel;
5
6
class EmailDatatable extends BaseDatatable {
7
8
    public function build()
9
    {
10
        $this->add('id');
11
        $this->add('libelle', null, trans('expendable::datatable.subject'));
0 ignored issues
show
Bug introduced by
It seems like trans('expendable::datatable.subject') 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

11
        $this->add('libelle', null, /** @scrutinizer ignore-type */ trans('expendable::datatable.subject'));
Loading history...
12
        $this->add('body_type', function($model)
13
        {
14
            return StaticLabel::bodyType($model->body_type);
15
        },trans('expendable::datatable.type'));
16
        $this->add('action', function($model)
17
        {
18
            return StaticLabel::mailActions($model->action);
19
        });
20
        $this->add('cc');
21
        $this->add('bcc');
22
        $this->addTranslationAction();
23
        $this->addDefaultAction();
24
    }
25
}