Conditions | 3 |
Paths | 3 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
9 | public function makeArray(array $input, $type = 'filter') |
||
10 | { |
||
11 | $output = []; |
||
12 | $class = '\\Twig_Simple'.ucfirst($type); |
||
13 | |||
14 | foreach ($input as $call => $function) { |
||
15 | $output[] = new $class('sludio_'.$call, [ |
||
16 | $this, |
||
17 | $function, |
||
18 | ]); |
||
19 | if ($this->shortFunctions) { |
||
20 | $output[] = new $class($call, [ |
||
21 | $this, |
||
22 | $function, |
||
23 | ]); |
||
24 | } |
||
25 | } |
||
26 | |||
27 | return $output; |
||
28 | } |
||
29 | } |