Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
45 | protected function addAuthenticationSection(ArrayNodeDefinition $node) |
||
46 | { |
||
47 | $node->children() |
||
48 | ->arrayNode('authentication') |
||
49 | ->addDefaultsIfNotSet() |
||
50 | ->children() |
||
51 | ->scalarNode('method') |
||
52 | ->defaultValue('query') |
||
53 | ->isRequired() |
||
54 | ->cannotBeEmpty() |
||
55 | ->validate() |
||
56 | ->ifNotInArray(array('header', 'query')) |
||
57 | ->thenInvalid('Invalid method for security %s') |
||
58 | ->end() |
||
59 | ->end() |
||
60 | ->scalarNode('key_name')->defaultValue('key')->isRequired()->cannotBeEmpty()->end() |
||
61 | ->end() |
||
62 | ->end(); |
||
63 | } |
||
64 | } |
||
65 |