Test Failed
Push — master ( 2c2c87...ed1c51 )
by Chris
25:05 queued 37s
created

HasSettingDataTrait::getDescription()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Leonidas\Library\Admin\Setting\Traits;
4
5
use Leonidas\Contracts\Admin\Setting\SettingHandlerInterface;
6
7
trait HasSettingDataTrait
8
{
9
    protected string $optionGroup;
10
11
    protected string $optionName;
12
13
    protected ?string $type = 'string';
14
15
    protected ?string $description;
16
17
    protected ?SettingHandlerInterface $handler = null;
18
19
    protected mixed $defaultValue;
20
21
    /**
22
     * @var bool|array
23
     */
24
    protected $restSchema;
25
26
    protected ?array $extraArgs = null;
27
28
    public function getOptionGroup(): string
29
    {
30
        return $this->optionGroup;
31
    }
32
33
    public function getOptionName(): string
34
    {
35
        return $this->optionName;
36
    }
37
38
    public function getType(): ?string
39
    {
40
        return $this->type;
41
    }
42
43
    public function getDescription(): ?string
44
    {
45
        return $this->description;
46
    }
47
48
    public function getHandler(): ?SettingHandlerInterface
49
    {
50
        return $this->handler;
51
    }
52
53
    public function getRestSchema()
54
    {
55
        return $this->restSchema;
56
    }
57
58
    public function getDefaultValue()
59
    {
60
        return $this->defaultValue;
61
    }
62
63
    public function getExtraArgs(): ?array
64
    {
65
        return $this->extraArgs;
66
    }
67
}
68