| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function makeArray(array $input, $type = 'filter') |
||
| 21 | { |
||
| 22 | $output = []; |
||
| 23 | $class = '\\Twig_Simple'.ucfirst($type); |
||
| 24 | $this->makeInput($input, $input); |
||
| 25 | |||
| 26 | foreach ($input as $call => $function) { |
||
| 27 | if (is_array($function)) { |
||
| 28 | $output[] = new $class($call, $function); |
||
| 29 | } else { |
||
| 30 | $output[] = new $class($call, [ |
||
| 31 | $this, |
||
| 32 | $function, |
||
| 33 | ]); |
||
| 34 | } |
||
| 35 | } |
||
| 36 | |||
| 37 | return $output; |
||
| 38 | } |
||
| 39 | } |