/** * Generates code for a function * * @param XmlImportAstFunction $function * @return string */ private function generateForFunction(XmlImportAstFunction $function) { $result = $function->getName() . '('; $arguments = $function->getArguments(); for ($i = 0; $i < count($arguments); $i++) { $result .= $this->generateForExpression($arguments[$i], true); if ($i < count($arguments) - 1) { $result .= ', '; } } $result .= ')'; return $result; }