Conditions | 1 |
Paths | 1 |
Total Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Tests | 20 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
25 | 10 | public function getConfigTreeBuilder() |
|
26 | { |
||
27 | 10 | $treeBuilder = new TreeBuilder(); |
|
28 | 10 | $treeBuilder->root($this->treeRootName) |
|
29 | 10 | ->children() |
|
30 | 10 | ->arrayNode('rules') |
|
31 | 10 | ->addDefaultsIfNotSet() |
|
32 | 10 | ->children() |
|
33 | 10 | ->arrayNode('match_uri') |
|
34 | 10 | ->beforeNormalization() |
|
35 | 10 | ->ifString() |
|
36 | 10 | ->then(function ($value) { |
|
37 | 1 | return [$value]; |
|
38 | 10 | }) |
|
39 | 10 | ->end() |
|
40 | 10 | ->isRequired() |
|
41 | 10 | ->defaultValue(['#^(/app(_[a-zA-Z]*)?.php)?/api/#']) |
|
42 | 10 | ->prototype('scalar')->cannotBeEmpty()->end() |
|
43 | 10 | ->end() |
|
44 | 10 | ->end(); |
|
45 | |||
46 | 10 | return $treeBuilder; |
|
47 | } |
||
48 | } |
||
49 |