internal = $callable->isInternal(); $t = $callable->getFileName(); $this->filename = false === $t ? null : $t; $t = $callable->getStartLine(); $this->startline = false === $t ? null : $t; $t = $callable->getEndLine(); $this->endline = false === $t ? null : $t; $t = $callable->getDocComment(); $this->docstring = false === $t ? null : $t; $this->return_reference = $callable->returnsReference(); $rt = $callable->getReturnType(); if ($rt) { $this->returntype = Utils::getTypeString($rt); } $parameters = []; foreach ($callable->getParameters() as $param) { $parameters[] = new ParameterBag($param); } $this->parameters = $parameters; } }