WidgetTableBuilder
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 50
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 0
lcom 0
cbo 0
dl 50
loc 50
c 1
b 0
f 0

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 Anomaly\DashboardModule\Widget\Table;
2
3
use Anomaly\Streams\Platform\Ui\Table\TableBuilder;
4
5
/**
6
 * Class WidgetTableBuilder
7
 *
8
 * @link          http://pyrocms.com/
9
 * @author        PyroCMS, Inc. <[email protected]>
10
 * @author        Ryan Thompson <[email protected]>
11
 */
12 View Code Duplication
class WidgetTableBuilder extends TableBuilder
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
13
{
14
15
    /**
16
     * The table filters.
17
     *
18
     * @var array|string
19
     */
20
    protected $filters = [
21
        'search' => [
22
            'fields' => [
23
                'title',
24
                'description',
25
            ],
26
        ],
27
        'dashboard',
28
        'extension',
29
    ];
30
31
    /**
32
     * The table columns.
33
     *
34
     * @var array|string
35
     */
36
    protected $columns = [
37
        'title',
38
        'description',
39
        'dashboard',
40
        'entry.extension.title',
41
    ];
42
43
    /**
44
     * The table buttons.
45
     *
46
     * @var array|string
47
     */
48
    protected $buttons = [
49
        'edit',
50
    ];
51
52
    /**
53
     * The table actions.
54
     *
55
     * @var array|string
56
     */
57
    protected $actions = [
58
        'delete',
59
    ];
60
61
}
62