Conditions | 2 |
Paths | 2 |
Total Lines | 45 |
Code Lines | 38 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public function getConfigTreeBuilder(): TreeBuilder |
||
13 | { |
||
14 | if (method_exists(TreeBuilder::class, 'getRootNode')) { |
||
15 | $treeBuilder = new TreeBuilder('setono_dao'); |
||
16 | $rootNode = $treeBuilder->getRootNode(); |
||
17 | } else { |
||
18 | // BC layer for symfony/config 4.1 and older |
||
19 | $treeBuilder = new TreeBuilder(); |
||
20 | $rootNode = $treeBuilder->root('setono_dao'); |
||
|
|||
21 | } |
||
22 | |||
23 | $rootNode |
||
24 | ->addDefaultsIfNotSet() |
||
25 | ->children() |
||
26 | ->scalarNode('customer_id') |
||
27 | ->isRequired() |
||
28 | ->cannotBeEmpty() |
||
29 | ->info('Your DAO customer id') |
||
30 | ->end() |
||
31 | ->scalarNode('password') |
||
32 | ->isRequired() |
||
33 | ->cannotBeEmpty() |
||
34 | ->info('Your DAO password') |
||
35 | ->end() |
||
36 | ->scalarNode('base_url') |
||
37 | ->cannotBeEmpty() |
||
38 | ->defaultValue('https://api.dao.as') |
||
39 | ->info('The base URL of the DAO API') |
||
40 | ->end() |
||
41 | ->scalarNode('http_client') |
||
42 | ->cannotBeEmpty() |
||
43 | ->info('PSR18 HTTP client that is injected into the client service') |
||
44 | ->end() |
||
45 | ->scalarNode('request_factory') |
||
46 | ->cannotBeEmpty() |
||
47 | ->info('Is injected into the client service') |
||
48 | ->end() |
||
49 | ->scalarNode('stream_factory') |
||
50 | ->cannotBeEmpty() |
||
51 | ->info('Is injected into the client service') |
||
52 | ->end() |
||
53 | ->end() |
||
54 | ; |
||
55 | |||
56 | return $treeBuilder; |
||
57 | } |
||
59 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.