Test Failed
Push — master ( 135f34...8b25c6 )
by Chris
33:49
created

HasSettingsFieldDataTrait   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 9
eloc 20
dl 0
loc 65
rs 10
c 0
b 0
f 0

9 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 3 1
A getSection() 0 3 1
A getTitle() 0 3 1
A getArgs() 0 3 1
A getInput() 0 3 1
A getInputId() 0 3 1
A getFormatter() 0 3 1
A getSetting() 0 3 1
A getPage() 0 3 1
1
<?php
2
3
namespace Leonidas\Library\Admin\Component\SettingsField\Traits;
4
5
use WebTheory\HttpPolicy\ServerRequestPolicyInterface;
6
use WebTheory\Saveyour\Contracts\Field\FormFieldInterface;
7
use WebTheory\Saveyour\Contracts\Formatting\DataFormatterInterface;
8
9
trait HasSettingsFieldDataTrait
10
{
11
    protected string $setting;
12
13
    protected string $id;
14
15
    protected string $title;
16
17
    protected string $page;
18
19
    protected string $section;
20
21
    protected string $inputId;
22
23
    protected array $args = [];
24
25
    protected ?FormFieldInterface $input = null;
26
27
    protected ?DataFormatterInterface $formatter = null;
28
29
    protected ?ServerRequestPolicyInterface $policy = null;
30
31
    public function getSetting(): string
32
    {
33
        return $this->setting;
34
    }
35
36
    public function getId(): string
37
    {
38
        return $this->id;
39
    }
40
41
    public function getTitle(): string
42
    {
43
        return $this->title;
44
    }
45
46
    public function getPage(): string
47
    {
48
        return $this->page;
49
    }
50
51
    public function getSection(): string
52
    {
53
        return $this->section;
54
    }
55
56
    public function getArgs(): array
57
    {
58
        return $this->args;
59
    }
60
61
    public function getInputId(): string
62
    {
63
        return $this->inputId;
64
    }
65
66
    public function getInput(): ?FormFieldInterface
67
    {
68
        return $this->input;
69
    }
70
71
    public function getFormatter(): ?DataFormatterInterface
72
    {
73
        return $this->formatter;
74
    }
75
}
76