Conditions | 2 |
Paths | 2 |
Total Lines | 30 |
Lines | 0 |
Ratio | 0 % |
Tests | 19 |
CRAP Score | 2.0005 |
Changes | 0 |
1 | <?php |
||
16 | 1 | public function getConfigTreeBuilder() |
|
17 | { |
||
18 | 1 | $treeBuilder = new TreeBuilder('happyr_google_analytics'); |
|
19 | // Keep compatibility with symfony/config < 4.2 |
||
20 | 1 | if (!method_exists($treeBuilder, 'getRootNode')) { |
|
21 | $root = $treeBuilder->root('happyr_google_analytics'); |
||
|
|||
22 | } else { |
||
23 | 1 | $root = $treeBuilder->getRootNode(); |
|
24 | } |
||
25 | |||
26 | $root |
||
27 | 1 | ->children() |
|
28 | 1 | ->booleanNode('enabled')->defaultTrue()->info('If disabled we will not send any data')->end() |
|
29 | 1 | ->scalarNode('version')->cannotBeEmpty()->defaultValue(1)->info('The version of the Measurement Protocol')->end() |
|
30 | 1 | ->scalarNode('tracking_id')->isRequired()->cannotBeEmpty()->end() |
|
31 | |||
32 | 1 | ->scalarNode('endpoint')->defaultValue('http://www.google-analytics.com/collect')->cannotBeEmpty()->end() |
|
33 | 1 | ->scalarNode('http_client')->defaultValue('httplug.client')->end() |
|
34 | 1 | ->scalarNode('http_message_factory')->defaultValue('httplug.message_factory')->end() |
|
35 | |||
36 | 1 | ->arrayNode('fetching')->addDefaultsIfNotSet()->children() |
|
37 | 1 | ->integerNode('view_id')->defaultNull()->info('The google analytics view id. This is not the same as the tracking code.')->end() |
|
38 | 1 | ->scalarNode('cache_service')->defaultNull()->end() |
|
39 | 1 | ->integerNode('cache_lifetime')->defaultValue(3600)->end() |
|
40 | 1 | ->scalarNode('client_service')->defaultNull()->end() |
|
41 | 1 | ->end() |
|
42 | 1 | ->end()->end(); |
|
43 | |||
44 | 1 | return $treeBuilder; |
|
45 | } |
||
46 | } |
||
47 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.