CrudAbstract   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 31
c 0
b 0
f 0
ccs 0
cts 15
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A make() 0 4 1
A label() 0 6 1
1
<?php
2
3
namespace Webfactor\Laravel\Backpack\FluentSyntax\Contracts;
4
5
class CrudAbstract implements CrudInterface
6
{
7
    protected $options = [];
8
9
    protected $type = 'text';
10
11
    public function __construct(string $name)
12
    {
13
        $this->options['name'] = $name;
14
        $this->options['label'] = $name;
15
        $this->options['type'] = $this->type;
16
    }
17
18
    public function make(): array
19
    {
20
        return $this->options;
21
    }
22
23
    /*
24
    |--------------------------------------------------------------------------
25
    | Methods available for all Field and Column Types
26
    |--------------------------------------------------------------------------
27
    */
28
29
    public function label(string $label)
30
    {
31
        $this->options['label'] = $label;
32
33
        return $this;
34
    }
35
}
36