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
    }
@@ 386-395 (lines=10) @@
383
                ->booleanNode('iterable_multibulk')->defaultFalse()->end()
384
                ->booleanNode('throw_errors')->defaultTrue()->end()
385
            ->end()
386
            ->validate()->ifTrue(function ($node) {
387
                if (isset($node['host']) && !isset($node['port'])) {
388
                    return true;
389
                }
390
                if (isset($node['port']) && !isset($node['host'])) {
391
                    return true;
392
                }
393
394
                return false;
395
            })->thenInvalid('preids connection_parameters host and port should both be set')->end();
396
397
        return $rootNode;
398
    }