@@ -333,44 +333,58 @@ discard block |
||
333 | 333 | $tags = $docBlock->getTagsByName($tagName); |
334 | 334 | switch ($tagName) { |
335 | 335 | case 'return': |
336 | - if (count($tags) === 0) continue; |
|
336 | + if (count($tags) === 0) { |
|
337 | + continue; |
|
338 | + } |
|
337 | 339 | /** @var Return_ $return */ |
338 | 340 | $return = $tags[0]; |
339 | 341 | $this->addMultiline(':Returns: ' . $return->getType() . ' ' . RstBuilder::escape($return->getDescription()), true); |
340 | 342 | break; |
341 | 343 | case 'var': |
342 | - if (count($tags) === 0) continue; |
|
344 | + if (count($tags) === 0) { |
|
345 | + continue; |
|
346 | + } |
|
343 | 347 | /** @var DocBlock\Tags\Var_ $return */ |
344 | 348 | $return = $tags[0]; |
345 | 349 | $this->addMultiline(':Type: ' . self::typesToRst($return->getType()) . ' ' . RstBuilder::escape($return->getDescription()), true); |
346 | 350 | break; |
347 | 351 | case 'throws': |
348 | - if (count($tags) === 0) continue; |
|
352 | + if (count($tags) === 0) { |
|
353 | + continue; |
|
354 | + } |
|
349 | 355 | /** @var Throws $tag */ |
350 | 356 | foreach ($tags as $tag) { |
351 | 357 | $this->addMultiline(':Throws: ' . $tag->getType() . ' ' . RstBuilder::escape($tag->getDescription()), true); |
352 | 358 | } |
353 | 359 | break; |
354 | 360 | case 'since': |
355 | - if (count($tags) === 0) continue; |
|
361 | + if (count($tags) === 0) { |
|
362 | + continue; |
|
363 | + } |
|
356 | 364 | /** @var Since $return */ |
357 | 365 | $return = $tags[0]; |
358 | 366 | $this->addMultiline(':Since: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
359 | 367 | break; |
360 | 368 | case 'deprecated': |
361 | - if (count($tags) === 0) continue; |
|
369 | + if (count($tags) === 0) { |
|
370 | + continue; |
|
371 | + } |
|
362 | 372 | /** @var Deprecated $return */ |
363 | 373 | $return = $tags[0]; |
364 | 374 | $this->addMultiline(':Deprecated: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
365 | 375 | break; |
366 | 376 | case 'see': |
367 | - if (count($tags) === 0) continue; |
|
377 | + if (count($tags) === 0) { |
|
378 | + continue; |
|
379 | + } |
|
368 | 380 | /** @var See $return */ |
369 | 381 | $return = $tags[0]; |
370 | 382 | $this->addMultiline(':See: ' . $return->getReference() . ' ' . RstBuilder::escape($return->getDescription()), true); |
371 | 383 | break; |
372 | 384 | case 'license': |
373 | - if (count($tags) === 0) continue; |
|
385 | + if (count($tags) === 0) { |
|
386 | + continue; |
|
387 | + } |
|
374 | 388 | /** @var DocBlock\Tags\BaseTag $return */ |
375 | 389 | $return = $tags[0]; |
376 | 390 | $this->addMultiline(':License: ' . RstBuilder::escape($return->getDescription()), true); |
@@ -400,8 +414,9 @@ discard block |
||
400 | 414 | $result .= $type . ' | '; |
401 | 415 | continue; |
402 | 416 | } |
403 | - if (0 === strpos($type, '\\')) |
|
404 | - $type = substr($type, 1); |
|
417 | + if (0 === strpos($type, '\\')) { |
|
418 | + $type = substr($type, 1); |
|
419 | + } |
|
405 | 420 | $result .= ':any:`' . RstBuilder::escape($type) . '` | '; |
406 | 421 | } |
407 | 422 | return substr($result, 0, -3); |