| Conditions | 2 |
| Paths | 2 |
| Total Lines | 37 |
| Code Lines | 30 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public function getConfigTreeBuilder(): TreeBuilder |
||
| 11 | { |
||
| 12 | $treeBuilder = new TreeBuilder('webfactory_shortcode'); |
||
| 13 | $rootNode = method_exists(TreeBuilder::class, 'getRootNode') ? $treeBuilder->getRootNode() : $treeBuilder->root('webfactory_shortcode'); |
||
|
|
|||
| 14 | |||
| 15 | // For details on these configuration options, see https://github.com/thunderer/Shortcode#parsing and |
||
| 16 | // https://github.com/thunderer/Shortcode#configuration . |
||
| 17 | $rootNode |
||
| 18 | ->children() |
||
| 19 | ->enumNode('parser') |
||
| 20 | ->info('Which parser type to use, choose "regular" or "regex".') |
||
| 21 | ->values(['regular', 'regex']) |
||
| 22 | ->defaultValue('regular') |
||
| 23 | ->end() |
||
| 24 | ->integerNode('recursion_depth') |
||
| 25 | ->info('Controls how many levels of shortcodes to process') |
||
| 26 | ->defaultValue(null) |
||
| 27 | ->end() |
||
| 28 | ->integerNode('max_iterations') |
||
| 29 | ->info('Limit the number of iterations when resolving shortcodes') |
||
| 30 | ->defaultValue(null) |
||
| 31 | ->end() |
||
| 32 | ->arrayNode('shortcodes') |
||
| 33 | ->normalizeKeys(false) |
||
| 34 | ->arrayPrototype() |
||
| 35 | ->beforeNormalization() |
||
| 36 | ->ifString()->then(static function ($v) { |
||
| 37 | return ['controller' => $v]; |
||
| 38 | }) |
||
| 39 | ->end() |
||
| 40 | ->children() |
||
| 41 | ->scalarNode('controller')->isRequired()->end() |
||
| 42 | ->enumNode('method')->values(['esi', 'inline'])->defaultValue('inline')->end() |
||
| 43 | ->scalarNode('description')->defaultNull()->end() |
||
| 44 | ->scalarNode('example')->defaultNull()->end(); |
||
| 45 | |||
| 46 | return $treeBuilder; |
||
| 47 | } |
||
| 49 |
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.