Code Duplication    Length = 10-10 lines in 2 locations

DependencyInjection/Configuration.php 2 locations

@@ 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 true;
401
                }
402
                if (isset($node['port']) && !isset($node['host'])) {
403
                    return true;
404
                }
405
406
                return false;
407
            })->thenInvalid('predis connection_parameters host and port should both be set')->end();
408
409
        return $rootNode;
410
    }
@@ 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
    }