|
@@ 350-355 (lines=6) @@
|
| 347 |
|
protected function addDocblockTag($tagName, DocBlock $docBlock) { |
| 348 |
|
$tags = $docBlock->getTagsByName($tagName); |
| 349 |
|
switch ($tagName) { |
| 350 |
|
case 'return': |
| 351 |
|
if (count($tags) === 0) continue; |
| 352 |
|
/** @var Return_ $return */ |
| 353 |
|
$return = $tags[0]; |
| 354 |
|
$this->addMultiline(':Returns: ' . self::typesToRst($return->getType()) . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 355 |
|
break; |
| 356 |
|
case 'var': |
| 357 |
|
if (count($tags) === 0) continue; |
| 358 |
|
/** @var DocBlock\Tags\Var_ $return */ |
|
@@ 362-368 (lines=7) @@
|
| 359 |
|
$return = $tags[0]; |
| 360 |
|
$this->addMultiline(':Type: ' . self::typesToRst($return->getType()) . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 361 |
|
break; |
| 362 |
|
case 'throws': |
| 363 |
|
if (count($tags) === 0) continue; |
| 364 |
|
/** @var Throws $tag */ |
| 365 |
|
foreach ($tags as $tag) { |
| 366 |
|
$this->addMultiline(':Throws: ' . $tag->getType() . ' ' . RstBuilder::escape($tag->getDescription()), true); |
| 367 |
|
} |
| 368 |
|
break; |
| 369 |
|
case 'since': |
| 370 |
|
if (count($tags) === 0) continue; |
| 371 |
|
/** @var Since $return */ |
|
@@ 369-374 (lines=6) @@
|
| 366 |
|
$this->addMultiline(':Throws: ' . $tag->getType() . ' ' . RstBuilder::escape($tag->getDescription()), true); |
| 367 |
|
} |
| 368 |
|
break; |
| 369 |
|
case 'since': |
| 370 |
|
if (count($tags) === 0) continue; |
| 371 |
|
/** @var Since $return */ |
| 372 |
|
$return = $tags[0]; |
| 373 |
|
$this->addMultiline(':Since: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 374 |
|
break; |
| 375 |
|
case 'deprecated': |
| 376 |
|
if (count($tags) === 0) continue; |
| 377 |
|
/** @var Deprecated $return */ |
|
@@ 375-380 (lines=6) @@
|
| 372 |
|
$return = $tags[0]; |
| 373 |
|
$this->addMultiline(':Since: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 374 |
|
break; |
| 375 |
|
case 'deprecated': |
| 376 |
|
if (count($tags) === 0) continue; |
| 377 |
|
/** @var Deprecated $return */ |
| 378 |
|
$return = $tags[0]; |
| 379 |
|
$this->addMultiline(':Deprecated: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 380 |
|
break; |
| 381 |
|
case 'see': |
| 382 |
|
if (count($tags) === 0) continue; |
| 383 |
|
/** @var See $return */ |
|
@@ 381-386 (lines=6) @@
|
| 378 |
|
$return = $tags[0]; |
| 379 |
|
$this->addMultiline(':Deprecated: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 380 |
|
break; |
| 381 |
|
case 'see': |
| 382 |
|
if (count($tags) === 0) continue; |
| 383 |
|
/** @var See $return */ |
| 384 |
|
$return = $tags[0]; |
| 385 |
|
$this->addMultiline(':See: ' . $return->getReference() . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 386 |
|
break; |
| 387 |
|
case 'license': |
| 388 |
|
if (count($tags) === 0) continue; |
| 389 |
|
/** @var DocBlock\Tags\BaseTag $return */ |
|
@@ 387-392 (lines=6) @@
|
| 384 |
|
$return = $tags[0]; |
| 385 |
|
$this->addMultiline(':See: ' . $return->getReference() . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 386 |
|
break; |
| 387 |
|
case 'license': |
| 388 |
|
if (count($tags) === 0) continue; |
| 389 |
|
/** @var DocBlock\Tags\BaseTag $return */ |
| 390 |
|
$return = $tags[0]; |
| 391 |
|
$this->addMultiline(':License: ' . RstBuilder::escape($return->getDescription()), true); |
| 392 |
|
break; |
| 393 |
|
case 'param': |
| 394 |
|
// param handling is done by subclasses since it is more that docbook parsing |
| 395 |
|
break; |