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