@@ -249,7 +249,9 @@ discard block |
||
249 | 249 | foreach ($method->getArguments() as $argument) { |
250 | 250 | /** @var Param $param */ |
251 | 251 | $param = $params[$argument->getName()]; |
252 | - if ($param !== null) $this->addMultiline(':param ' . self::escape($param->getType()) . ' $' . $argument->getName() . ': ' . $param->getDescription(), true); |
|
252 | + if ($param !== null) { |
|
253 | + $this->addMultiline(':param ' . self::escape($param->getType()) . ' $' . $argument->getName() . ': ' . $param->getDescription(), true); |
|
254 | + } |
|
253 | 255 | } |
254 | 256 | } |
255 | 257 | $this->endPhpDomain('method'); |
@@ -312,44 +314,58 @@ discard block |
||
312 | 314 | $tags = $docBlock->getTagsByName($tagName); |
313 | 315 | switch ($tagName) { |
314 | 316 | case 'return': |
315 | - if (count($tags) === 0) continue; |
|
317 | + if (count($tags) === 0) { |
|
318 | + continue; |
|
319 | + } |
|
316 | 320 | /** @var Return_ $return */ |
317 | 321 | $return = $tags[0]; |
318 | 322 | $this->addMultiline(':Returns: ' . $return->getType() . ' ' . RstBuilder::escape($return->getDescription()), true); |
319 | 323 | break; |
320 | 324 | case 'var': |
321 | - if (count($tags) === 0) continue; |
|
325 | + if (count($tags) === 0) { |
|
326 | + continue; |
|
327 | + } |
|
322 | 328 | /** @var DocBlock\Tags\Var_ $return */ |
323 | 329 | $return = $tags[0]; |
324 | 330 | $this->addMultiline(':Type: ' . self::typesToRst($return->getType()) . ' ' . RstBuilder::escape($return->getDescription()), true); |
325 | 331 | break; |
326 | 332 | case 'throws': |
327 | - if (count($tags) === 0) continue; |
|
333 | + if (count($tags) === 0) { |
|
334 | + continue; |
|
335 | + } |
|
328 | 336 | /** @var Throws $tag */ |
329 | 337 | foreach ($tags as $tag) { |
330 | 338 | $this->addMultiline(':Throws: ' . $tag->getType() . ' ' . RstBuilder::escape($tag->getDescription()), true); |
331 | 339 | } |
332 | 340 | break; |
333 | 341 | case 'since': |
334 | - if (count($tags) === 0) continue; |
|
342 | + if (count($tags) === 0) { |
|
343 | + continue; |
|
344 | + } |
|
335 | 345 | /** @var Since $return */ |
336 | 346 | $return = $tags[0]; |
337 | 347 | $this->addMultiline(':Since: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
338 | 348 | break; |
339 | 349 | case 'deprecated': |
340 | - if (count($tags) === 0) continue; |
|
350 | + if (count($tags) === 0) { |
|
351 | + continue; |
|
352 | + } |
|
341 | 353 | /** @var Deprecated $return */ |
342 | 354 | $return = $tags[0]; |
343 | 355 | $this->addMultiline(':Deprecated: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
344 | 356 | break; |
345 | 357 | case 'see': |
346 | - if (count($tags) === 0) continue; |
|
358 | + if (count($tags) === 0) { |
|
359 | + continue; |
|
360 | + } |
|
347 | 361 | /** @var See $return */ |
348 | 362 | $return = $tags[0]; |
349 | 363 | $this->addMultiline(':See: ' . $return->getReference() . ' ' . RstBuilder::escape($return->getDescription()), true); |
350 | 364 | break; |
351 | 365 | case 'license': |
352 | - if (count($tags) === 0) continue; |
|
366 | + if (count($tags) === 0) { |
|
367 | + continue; |
|
368 | + } |
|
353 | 369 | /** @var DocBlock\Tags\BaseTag $return */ |
354 | 370 | $return = $tags[0]; |
355 | 371 | $this->addMultiline(':License: ' . RstBuilder::escape($return->getDescription()), true); |
@@ -379,8 +395,9 @@ discard block |
||
379 | 395 | $result .= $type . ' | '; |
380 | 396 | continue; |
381 | 397 | } |
382 | - if (0 === strpos($type, '\\')) |
|
383 | - $type = substr($type, 1); |
|
398 | + if (0 === strpos($type, '\\')) { |
|
399 | + $type = substr($type, 1); |
|
400 | + } |
|
384 | 401 | // we could use :any: here but resolve_any_xref is not implemented by sphinxcontrib.phpdomain |
385 | 402 | // FIXME: once https://github.com/markstory/sphinxcontrib-phpdomain/pull/14 is merged |
386 | 403 | // $result .= ':any:`' . RstBuilder::escape($type) . '` | '; |