@@ 173-182 (lines=10) @@ | ||
170 | * @return string|int|bool|null |
|
171 | * @throws ParameterNotFoundException |
|
172 | */ |
|
173 | private function resolveEnvironmentValue($key) |
|
174 | { |
|
175 | $environmentKey = strtoupper(str_replace('.', '_', $key)); |
|
176 | $value = env($environmentKey, $this->defaultValue); |
|
177 | if ($this->defaultValue !== $value) { |
|
178 | return $value; |
|
179 | } |
|
180 | ||
181 | throw new ParameterNotFoundException(sprintf('No parameter "%s" found', $key)); |
|
182 | } |
|
183 | } |
|
184 |
@@ 133-142 (lines=10) @@ | ||
130 | * @return string|int|bool|null |
|
131 | * @throws ParameterNotFoundException |
|
132 | */ |
|
133 | private function resolveEnvironmentValue($key) |
|
134 | { |
|
135 | $environmentKey = strtoupper(str_replace('.', '_', $key)); |
|
136 | $value = env($environmentKey, $this->defaultValue); |
|
137 | if ($this->defaultValue !== $value) { |
|
138 | return $value; |
|
139 | } |
|
140 | ||
141 | throw new ParameterNotFoundException(sprintf('No parameter "%s" found', $key)); |
|
142 | } |
|
143 | } |
|
144 |