1 | <?php |
||
22 | class Configuration implements ConfigurationInterface |
||
23 | { |
||
24 | /** |
||
25 | * Whether to use the debug mode. |
||
26 | * |
||
27 | * @see https://github.com/doctrine/DoctrineBundle/blob/v1.5.2/DependencyInjection/Configuration.php#L31-L41 |
||
28 | * |
||
29 | * @var bool |
||
30 | */ |
||
31 | private $debug; |
||
32 | |||
33 | /** |
||
34 | * @param bool $debug |
||
35 | */ |
||
36 | 33 | public function __construct($debug) |
|
40 | |||
41 | /** |
||
42 | * Proxy to get root node for Symfony < 4.2. |
||
43 | * |
||
44 | * @return ArrayNodeDefinition |
||
45 | */ |
||
46 | 33 | protected function getRootNode(TreeBuilder $treeBuilder, string $name) |
|
47 | { |
||
48 | 33 | if (\method_exists($treeBuilder, 'getRootNode')) { |
|
49 | 33 | return $treeBuilder->getRootNode(); |
|
50 | } else { |
||
51 | return $treeBuilder->root($name); |
||
|
|||
52 | } |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * Generates the configuration tree builder. |
||
57 | * |
||
58 | * @return TreeBuilder The tree builder |
||
59 | */ |
||
60 | 33 | public function getConfigTreeBuilder() |
|
61 | { |
||
62 | 33 | $treeBuilder = new TreeBuilder('bazinga_geocoder'); |
|
63 | |||
64 | 33 | $this->getRootNode($treeBuilder, 'bazinga_geocoder') |
|
65 | 33 | ->children() |
|
66 | 33 | ->append($this->getProvidersNode()) |
|
67 | 33 | ->arrayNode('profiling') |
|
68 | 33 | ->addDefaultsIfNotSet() |
|
69 | 33 | ->treatFalseLike(['enabled' => false]) |
|
70 | 33 | ->treatTrueLike(['enabled' => true]) |
|
71 | 33 | ->treatNullLike(['enabled' => $this->debug]) |
|
72 | 33 | ->info('Extend the debug profiler with information about requests.') |
|
73 | 33 | ->children() |
|
74 | 33 | ->booleanNode('enabled') |
|
75 | 33 | ->info('Turn the toolbar on or off. Defaults to kernel debug mode.') |
|
76 | 33 | ->defaultValue($this->debug) |
|
77 | 33 | ->end() |
|
78 | 33 | ->end() |
|
79 | 33 | ->end() |
|
80 | 33 | ->arrayNode('fake_ip') |
|
81 | 33 | ->beforeNormalization() |
|
82 | 33 | ->ifString() |
|
83 | ->then(function ($value) { |
||
84 | return ['ip' => $value]; |
||
85 | 33 | }) |
|
86 | 33 | ->end() |
|
87 | 33 | ->canBeEnabled() |
|
88 | 33 | ->children() |
|
89 | 33 | ->scalarNode('ip')->defaultNull()->end() |
|
90 | 33 | ->booleanNode('use_faker')->defaultFalse()->end() |
|
91 | 33 | ->end() |
|
92 | 33 | ->end(); |
|
93 | |||
94 | 33 | return $treeBuilder; |
|
95 | } |
||
96 | |||
97 | /** |
||
98 | * @return ArrayNodeDefinition |
||
99 | */ |
||
100 | 33 | private function getProvidersNode() |
|
128 | |||
129 | /** |
||
130 | * Create plugin node of a client. |
||
131 | * |
||
132 | * @return ArrayNodeDefinition The plugin node |
||
133 | */ |
||
134 | 33 | private function createClientPluginNode() |
|
180 | } |
||
181 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.