| Total Complexity | 8 |
| Total Lines | 59 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 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 |
||
| 66 | } |
||
| 67 | } |
||
| 68 |