@@ -361,44 +361,58 @@ discard block |
||
| 361 | 361 | $tags = $docBlock->getTagsByName($tagName); |
| 362 | 362 | switch ($tagName) { |
| 363 | 363 | case 'return': |
| 364 | - if (count($tags) === 0) continue; |
|
| 364 | + if (count($tags) === 0) { |
|
| 365 | + continue; |
|
| 366 | + } |
|
| 365 | 367 | /** @var Return_ $return */ |
| 366 | 368 | $return = $tags[0]; |
| 367 | 369 | $this->addMultilineWithoutRendering(':Returns: ' . self::typesToRst($return->getType()) . ' ' . RstBuilder::escape($return->getDescription())); |
| 368 | 370 | break; |
| 369 | 371 | case 'var': |
| 370 | - if (count($tags) === 0) continue; |
|
| 372 | + if (count($tags) === 0) { |
|
| 373 | + continue; |
|
| 374 | + } |
|
| 371 | 375 | /** @var DocBlock\Tags\Var_ $return */ |
| 372 | 376 | $return = $tags[0]; |
| 373 | 377 | $this->addMultiline(':Type: ' . self::typesToRst($return->getType()) . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 374 | 378 | break; |
| 375 | 379 | case 'throws': |
| 376 | - if (count($tags) === 0) continue; |
|
| 380 | + if (count($tags) === 0) { |
|
| 381 | + continue; |
|
| 382 | + } |
|
| 377 | 383 | /** @var Throws $tag */ |
| 378 | 384 | foreach ($tags as $tag) { |
| 379 | 385 | $this->addMultiline(':Throws: ' . self::typesToRst($tag->getType()) . ' ' . RstBuilder::escape($tag->getDescription()), true); |
| 380 | 386 | } |
| 381 | 387 | break; |
| 382 | 388 | case 'since': |
| 383 | - if (count($tags) === 0) continue; |
|
| 389 | + if (count($tags) === 0) { |
|
| 390 | + continue; |
|
| 391 | + } |
|
| 384 | 392 | /** @var Since $return */ |
| 385 | 393 | $return = $tags[0]; |
| 386 | 394 | $this->addMultiline(':Since: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 387 | 395 | break; |
| 388 | 396 | case 'deprecated': |
| 389 | - if (count($tags) === 0) continue; |
|
| 397 | + if (count($tags) === 0) { |
|
| 398 | + continue; |
|
| 399 | + } |
|
| 390 | 400 | /** @var Deprecated $return */ |
| 391 | 401 | $return = $tags[0]; |
| 392 | 402 | $this->addMultiline(':Deprecated: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 393 | 403 | break; |
| 394 | 404 | case 'see': |
| 395 | - if (count($tags) === 0) continue; |
|
| 405 | + if (count($tags) === 0) { |
|
| 406 | + continue; |
|
| 407 | + } |
|
| 396 | 408 | /** @var See $return */ |
| 397 | 409 | $return = $tags[0]; |
| 398 | 410 | $this->addMultiline(':See: ' . self::typesToRst($return->getReference()) . ' ' . RstBuilder::escape($return->getDescription()), true); |
| 399 | 411 | break; |
| 400 | 412 | case 'license': |
| 401 | - if (count($tags) === 0) continue; |
|
| 413 | + if (count($tags) === 0) { |
|
| 414 | + continue; |
|
| 415 | + } |
|
| 402 | 416 | /** @var DocBlock\Tags\BaseTag $return */ |
| 403 | 417 | $return = $tags[0]; |
| 404 | 418 | $this->addMultiline(':License: ' . RstBuilder::escape($return->getDescription()), true); |
@@ -432,8 +446,9 @@ discard block |
||
| 432 | 446 | $result .= $typeFull . ' | '; |
| 433 | 447 | continue; |
| 434 | 448 | } |
| 435 | - if (0 === strpos($type, '\\')) |
|
| 436 | - $type = substr($type, 1); |
|
| 449 | + if (0 === strpos($type, '\\')) { |
|
| 450 | + $type = substr($type, 1); |
|
| 451 | + } |
|
| 437 | 452 | $result .= ':any:`' . RstBuilder::escape($typeFull) . ' <' . RstBuilder::escape($type) . '>` | '; |
| 438 | 453 | } |
| 439 | 454 | return substr($result, 0, -3); |