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