Completed
Push — master ( 188ffb...31684b )
by Maxime
02:48
created

RoleDatatable   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 76.92 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 0
dl 10
loc 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 10 10 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php namespace Distilleries\Expendable\Http\Datatables\Role;
2
3
use Distilleries\Expendable\Http\Datatables\BaseDatatable;
4
5
class RoleDatatable extends BaseDatatable
6
{
7 View Code Duplication
    public function build()
8
    {
9
        $this
10
            ->add('id', null, trans('expendable::datatable.id'))
11
            ->add('libelle', null, trans('expendable::datatable.libelle'))
12
            ->add('initials', null, trans('expendable::datatable.initials'));
13
14
        $this->addDefaultAction();
15
16
    }
17
}