Code Duplication    Length = 7-7 lines in 2 locations

DoctrineBundle.php 2 locations

@@ 103-109 (lines=7) @@
100
        }
101
102
        // Clear all entity managers to clear references to entities for GC
103
        if ($this->container->hasParameter('doctrine.entity_managers')) {
104
            foreach ($this->container->getParameter('doctrine.entity_managers') as $id) {
105
                if (! method_exists($this->container, 'initialized') || $this->container->initialized($id)) {
106
                    $this->container->get($id)->clear();
107
                }
108
            }
109
        }
110
111
        // Close all connections to avoid reaching too many connections in the process when booting again later (tests)
112
        if ($this->container->hasParameter('doctrine.connections')) {
@@ 112-118 (lines=7) @@
109
        }
110
111
        // Close all connections to avoid reaching too many connections in the process when booting again later (tests)
112
        if ($this->container->hasParameter('doctrine.connections')) {
113
            foreach ($this->container->getParameter('doctrine.connections') as $id) {
114
                if (! method_exists($this->container, 'initialized') || $this->container->initialized($id)) {
115
                    $this->container->get($id)->close();
116
                }
117
            }
118
        }
119
    }
120
121
    /**