Skip to content

Commit

Permalink
OXDEV-7647: Move some exception-annotations to the original methods
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelOxid committed Dec 6, 2023
1 parent e78f9d0 commit 4d22a2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Setting/Infrastructure/ShopSettingRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/Setting/Infrastructure/ThemeSettingRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 4d22a2d

Please sign in to comment.