Code Duplication    Length = 3-7 lines in 2 locations

lib/Drupal/Component/DependencyInjection/Container.php 1 location

@@ 146-148 (lines=3) @@
143
    }
144
145
    // Re-use shared service instance if it exists.
146
    if (isset($this->services[$id]) || ($invalid_behavior === ContainerInterface::NULL_ON_INVALID_REFERENCE && array_key_exists($id, $this->services))) {
147
      return $this->services[$id];
148
    }
149
150
    if (isset($this->loading[$id])) {
151
      throw new ServiceCircularReferenceException($id, array_keys($this->loading));

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

@@ 241-247 (lines=7) @@
238
    public function has($id)
239
    {
240
        for ($i = 2;;) {
241
            if ('service_container' === $id
242
                || isset($this->aliases[$id])
243
                || isset($this->services[$id])
244
                || array_key_exists($id, $this->services)
245
            ) {
246
                return true;
247
            }
248
            if (--$i && $id !== $lcId = strtolower($id)) {
249
                $id = $lcId;
250
            } else {