protected function resolveValueFromParameterBag(
        ParameterBag $parameterBag,
        string $delimiter,
        string $value
    ) {
        $trimmedValue = trim($value, $delimiter);

        if (
            ($delimiter . $trimmedValue . $delimiter === $value) &&
            $parameterBag->has($trimmedValue)
        ) {
            $value = $parameterBag->get($trimmedValue);
        }

        return $value;
    }