Code Duplication    Length = 7-7 lines in 2 locations

DoctrineBundle.php 2 locations

@@ 120-126 (lines=7) @@
117
        }
118
119
        // Clear all entity managers to clear references to entities for GC
120
        if ($this->container->hasParameter('doctrine.entity_managers')) {
121
            foreach ($this->container->getParameter('doctrine.entity_managers') as $id) {
122
                if (!$this->container instanceof IntrospectableContainerInterface || $this->container->initialized($id)) {
123
                    $this->container->get($id)->clear();
124
                }
125
            }
126
        }
127
128
        // Close all connections to avoid reaching too many connections in the process when booting again later (tests)
129
        if ($this->container->hasParameter('doctrine.connections')) {
@@ 129-135 (lines=7) @@
126
        }
127
128
        // Close all connections to avoid reaching too many connections in the process when booting again later (tests)
129
        if ($this->container->hasParameter('doctrine.connections')) {
130
            foreach ($this->container->getParameter('doctrine.connections') as $id) {
131
                if (!$this->container instanceof IntrospectableContainerInterface || $this->container->initialized($id)) {
132
                    $this->container->get($id)->close();
133
                }
134
            }
135
        }
136
    }
137
138
    /**