Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
50 / 50 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
container_configuration | |
100.00% |
50 / 50 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
getConfigTreeBuilder | |
100.00% |
50 / 50 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | /** |
3 | * |
4 | * This file is part of the phpBB Forum Software package. |
5 | * |
6 | * @copyright (c) phpBB Limited <https://www.phpbb.com> |
7 | * @license GNU General Public License, version 2 (GPL-2.0) |
8 | * |
9 | * For full copyright and license information, please see |
10 | * the docs/CREDITS.txt file. |
11 | * |
12 | */ |
13 | |
14 | namespace phpbb\di\extension; |
15 | |
16 | use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
17 | use Symfony\Component\Config\Definition\ConfigurationInterface; |
18 | |
19 | class container_configuration implements ConfigurationInterface |
20 | { |
21 | |
22 | /** |
23 | * Generates the configuration tree builder. |
24 | * |
25 | * @return TreeBuilder The tree builder |
26 | */ |
27 | public function getConfigTreeBuilder() |
28 | { |
29 | $treeBuilder = new TreeBuilder('core'); |
30 | $rootNode = $treeBuilder->getRootNode(); |
31 | /** @psalm-suppress UndefinedMethod */ |
32 | $rootNode |
33 | ->children() |
34 | ->booleanNode('require_dev_dependencies')->defaultValue(false)->end() |
35 | ->booleanNode('allow_install_dir')->defaultValue(false)->end() |
36 | ->arrayNode('debug') |
37 | ->addDefaultsIfNotSet() |
38 | ->children() |
39 | ->booleanNode('exceptions')->defaultValue(false)->end() |
40 | ->booleanNode('load_time')->defaultValue(false)->end() |
41 | ->booleanNode('sql_explain')->defaultValue(false)->end() |
42 | ->booleanNode('memory')->defaultValue(false)->end() |
43 | ->booleanNode('show_errors')->defaultValue(false)->end() |
44 | ->booleanNode('url_generator')->defaultValue(false)->end() |
45 | ->booleanNode('url_matcher')->defaultValue(false)->end() |
46 | ->booleanNode('error_handler')->defaultValue(false)->end() |
47 | ->end() |
48 | ->end() |
49 | ->arrayNode('twig') |
50 | ->addDefaultsIfNotSet() |
51 | ->children() |
52 | ->booleanNode('debug')->defaultValue(null)->end() |
53 | ->booleanNode('auto_reload')->defaultValue(null)->end() |
54 | ->booleanNode('enable_debug_extension')->defaultValue(false)->end() |
55 | ->end() |
56 | ->end() |
57 | ->arrayNode('extensions') |
58 | ->addDefaultsIfNotSet() |
59 | ->children() |
60 | ->booleanNode('composer_debug')->defaultValue(false)->end() |
61 | ->booleanNode('composer_verbose')->defaultValue(false)->end() |
62 | ->end() |
63 | ->end() |
64 | ->arrayNode('session') |
65 | ->addDefaultsIfNotSet() |
66 | ->children() |
67 | ->booleanNode('force_sid')->defaultValue(false)->end() |
68 | ->booleanNode('log_errors')->defaultValue(false)->end() |
69 | ->end() |
70 | ->end() |
71 | ->arrayNode('finder') |
72 | ->addDefaultsIfNotSet() |
73 | ->children() |
74 | ->booleanNode('cache')->defaultValue(true)->end() |
75 | ->end() |
76 | ->end() |
77 | ->end() |
78 | ; |
79 | return $treeBuilder; |
80 | } |
81 | } |