public function parse(\PHPParser_Node_Stmt_Function $node) { $function = new GlobalFunction(implode("\\", $node->namespacedName->parts)); $function->setImportedNamespaces($this->importedNamespaces); $function->setAstNode($node); $function->setReturnByRef($node->byRef); $function->setVariableParameters(false !== strpos($node->getDocComment(), '@jms-variable-parameters')); foreach ($this->paramParser->parse($node->params, 'Scrutinizer\\PhpAnalyzer\\Model\\FunctionParameter') as $param) { $function->addParameter($param); } return $function; }