Code Duplication    Length = 17-17 lines in 2 locations

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

@@ 231-247 (lines=17) @@
228
            }
229
        }
230
231
        if (isset($service['calls'])) {
232
            if (!is_array($service['calls'])) {
233
                throw new InvalidArgumentException(sprintf('Parameter "calls" must be an array for service "%s" in %s. Check your YAML syntax.', $id, $file));
234
            }
235
236
            foreach ($service['calls'] as $call) {
237
                if (isset($call['method'])) {
238
                    $method = $call['method'];
239
                    $args = isset($call['arguments']) ? $this->resolveServices($call['arguments']) : array();
240
                } else {
241
                    $method = $call[0];
242
                    $args = isset($call[1]) ? $this->resolveServices($call[1]) : array();
243
                }
244
245
                $definition->addMethodCall($method, $args);
246
            }
247
        }
248
249
        if (isset($service['tags'])) {
250
            if (!is_array($service['tags'])) {

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

@@ 239-255 (lines=17) @@
236
            }
237
        }
238
239
        if (isset($service['calls'])) {
240
            if (!is_array($service['calls'])) {
241
                throw new InvalidArgumentException(sprintf('Parameter "calls" must be an array for service "%s" in %s. Check your YAML syntax.', $id, $file));
242
            }
243
244
            foreach ($service['calls'] as $call) {
245
                if (isset($call['method'])) {
246
                    $method = $call['method'];
247
                    $args = isset($call['arguments']) ? $this->resolveServices($call['arguments']) : array();
248
                } else {
249
                    $method = $call[0];
250
                    $args = isset($call[1]) ? $this->resolveServices($call[1]) : array();
251
                }
252
253
                $definition->addMethodCall($method, $args);
254
            }
255
        }
256
257
        if (isset($service['tags'])) {
258
            if (!is_array($service['tags'])) {