config->getAppValue(AppConstants::APP_ID, $key) ?: $default; } public function setStringSetting(string $key, string $value): string { return $this->config->getAppValue(AppConstants::APP_ID, $key, $value); } public function getAll(): JsonSerializable { return [ AppSettings::FOLDER_VARIANT => $this->getStringSetting(AppSettings::FOLDER_VARIANT, 'pride'), AppSettings::BUTTON_VARIANT => $this->getStringSetting(AppSettings::BUTTON_VARIANT, 'trans'), ] } public function set($folder, $button): JsonSerializable { $this->setStringSetting(AppSettings::FOLDER_VARIANT, $folder); $this->setStringSetting(AppSettings::BUTTON_VARIANT, $button); return $this->getAll(); } public function jsonSerialize(): array { return $this->getAll(); } }