Code Duplication    Length = 7-7 lines in 2 locations

DoctrineBundle.php 2 locations

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