Total Complexity | 2 |
Total Lines | 15 |
Duplicated Lines | 0 % |
Coverage | 50% |
Changes | 0 |
1 | <?php |
||
5 | class UtilitaExtension extends \Twig_Extension |
||
6 | { |
||
7 | /** |
||
8 | * {@inheritdoc} |
||
9 | */ |
||
10 | public function getFunctions() |
||
11 | { |
||
12 | return array( |
||
13 | new \Twig_SimpleFunction('json_decode', array($this, 'jsonDecode', 'is_safe' => array('html'))), |
||
14 | ); |
||
15 | } |
||
16 | |||
17 | 6 | public function jsonDecode($string) |
|
20 | } |
||
21 | } |
||
22 |