Code Duplication    Length = 14-14 lines in 2 locations

lib/Drupal/Core/DependencyInjection/YamlFileLoader.php 1 location

@@ 109-122 (lines=14) @@
106
     * @param array  $content
107
     * @param string $file
108
     */
109
    private function parseDefinitions($content, $file)
110
    {
111
        if (!isset($content['services'])) {
112
            return;
113
        }
114
115
        if (!is_array($content['services'])) {
116
            throw new InvalidArgumentException(sprintf('The "services" key should contain an array in %s. Check your YAML syntax.', $file));
117
        }
118
119
        foreach ($content['services'] as $id => $service) {
120
            $this->parseDefinition($id, $service, $file);
121
        }
122
    }
123
124
    /**
125
     * Parses a definition.

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php 1 location

@@ 113-126 (lines=14) @@
110
     * @param array  $content
111
     * @param string $file
112
     */
113
    private function parseDefinitions($content, $file)
114
    {
115
        if (!isset($content['services'])) {
116
            return;
117
        }
118
119
        if (!is_array($content['services'])) {
120
            throw new InvalidArgumentException(sprintf('The "services" key should contain an array in %s. Check your YAML syntax.', $file));
121
        }
122
123
        foreach ($content['services'] as $id => $service) {
124
            $this->parseDefinition($id, $service, $file);
125
        }
126
    }
127
128
    /**
129
     * Parses a definition.