Code Duplication    Length = 10-10 lines in 2 locations

DependencyInjection/Configuration.php 2 locations

@@ 271-280 (lines=10) @@
268
                ->scalarNode('alias')
269
                    ->defaultNull()->end()
270
            ->end()
271
            ->validate()->ifTrue(function ($node) {
272
                if (isset($node['type']) && !isset($node['alias'])) {
273
                    return true;
274
                }
275
                if (isset($node['alias']) && !isset($node['type'])) {
276
                    return true;
277
                }
278
279
                return false;
280
            })->thenInvalid('if alias or type is set, then both must be set')->end();
281
282
        return $rootNode;
283
    }
@@ 380-389 (lines=10) @@
377
                ->booleanNode('iterable_multibulk')->defaultFalse()->end()
378
                ->booleanNode('throw_errors')->defaultTrue()->end()
379
            ->end()
380
            ->validate()->ifTrue(function ($node) {
381
                if (isset($node['host']) && !isset($node['port'])) {
382
                    return true;
383
                }
384
                if (isset($node['port']) && !isset($node['host'])) {
385
                    return true;
386
                }
387
388
                return false;
389
            })->thenInvalid('preids connection_parameters host and port should both be set')->end();
390
391
        return $rootNode;
392
    }