CrudAbstract::label()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
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