From 4d22a2d5448976e2cb1a440e90b2eaff29dcb02f Mon Sep 17 00:00:00 2001 From: marcelmanzel Date: Wed, 6 Dec 2023 16:32:01 +0100 Subject: [PATCH] OXDEV-7647: Move some exception-annotations to the original methods --- src/Setting/Infrastructure/ShopSettingRepository.php | 6 +++--- src/Setting/Infrastructure/ThemeSettingRepository.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Setting/Infrastructure/ShopSettingRepository.php b/src/Setting/Infrastructure/ShopSettingRepository.php index badb8f0..9ce3165 100644 --- a/src/Setting/Infrastructure/ShopSettingRepository.php +++ b/src/Setting/Infrastructure/ShopSettingRepository.php @@ -207,9 +207,6 @@ public function saveAssocCollectionSetting(string $name, array $value): void $this->saveAsType(FieldType::ASSOCIATIVE_ARRAY, $name, $value); } - /** - * @throws WrongSettingTypeException - */ private function saveAsType(string $type, string $name, mixed $value): void { $this->validateOriginalSettingType($name, $type); @@ -223,6 +220,9 @@ private function saveAsType(string $type, string $name, mixed $value): void $this->configurationSettingDao->save($setting); } + /** + * @throws WrongSettingTypeException + */ private function validateOriginalSettingType(string $originalSettingName, string $type): void { $originalSetting = $this->getShopSetting($originalSettingName); diff --git a/src/Setting/Infrastructure/ThemeSettingRepository.php b/src/Setting/Infrastructure/ThemeSettingRepository.php index f26a7f8..ca5a5d2 100644 --- a/src/Setting/Infrastructure/ThemeSettingRepository.php +++ b/src/Setting/Infrastructure/ThemeSettingRepository.php @@ -184,6 +184,9 @@ public function saveAssocCollectionSetting(string $name, array $value, string $t $this->saveSettingAsType(FieldType::ASSOCIATIVE_ARRAY, $name, $themeId, $value); } + /** + * @throws NoSettingsFoundForThemeException + */ protected function getSettingValue(string $name, string $fieldType, string $theme): mixed { $queryBuilder = $this->queryBuilderFactory->create(); @@ -240,9 +243,6 @@ protected function saveSettingValue(string $name, string $themeId, string $value ); } - /** - * @throws NoSettingsFoundForThemeException - */ protected function saveSettingAsType(string $settingType, string $name, string $themeId, mixed $value): void { $this->getSettingValue($name, $settingType, $themeId);