Code Duplication    Length = 10-10 lines in 2 locations

DependencyInjection/Configuration.php 2 locations

@@ 275-284 (lines=10) @@
272
                        ->scalarNode('alias')
273
                            ->defaultNull()->end()
274
                    ->end()
275
                    ->validate()->ifTrue(function ($node) {
276
                        if (isset($node['type']) && !isset($node['alias'])) {
277
                            return false;
278
                        }
279
                        if (isset($node['alias']) && !isset($node['type'])) {
280
                            return false;
281
                        }
282
283
                        return true;
284
                    })->thenInvalid('if alias or type is set, then both must be set')->end()
285
                ->end()
286
                ->arrayNode('predis')
287
                    ->children()
@@ 369-378 (lines=10) @@
366
                ->booleanNode('iterable_multibulk')->defaultFalse()->end()
367
                ->booleanNode('throw_errors')->defaultTrue()->end()
368
            ->end()
369
            ->validate()->ifTrue(function ($node) {
370
                if (isset($node['host']) && !isset($node['port'])) {
371
                    return false;
372
                }
373
                if (isset($node['port']) && !isset($node['host'])) {
374
                    return false;
375
                }
376
377
                return true;
378
            })->thenInvalid('preids connection_parameters host and port should both be set')->end();
379
380
        return $rootNode;
381
    }