| Conditions | 2 |
| Paths | 2 |
| Total Lines | 35 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 26 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | 7 | public function getConfigTreeBuilder() |
|
| 19 | { |
||
| 20 | 7 | $builder = new TreeBuilder('twital'); |
|
| 21 | $rootNode = method_exists(TreeBuilder::class, 'getRootNode') ? $builder->getRootNode() : $builder->root('twital'); |
||
|
|
|||
| 22 | 7 | ||
| 23 | 7 | $rootNode |
|
| 24 | 7 | ->children() |
|
| 25 | 7 | ->booleanNode('full_twig_compatibility')->defaultFalse()->end() |
|
| 26 | ->end() |
||
| 27 | 7 | // filters |
|
| 28 | 7 | ->fixXmlConfig('source_adapter') |
|
| 29 | 7 | ->children() |
|
| 30 | 7 | ->arrayNode('source_adapters') |
|
| 31 | 7 | ->requiresAtLeastOneElement() |
|
| 32 | 7 | ->useAttributeAsKey('service') |
|
| 33 | 7 | ->defaultValue(array( |
|
| 34 | 'twital.source_adapter.xml' => array('pattern' => array('/\.xml\.twital$/')), |
||
| 35 | 'twital.source_adapter.html5' => array('pattern' => array('/\.html\.twital$/')), |
||
| 36 | 'twital.source_adapter.xhtml' => array('pattern' => array('/\.xhtml\.twital$/')), |
||
| 37 | 7 | )) |
|
| 38 | 7 | ->prototype('array') |
|
| 39 | 7 | ->children() |
|
| 40 | 7 | ->arrayNode('pattern') |
|
| 41 | 7 | ->isRequired() |
|
| 42 | 7 | ->requiresAtLeastOneElement() |
|
| 43 | 7 | ->prototype('scalar')->end() |
|
| 44 | 7 | ->end() |
|
| 45 | 7 | ->end() |
|
| 46 | 7 | ->end() |
|
| 47 | 7 | ->end() |
|
| 48 | 7 | ->end() |
|
| 49 | ->end(); |
||
| 50 | 7 | ||
| 51 | return $builder; |
||
| 52 | } |
||
| 53 | } |
||
| 54 |
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.