Total Complexity | 17 |
Total Lines | 137 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
5 | class BaseConfig implements BaseConfigInterface |
||
6 | { |
||
7 | private $id; |
||
8 | |||
9 | private $value; |
||
10 | |||
11 | private bool $locked = false; |
||
12 | |||
13 | private $type; |
||
14 | |||
15 | private bool $frontend = false; |
||
16 | |||
17 | private $module; |
||
18 | |||
19 | private $label; |
||
20 | |||
21 | private $isGlobal = true; |
||
22 | |||
23 | public function __construct(string $id) |
||
24 | { |
||
25 | $this->id = $id; |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * @return mixed |
||
30 | */ |
||
31 | public function getId() |
||
32 | { |
||
33 | return $this->id; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @param string $id |
||
38 | */ |
||
39 | public function setId($id): self |
||
40 | { |
||
41 | $this->id = $id; |
||
42 | |||
43 | return $this; |
||
44 | } |
||
45 | |||
46 | |||
47 | public function getValue(): mixed |
||
48 | { |
||
49 | return $this->value; |
||
50 | } |
||
51 | |||
52 | public function setValue(?string $value): self |
||
53 | { |
||
54 | $this->value = $value; |
||
55 | |||
56 | return $this; |
||
57 | } |
||
58 | |||
59 | |||
60 | public function getLocked(): bool |
||
61 | { |
||
62 | return $this->locked; |
||
63 | } |
||
64 | |||
65 | public function setLocked(bool $locked): self |
||
70 | } |
||
71 | |||
72 | public function getType(): ?string |
||
73 | { |
||
74 | return $this->type; |
||
75 | } |
||
76 | |||
77 | public function setType(?string $type): self |
||
78 | { |
||
79 | $this->type = $type; |
||
80 | |||
81 | return $this; |
||
82 | } |
||
83 | |||
84 | |||
85 | public function isFrontend(): bool |
||
88 | } |
||
89 | |||
90 | |||
91 | public function setFrontend(bool $frontend): self |
||
92 | { |
||
93 | $this->frontend = $frontend; |
||
94 | |||
95 | return $this; |
||
96 | } |
||
97 | |||
98 | |||
99 | public function getModule(): ?string |
||
100 | { |
||
101 | return $this->module; |
||
102 | } |
||
103 | |||
104 | /** |
||
105 | * @param mixed $module |
||
106 | */ |
||
107 | public function setModule(?string $module): self |
||
112 | } |
||
113 | |||
114 | /** |
||
115 | * @return mixed |
||
116 | */ |
||
117 | public function getLabel(): ?string |
||
118 | { |
||
119 | return $this->label; |
||
120 | } |
||
121 | |||
122 | |||
123 | public function setLabel(?string $label): self |
||
124 | { |
||
125 | $this->label = $label; |
||
126 | |||
127 | return $this; |
||
128 | } |
||
129 | |||
130 | |||
131 | public function getIsGlobal(): bool |
||
134 | } |
||
135 | |||
136 | |||
137 | public function setIsGlobal(bool $isGlobal): self |
||
142 | } |
||
143 | } |
||
144 |