Code Duplication    Length = 7-7 lines in 2 locations

DependencyInjection/DoctrineExtension.php 2 locations

@@ 297-303 (lines=7) @@
294
                'mapping_types' => true,
295
                'platform_service' => true,
296
            ];
297
            foreach ($options as $key => $value) {
298
                if (isset($nonRewrittenKeys[$key])) {
299
                    continue;
300
                }
301
                $options['global'][$key] = $value;
302
                unset($options[$key]);
303
            }
304
            if (empty($options['wrapperClass'])) {
305
                // Change the wrapper class only if the user does not already forced using a custom one.
306
                $options['wrapperClass'] = 'Doctrine\\DBAL\\Sharding\\PoolingShardConnection';
@@ 262-268 (lines=7) @@
259
                'mapping_types' => true,
260
                'platform_service' => true,
261
            ];
262
            foreach ($options as $key => $value) {
263
                if (isset($nonRewrittenKeys[$key])) {
264
                    continue;
265
                }
266
                $options['master'][$key] = $value;
267
                unset($options[$key]);
268
            }
269
            if (empty($options['wrapperClass'])) {
270
                // Change the wrapper class only if the user does not already forced using a custom one.
271
                $options['wrapperClass'] = 'Doctrine\\DBAL\\Connections\\MasterSlaveConnection';