Conditions | 2 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function getConfigTreeBuilder() |
||
27 | { |
||
28 | $treeBuilder = new TreeBuilder; |
||
29 | |||
30 | $treeBuilder |
||
31 | ->root('surfnet_stepup_gateway_api') |
||
32 | ->children() |
||
33 | ->scalarNode('http_basic_realm') |
||
34 | ->defaultValue('Secure Gateway API') |
||
35 | ->validate() |
||
36 | ->ifTrue(function ($realm) { |
||
37 | return !is_string($realm) || empty($realm); |
||
38 | }) |
||
39 | ->thenInvalid("Invalid HTTP Basic realm '%s'. Must be string and non-empty.") |
||
40 | ->end() |
||
41 | ->end() |
||
42 | ->end(); |
||
43 | |||
44 | return $treeBuilder; |
||
45 | } |
||
46 | } |
||
47 |