Code Duplication    Length = 5-5 lines in 2 locations

src/DependencyInjection/ContainerBuilder.php 1 location

@@ 77-81 (lines=5) @@
74
    // Setup the tags structure.
75
    foreach ($container_definition['services'] as $service => $definition) {
76
      if (isset($definition['tags'])) {
77
        foreach ($definition['tags'] as $tag) {
78
          $tag_name = $tag['name'];
79
          unset($tag['name']);
80
          $container_definition['tags'][$tag_name][$service][] = $tag;
81
        }
82
      }
83
    }
84

src/ServiceContainer/ServiceProvider/ServiceContainerServiceProvider.php 1 location

@@ 330-334 (lines=5) @@
327
      $container_definition['services'][$name] = $this->getPluginManagerDefinition($name, $discovery_class, $plugin_manager);
328
      $tags = $container_definition['services'][$name]['tags'];
329
330
      foreach ($tags as $tag) {
331
        $tag_name = $tag['name'];
332
        unset($tag['name']);
333
        $container_definition['tags'][$tag_name][$name][] = $tag;
334
      }
335
    }
336
  }
337