Implemented getChoices and getValues from Doctrine ENUM on the right way

This commit is contained in:
Kevin Frantz
2019-02-25 13:32:37 +01:00
parent 0bf7554afb
commit 90df65828c
21 changed files with 29 additions and 29 deletions

View File

@@ -47,8 +47,8 @@ final class RightLayerCombinationService implements RightLayerCombinationService
private function setCombination(): void
{
foreach (LayerType::getChoices() as $layer) {
foreach (CRUDType::getChoices() as $crud) {
foreach (LayerType::getValues() as $layer) {
foreach (CRUDType::getValues() as $crud) {
if (!array_key_exists($layer, $this->possibleCombinations)) {
$this->possibleCombinations[$layer] = [];
}

View File

@@ -15,7 +15,7 @@ interface RightLayerCombinationServiceInterface
/**
* For layer parameter see:.
*
* @see LayerType::getChoices()
* @see LayerType::getValues()
*
* @param string $layer
*
@@ -26,7 +26,7 @@ interface RightLayerCombinationServiceInterface
/**
* For layer parameter see:.
*
* @see CRUDType::getChoices()
* @see CRUDType::getValues()
*
* @param string $crud
*

View File

@@ -44,7 +44,7 @@ final class ActionTemplateDataStoreService implements ActionTemplateDataStoreSer
*/
private function isValidActionType(string $actionType): bool
{
if (in_array($actionType, ActionType::getChoices())) {
if (in_array($actionType, ActionType::getValues())) {
return true;
}
throw new NoValidChoiceException("The action type <<$actionType>> is not defined and not valid!");