@@ -350,44 +350,58 @@ discard block |
||
350 | 350 | $tags = $docBlock->getTagsByName($tagName); |
351 | 351 | switch ($tagName) { |
352 | 352 | case 'return': |
353 | - if (count($tags) === 0) continue; |
|
353 | + if (count($tags) === 0) { |
|
354 | + continue; |
|
355 | + } |
|
354 | 356 | /** @var Return_ $return */ |
355 | 357 | $return = $tags[0]; |
356 | 358 | $this->addMultiline(':Returns: ' . self::typesToRst($return->getType()) . ' ' . RstBuilder::escape($return->getDescription()), true); |
357 | 359 | break; |
358 | 360 | case 'var': |
359 | - if (count($tags) === 0) continue; |
|
361 | + if (count($tags) === 0) { |
|
362 | + continue; |
|
363 | + } |
|
360 | 364 | /** @var DocBlock\Tags\Var_ $return */ |
361 | 365 | $return = $tags[0]; |
362 | 366 | $this->addMultiline(':Type: ' . self::typesToRst($return->getType()) . ' ' . RstBuilder::escape($return->getDescription()), true); |
363 | 367 | break; |
364 | 368 | case 'throws': |
365 | - if (count($tags) === 0) continue; |
|
369 | + if (count($tags) === 0) { |
|
370 | + continue; |
|
371 | + } |
|
366 | 372 | /** @var Throws $tag */ |
367 | 373 | foreach ($tags as $tag) { |
368 | 374 | $this->addMultiline(':Throws: ' . $tag->getType() . ' ' . RstBuilder::escape($tag->getDescription()), true); |
369 | 375 | } |
370 | 376 | break; |
371 | 377 | case 'since': |
372 | - if (count($tags) === 0) continue; |
|
378 | + if (count($tags) === 0) { |
|
379 | + continue; |
|
380 | + } |
|
373 | 381 | /** @var Since $return */ |
374 | 382 | $return = $tags[0]; |
375 | 383 | $this->addMultiline(':Since: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
376 | 384 | break; |
377 | 385 | case 'deprecated': |
378 | - if (count($tags) === 0) continue; |
|
386 | + if (count($tags) === 0) { |
|
387 | + continue; |
|
388 | + } |
|
379 | 389 | /** @var Deprecated $return */ |
380 | 390 | $return = $tags[0]; |
381 | 391 | $this->addMultiline(':Deprecated: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
382 | 392 | break; |
383 | 393 | case 'see': |
384 | - if (count($tags) === 0) continue; |
|
394 | + if (count($tags) === 0) { |
|
395 | + continue; |
|
396 | + } |
|
385 | 397 | /** @var See $return */ |
386 | 398 | $return = $tags[0]; |
387 | 399 | $this->addMultiline(':See: ' . $return->getReference() . ' ' . RstBuilder::escape($return->getDescription()), true); |
388 | 400 | break; |
389 | 401 | case 'license': |
390 | - if (count($tags) === 0) continue; |
|
402 | + if (count($tags) === 0) { |
|
403 | + continue; |
|
404 | + } |
|
391 | 405 | /** @var DocBlock\Tags\BaseTag $return */ |
392 | 406 | $return = $tags[0]; |
393 | 407 | $this->addMultiline(':License: ' . RstBuilder::escape($return->getDescription()), true); |
@@ -421,8 +435,9 @@ discard block |
||
421 | 435 | $result .= $typeFull . ' | '; |
422 | 436 | continue; |
423 | 437 | } |
424 | - if (0 === strpos($type, '\\')) |
|
425 | - $type = substr($type, 1); |
|
438 | + if (0 === strpos($type, '\\')) { |
|
439 | + $type = substr($type, 1); |
|
440 | + } |
|
426 | 441 | $result .= ':any:`' . RstBuilder::escape($typeFull) . ' <' . RstBuilder::escape($type) . '>` | '; |
427 | 442 | } |
428 | 443 | return substr($result, 0, -3); |