|
@@ 136-141 (lines=6) @@
|
| 133 |
|
protected function addDocblockTag($tagName, DocBlock $docBlock) { |
| 134 |
|
$tags = $docBlock->getTagsByName($tagName); |
| 135 |
|
switch ($tagName) { |
| 136 |
|
case 'return': |
| 137 |
|
if (count($tags) === 0) continue; |
| 138 |
|
/** @var Return_ $return */ |
| 139 |
|
$return = $tags[0]; |
| 140 |
|
$this->addMultiline(':returns: ' . $return->getType() . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 141 |
|
break; |
| 142 |
|
case 'throws': |
| 143 |
|
if (count($tags) === 0) continue; |
| 144 |
|
/** @var Throws $tag */ |
|
@@ 142-148 (lines=7) @@
|
| 139 |
|
$return = $tags[0]; |
| 140 |
|
$this->addMultiline(':returns: ' . $return->getType() . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 141 |
|
break; |
| 142 |
|
case 'throws': |
| 143 |
|
if (count($tags) === 0) continue; |
| 144 |
|
/** @var Throws $tag */ |
| 145 |
|
foreach ($tags as $tag) { |
| 146 |
|
$this->addMultiline(':throws: ' . $tag->getType() . ' ' . RstBuilder::escape($tag->getDescription()), true); |
| 147 |
|
} |
| 148 |
|
break; |
| 149 |
|
case 'since': |
| 150 |
|
if (count($tags) === 0) continue; |
| 151 |
|
/** @var Since $return */ |
|
@@ 149-154 (lines=6) @@
|
| 146 |
|
$this->addMultiline(':throws: ' . $tag->getType() . ' ' . RstBuilder::escape($tag->getDescription()), true); |
| 147 |
|
} |
| 148 |
|
break; |
| 149 |
|
case 'since': |
| 150 |
|
if (count($tags) === 0) continue; |
| 151 |
|
/** @var Since $return */ |
| 152 |
|
$return = $tags[0]; |
| 153 |
|
$this->addMultiline(':since: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 154 |
|
break; |
| 155 |
|
case 'deprecated': |
| 156 |
|
if (count($tags) === 0) continue; |
| 157 |
|
/** @var Deprecated $return */ |
|
@@ 155-160 (lines=6) @@
|
| 152 |
|
$return = $tags[0]; |
| 153 |
|
$this->addMultiline(':since: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 154 |
|
break; |
| 155 |
|
case 'deprecated': |
| 156 |
|
if (count($tags) === 0) continue; |
| 157 |
|
/** @var Deprecated $return */ |
| 158 |
|
$return = $tags[0]; |
| 159 |
|
$this->addMultiline(':deprecated: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 160 |
|
break; |
| 161 |
|
case 'see': |
| 162 |
|
if (count($tags) === 0) continue; |
| 163 |
|
/** @var See $return */ |
|
@@ 161-166 (lines=6) @@
|
| 158 |
|
$return = $tags[0]; |
| 159 |
|
$this->addMultiline(':deprecated: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 160 |
|
break; |
| 161 |
|
case 'see': |
| 162 |
|
if (count($tags) === 0) continue; |
| 163 |
|
/** @var See $return */ |
| 164 |
|
$return = $tags[0]; |
| 165 |
|
$this->addMultiline(':see: ' . $return->getReference() . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 166 |
|
break; |
| 167 |
|
case 'license': |
| 168 |
|
if (count($tags) === 0) continue; |
| 169 |
|
/** @var DocBlock\Tags\BaseTag $return */ |
|
@@ 167-172 (lines=6) @@
|
| 164 |
|
$return = $tags[0]; |
| 165 |
|
$this->addMultiline(':see: ' . $return->getReference() . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 166 |
|
break; |
| 167 |
|
case 'license': |
| 168 |
|
if (count($tags) === 0) continue; |
| 169 |
|
/** @var DocBlock\Tags\BaseTag $return */ |
| 170 |
|
$return = $tags[0]; |
| 171 |
|
$this->addMultiline(':license: ' . RstBuilder::escape($return->getDescription()), true); |
| 172 |
|
break; |
| 173 |
|
case 'param': |
| 174 |
|
// param handling is done by subclasses since it is more that docbook parsing |
| 175 |
|
break; |