mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-17 17:47:13 +00:00
Revert setTypes, getContent and getRawType
So it is just the original, but with setType added.
This commit is contained in:
@@ -36,7 +36,7 @@ class ReturnTag extends Tag
|
||||
public function getContent()
|
||||
{
|
||||
if (null === $this->content) {
|
||||
$this->content = "{$this->getType()} {$this->description}";
|
||||
$this->content = "{$this->type} {$this->description}";
|
||||
}
|
||||
|
||||
return $this->content;
|
||||
@@ -71,22 +71,6 @@ class ReturnTag extends Tag
|
||||
return $this->getTypesCollection()->getArrayCopy();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the types of the variable
|
||||
*
|
||||
* @param $types
|
||||
* @return $this
|
||||
*/
|
||||
public function setTypes($types){
|
||||
$this->types = new Collection(
|
||||
$types,
|
||||
$this->docblock ? $this->docblock->getContext() : null
|
||||
);
|
||||
$this->content = null;
|
||||
$this->type = null;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the parsed type section of the variable.
|
||||
*
|
||||
@@ -97,20 +81,10 @@ class ReturnTag extends Tag
|
||||
return (string) $this->getTypesCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the raw type section of the variable.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getRawType()
|
||||
{
|
||||
return $this->type ?: $this->getType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the type section of the variable
|
||||
*
|
||||
* @param $type
|
||||
* @param string $type
|
||||
* @return $this
|
||||
*/
|
||||
public function setType($type)
|
||||
|
||||
Reference in New Issue
Block a user