Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 13 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| updater_configuration | |
0.00% |
0 / 13 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| getConfigTreeBuilder | |
0.00% |
0 / 13 |
|
0.00% |
0 / 1 |
2 | |||
| 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\install; |
| 15 | |
| 16 | use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
| 17 | use Symfony\Component\Config\Definition\ConfigurationInterface; |
| 18 | |
| 19 | class updater_configuration implements ConfigurationInterface |
| 20 | { |
| 21 | |
| 22 | /** |
| 23 | * Generates the configuration tree builder. |
| 24 | * |
| 25 | * @return TreeBuilder The tree builder |
| 26 | */ |
| 27 | public function getConfigTreeBuilder(): TreeBuilder |
| 28 | { |
| 29 | $treeBuilder = new TreeBuilder('updater'); |
| 30 | $rootNode = $treeBuilder->getRootNode(); |
| 31 | /** @psalm-suppress UndefinedMethod */ |
| 32 | $rootNode |
| 33 | ->addDefaultsIfNotSet() |
| 34 | ->children() |
| 35 | ->enumNode('type')->values(['all','db_only'])->defaultValue('all')->end() |
| 36 | ->arrayNode('extensions') |
| 37 | ->prototype('scalar')->end() |
| 38 | ->defaultValue([]) |
| 39 | ->end() |
| 40 | ->end() |
| 41 | ; |
| 42 | |
| 43 | return $treeBuilder; |
| 44 | } |
| 45 | } |