/** * Generates code for a function * * @param XmlImportAstFunction $function * @return string */ private function generateForMath(XmlImportAstMath $math) { $result = ''; $arguments = $math->getArguments(); for ($i = 0; $i < count($arguments); $i++) { $result .= $this->generateForExpression($arguments[$i], true); } return 'number_format(' . str_replace("\"", "", $result) . ',2)'; }