Passed
Push — master ( 919d61...4a3edd )
by Thomas
03:54 queued 02:09
created

SelectColumn::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 8
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 8
loc 8
c 0
b 0
f 0
ccs 0
cts 7
cp 0
rs 9.4285
cc 1
eloc 5
nc 1
nop 4
crap 2
1
<?php
2
3
namespace Webfactor\Laravel\Backpack\FluentSyntax\Columns;
4
5
use Webfactor\Laravel\Backpack\FluentSyntax\Contracts\CrudColumnAbstract;
6
use Webfactor\Laravel\Backpack\FluentSyntax\Traits\Prefixable;
7
use Webfactor\Laravel\Backpack\FluentSyntax\Traits\Relationable;
8
9 View Code Duplication
class SelectColumn extends CrudColumnAbstract
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...
10
{
11
    protected $type = 'select';
12
13
    public function __construct(string $name, string $model, string $relation, string $attribute)
14
    {
15
        parent::__construct($name);
16
17
        $this->options['model'] = $model;
18
        $this->options['entity'] = $relation;
19
        $this->options['attribute'] = $attribute;
20
    }
21
}
22