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