| Conditions | 5 |
| Paths | 15 |
| Total Lines | 19 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function __call($name, $args) { |
||
| 19 | try { |
||
| 20 | if (!($this->functions[$name] instanceof TSSFunction\Data)) { |
||
| 21 | $tokens = $args[0]; |
||
| 22 | $parser = new \Transphporm\Parser\Value($this); |
||
| 23 | $args[0] = $parser->parseTokens($tokens, $this->elementData->getData($this->element)); |
||
| 24 | } |
||
| 25 | else if ($args[0] instanceof Parser\Tokens) { |
||
| 26 | $args[0] = iterator_to_array($args[0]); |
||
| 27 | } |
||
| 28 | if (isset($this->functions[$name])) { |
||
| 29 | return $this->functions[$name]->run($args[0], $this->element); |
||
| 30 | } |
||
| 31 | } |
||
| 32 | catch (\Exception $e) { |
||
| 33 | throw new RunException(Exception::TSS_FUNCTION, $name, $e); |
||
| 34 | } |
||
| 35 | return true; |
||
| 36 | } |
||
| 37 | |||
| 51 |