isReturnByReference = $reflector->isByRef(); foreach($reflector->getArguments() as $arg) { $arg = new ParamDoc($arg); $this->params[$arg->name] = $arg; } foreach($this->tags as $i => $tag) { if ($tag instanceof ReturnTag) { $this->returnType = $tag->getType(); $this->returnTypes = $tag->getTypes(); $this->return = $tag->getDescription(); unset($this->tags[$i]); } elseif ($tag instanceof ParamTag) { $paramName = $tag->getVariableName(); $this->params[$paramName]->description = $tag->getDescription(); $this->params[$paramName]->type = $tag->getType(); $this->params[$paramName]->types = $tag->getTypes(); unset($this->tags[$i]); } elseif ($tag instanceof ThrowsTag) { $this->exceptions[$tag->getType()] = $tag->getDescription(); unset($this->tags[$i]); } } } }