Code Duplication    Length = 5-5 lines in 2 locations

src/FileLoader/Parser/Yaml/ImportsParser.php 1 location

@@ 41-45 (lines=5) @@
38
            return [];
39
        }
40
41
        if (false === is_array($content['imports'])) {
42
            throw new InvalidArgumentException(
43
                sprintf('The "imports" key should contain an array in %s. Check your YAML syntax.', $fileName)
44
            );
45
        }
46
47
        $imports = [];
48
        foreach ($content['imports'] as $importStatement) {

src/FileLoader/Parser/Yaml/ParametersParser.php 1 location

@@ 50-54 (lines=5) @@
47
            return;
48
        }
49
50
        if (false === is_array($content['parameters'])) {
51
            throw new InvalidArgumentException(
52
                sprintf('The "parameters" key should contain an array in %s. Check your YAML syntax.', $fileName)
53
            );
54
        }
55
56
        foreach ($content['parameters'] as $key => $value) {
57
            $container->setParameter(strtolower($key), $this->serviceResolver->resolve($value));