Code Duplication    Length = 10-10 lines in 2 locations

src/DependencyInjection/Resolver/BuiltParameterResolver.php 1 location

@@ 128-137 (lines=10) @@
125
     * @return string|int|bool|null
126
     * @throws ParameterNotFoundException
127
     */
128
    private function resolveEnvironmentValue($key)
129
    {
130
        $environmentKey = strtoupper(str_replace('.', '_', $key));
131
        $value = env($environmentKey, $this->defaultValue);
132
        if ($this->defaultValue !== $value) {
133
            return $value;
134
        }
135
136
        throw new ParameterNotFoundException(sprintf('No parameter "%s" found', $key));
137
    }
138
}
139

src/DependencyInjection/Resolver/BaseParametersResolver.php 1 location

@@ 214-223 (lines=10) @@
211
     * @return string|int|bool|null
212
     * @throws ParameterNotFoundException
213
     */
214
    private function resolveEnvironmentValue($key)
215
    {
216
        $environmentKey = strtoupper(str_replace('.', '_', $key));
217
        $value = env($environmentKey, $this->defaultValue);
218
        if ($this->defaultValue !== $value) {
219
            return $value;
220
        }
221
222
        throw new ParameterNotFoundException(sprintf('No parameter "%s" found', $key));
223
    }
224
225
    /**
226
     * @return ExpressionLanguage