Code Duplication    Length = 10-10 lines in 2 locations

src/DependencyInjection/Resolver/BaseParametersResolver.php 1 location

@@ 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

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