diff --git a/src/Barryvdh/Reflection/DocBlock/Tag/ReturnTag.php b/src/Barryvdh/Reflection/DocBlock/Tag/ReturnTag.php index 015062d..851a6c3 100644 --- a/src/Barryvdh/Reflection/DocBlock/Tag/ReturnTag.php +++ b/src/Barryvdh/Reflection/DocBlock/Tag/ReturnTag.php @@ -81,6 +81,35 @@ class ReturnTag extends Tag return (string) $this->getTypesCollection(); } + /** + * Set the type section of the variable + * + * @param string $type + * @return $this + */ + public function setType($type) + { + $this->type = $type; + $this->types = null; + $this->content = null; + return $this; + } + + /** + * Add a type to the type section of the variable + * + * @param string $type + * @return $this + */ + public function addType($type) + { + $this->type = $this->type . Collection::OPERATOR_OR . $type; + $this->types = null; + $this->content = null; + return $this; + } + + /** * Returns the type collection. *