protected function validateType(mixed
$value) { } protected function finalizeValue(mixed
$value): mixed
{ // deny environment variables only when using custom validators
// this avoids ever passing an empty value to final validation closures
if (!
$this->allowEmptyValue &&
$this->
isHandlingPlaceholder() &&
$this->finalValidationClosures
) { $e =
new InvalidConfigurationException(sprintf('The path "%s" cannot contain an environment variable when empty values are not allowed by definition and are validated.',
$this->
getPath()));
if ($hint =
$this->
getInfo()) { $e->
addHint($hint);
} $e->
setPath($this->
getPath());
throw $e;
} if (!
$this->allowEmptyValue &&
$this->
isValueEmpty($value)) { $ex =
new InvalidConfigurationException(sprintf('The path "%s" cannot contain an empty value, but got %s.',
$this->
getPath(),
json_encode($value)));
if ($hint =
$this->
getInfo()) { $ex->
addHint($hint);
}