Conditions | 2 |
Paths | 2 |
Total Lines | 21 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | public function getConfigTreeBuilder(): TreeBuilder |
||
18 | { |
||
19 | if (method_exists(TreeBuilder::class, 'getRootNode')) { |
||
20 | $treeBuilder = new TreeBuilder('setono_sylius_reserve_stock'); |
||
21 | $rootNode = $treeBuilder->getRootNode(); |
||
22 | } else { |
||
23 | $treeBuilder = new TreeBuilder(); |
||
24 | $rootNode = $treeBuilder->root('setono_sylius_reserve_stock'); |
||
|
|||
25 | } |
||
26 | $rootNode |
||
27 | ->addDefaultsIfNotSet() |
||
28 | ->children() |
||
29 | ->integerNode('ttl') |
||
30 | ->defaultValue(self::DEFAULT_TTL) |
||
31 | ->example(1800) |
||
32 | ->info('Define the Time To Live (TTL) in seconds for a product reservation. Setting to 0 disables this check, all carts will be taken in account for an indefinite period.') |
||
33 | ->end() |
||
34 | ->end() |
||
35 | ; |
||
36 | |||
37 | return $treeBuilder; |
||
38 | } |
||
40 |
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.