Code Duplication    Length = 10-10 lines in 2 locations

DependencyInjection/Configuration.php 2 locations

@@ 304-313 (lines=10) @@
301
                        ->scalarNode('alias')
302
                            ->defaultNull()->end()
303
                    ->end()
304
                    ->validate()->ifTrue(function ($node) {
305
                        if (isset($node['type']) && !isset($node['alias'])) {
306
                            return false;
307
                        }
308
                        if (isset($node['alias']) && !isset($node['type'])) {
309
                            return false;
310
                        }
311
312
                        return true;
313
                    })->thenInvalid('if alias or type is set, then both must be set')->end()
314
                ->end()
315
                ->arrayNode('predis')
316
                    ->children()
@@ 398-407 (lines=10) @@
395
                ->booleanNode('iterable_multibulk')->defaultFalse()->end()
396
                ->booleanNode('throw_errors')->defaultTrue()->end()
397
            ->end()
398
            ->validate()->ifTrue(function ($node) {
399
                if (isset($node['host']) && !isset($node['port'])) {
400
                    return false;
401
                }
402
                if (isset($node['port']) && !isset($node['host'])) {
403
                    return false;
404
                }
405
406
                return true;
407
            })->thenInvalid('preids connection_parameters host and port should both be set')->end();
408
409
        return $rootNode;
410
    }