|
@@ 365-370 (lines=6) @@
|
| 362 |
|
protected function addDocblockTag($tagName, DocBlock $docBlock) { |
| 363 |
|
$tags = $docBlock->getTagsByName($tagName); |
| 364 |
|
switch ($tagName) { |
| 365 |
|
case 'return': |
| 366 |
|
if (count($tags) === 0) continue; |
| 367 |
|
/** @var Return_ $return */ |
| 368 |
|
$return = $tags[0]; |
| 369 |
|
$this->addMultiline(':Returns: ' . self::typesToRst($return->getType()) . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 370 |
|
break; |
| 371 |
|
case 'var': |
| 372 |
|
if (count($tags) === 0) continue; |
| 373 |
|
/** @var DocBlock\Tags\Var_ $return */ |
|
@@ 377-383 (lines=7) @@
|
| 374 |
|
$return = $tags[0]; |
| 375 |
|
$this->addMultiline(':Type: ' . self::typesToRst($return->getType()) . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 376 |
|
break; |
| 377 |
|
case 'throws': |
| 378 |
|
if (count($tags) === 0) continue; |
| 379 |
|
/** @var Throws $tag */ |
| 380 |
|
foreach ($tags as $tag) { |
| 381 |
|
$this->addMultiline(':Throws: ' . self::typesToRst($tag->getType()) . ' ' . RstBuilder::escape($tag->getDescription()), true); |
| 382 |
|
} |
| 383 |
|
break; |
| 384 |
|
case 'since': |
| 385 |
|
if (count($tags) === 0) continue; |
| 386 |
|
/** @var Since $return */ |
|
@@ 384-389 (lines=6) @@
|
| 381 |
|
$this->addMultiline(':Throws: ' . self::typesToRst($tag->getType()) . ' ' . RstBuilder::escape($tag->getDescription()), true); |
| 382 |
|
} |
| 383 |
|
break; |
| 384 |
|
case 'since': |
| 385 |
|
if (count($tags) === 0) continue; |
| 386 |
|
/** @var Since $return */ |
| 387 |
|
$return = $tags[0]; |
| 388 |
|
$this->addMultiline(':Since: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 389 |
|
break; |
| 390 |
|
case 'deprecated': |
| 391 |
|
if (count($tags) === 0) continue; |
| 392 |
|
/** @var Deprecated $return */ |
|
@@ 390-395 (lines=6) @@
|
| 387 |
|
$return = $tags[0]; |
| 388 |
|
$this->addMultiline(':Since: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 389 |
|
break; |
| 390 |
|
case 'deprecated': |
| 391 |
|
if (count($tags) === 0) continue; |
| 392 |
|
/** @var Deprecated $return */ |
| 393 |
|
$return = $tags[0]; |
| 394 |
|
$this->addMultiline(':Deprecated: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 395 |
|
break; |
| 396 |
|
case 'see': |
| 397 |
|
if (count($tags) === 0) continue; |
| 398 |
|
/** @var See $return */ |
|
@@ 402-407 (lines=6) @@
|
| 399 |
|
$return = $tags[0]; |
| 400 |
|
$this->addMultiline(':See: ' . self::typesToRst($return->getReference()) . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 401 |
|
break; |
| 402 |
|
case 'license': |
| 403 |
|
if (count($tags) === 0) continue; |
| 404 |
|
/** @var DocBlock\Tags\BaseTag $return */ |
| 405 |
|
$return = $tags[0]; |
| 406 |
|
$this->addMultiline(':License: ' . RstBuilder::escape($return->getDescription()), true); |
| 407 |
|
break; |
| 408 |
|
case 'param': |
| 409 |
|
// param handling is done by subclasses since it is more that docbook parsing |
| 410 |
|
break; |