diff --git a/Configurability/ConfigurableServiceHelper.php b/Configurability/ConfigurableServiceHelper.php index 560f846a..e19b2add 100644 --- a/Configurability/ConfigurableServiceHelper.php +++ b/Configurability/ConfigurableServiceHelper.php @@ -30,7 +30,7 @@ class ConfigurableServiceHelper const CONF_MESSAGE = 'message'; const CONF_RECOVERABLE = 'recoverable'; - const CONF_NO_RESULTS = 'noResults'; + const CONF_NO_RESULTS = 'no_results'; const STEP_DEFINE = 'define'; const STEP_VALIDATE = 'validate'; @@ -96,11 +96,13 @@ public function createContext(array $options, MessageInterface $message = null, return $context; } - public function resolveArray($input, &$context){ + public function resolveArray($input, &$context) + { $output = []; - foreach($input as $key => $value){ - $output[$key] = $this->resolve($value,$context); + foreach ($input as $key => $value) { + $output[$key] = $this->resolve($value, $context); } + return $output; } @@ -163,6 +165,7 @@ public function executeStep($stepAction, &$stepActionParams, &$options, array &$ break; case self::STEP_VALIDATE: $this->validate($stepActionParams, $context); + return true; break; default: @@ -196,7 +199,6 @@ public function define(array $definitions, array &$context) public function validate(array $stepConfig, array &$context) { - $config = $this->validateResolver->resolve($stepConfig); $rule = $config[self::CONF_RULE]; @@ -206,7 +208,7 @@ public function validate(array $stepConfig, array &$context) $display_message = $config[self::CONF_DISPLAY_MESSAGE]; $evaluation = $this->resolve($rule, $context); - if ($evaluation !== true) { + if (true !== $evaluation) { $message = $this->resolve($message, $context); if ($no_results) { throw new NoResultsException($message);