Code Duplication    Length = 7-7 lines in 2 locations

DependencyInjection/DoctrineExtension.php 2 locations

@@ 277-283 (lines=7) @@
274
                'mapping_types' => true,
275
                'platform_service' => true,
276
            ];
277
            foreach ($options as $key => $value) {
278
                if (isset($nonRewrittenKeys[$key])) {
279
                    continue;
280
                }
281
                $options['master'][$key] = $value;
282
                unset($options[$key]);
283
            }
284
            if (empty($options['wrapperClass'])) {
285
                // Change the wrapper class only if the user does not already forced using a custom one.
286
                $options['wrapperClass'] = 'Doctrine\\DBAL\\Connections\\MasterSlaveConnection';
@@ 312-318 (lines=7) @@
309
                'mapping_types' => true,
310
                'platform_service' => true,
311
            ];
312
            foreach ($options as $key => $value) {
313
                if (isset($nonRewrittenKeys[$key])) {
314
                    continue;
315
                }
316
                $options['global'][$key] = $value;
317
                unset($options[$key]);
318
            }
319
            if (empty($options['wrapperClass'])) {
320
                // Change the wrapper class only if the user does not already forced using a custom one.
321
                $options['wrapperClass'] = 'Doctrine\\DBAL\\Sharding\\PoolingShardConnection';