@@ 314-319 (lines=6) @@ | ||
311 | protected function addDocblockTag($tagName, DocBlock $docBlock) { |
|
312 | $tags = $docBlock->getTagsByName($tagName); |
|
313 | switch ($tagName) { |
|
314 | case 'return': |
|
315 | if (count($tags) === 0) continue; |
|
316 | /** @var Return_ $return */ |
|
317 | $return = $tags[0]; |
|
318 | $this->addMultiline(':Returns: ' . $return->getType() . ' ' . RstBuilder::escape($return->getDescription()), true); |
|
319 | break; |
|
320 | case 'var': |
|
321 | if (count($tags) === 0) continue; |
|
322 | /** @var DocBlock\Tags\Var_ $return */ |
|
@@ 320-325 (lines=6) @@ | ||
317 | $return = $tags[0]; |
|
318 | $this->addMultiline(':Returns: ' . $return->getType() . ' ' . RstBuilder::escape($return->getDescription()), true); |
|
319 | break; |
|
320 | case 'var': |
|
321 | if (count($tags) === 0) continue; |
|
322 | /** @var DocBlock\Tags\Var_ $return */ |
|
323 | $return = $tags[0]; |
|
324 | $this->addMultiline(':Type: ' . self::typesToRst($return->getType()) . ' ' . RstBuilder::escape($return->getDescription()), true); |
|
325 | break; |
|
326 | case 'throws': |
|
327 | if (count($tags) === 0) continue; |
|
328 | /** @var Throws $tag */ |
|
@@ 326-332 (lines=7) @@ | ||
323 | $return = $tags[0]; |
|
324 | $this->addMultiline(':Type: ' . self::typesToRst($return->getType()) . ' ' . RstBuilder::escape($return->getDescription()), true); |
|
325 | break; |
|
326 | case 'throws': |
|
327 | if (count($tags) === 0) continue; |
|
328 | /** @var Throws $tag */ |
|
329 | foreach ($tags as $tag) { |
|
330 | $this->addMultiline(':Throws: ' . $tag->getType() . ' ' . RstBuilder::escape($tag->getDescription()), true); |
|
331 | } |
|
332 | break; |
|
333 | case 'since': |
|
334 | if (count($tags) === 0) continue; |
|
335 | /** @var Since $return */ |
|
@@ 333-338 (lines=6) @@ | ||
330 | $this->addMultiline(':Throws: ' . $tag->getType() . ' ' . RstBuilder::escape($tag->getDescription()), true); |
|
331 | } |
|
332 | break; |
|
333 | case 'since': |
|
334 | if (count($tags) === 0) continue; |
|
335 | /** @var Since $return */ |
|
336 | $return = $tags[0]; |
|
337 | $this->addMultiline(':Since: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
|
338 | break; |
|
339 | case 'deprecated': |
|
340 | if (count($tags) === 0) continue; |
|
341 | /** @var Deprecated $return */ |
|
@@ 339-344 (lines=6) @@ | ||
336 | $return = $tags[0]; |
|
337 | $this->addMultiline(':Since: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
|
338 | break; |
|
339 | case 'deprecated': |
|
340 | if (count($tags) === 0) continue; |
|
341 | /** @var Deprecated $return */ |
|
342 | $return = $tags[0]; |
|
343 | $this->addMultiline(':Deprecated: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
|
344 | break; |
|
345 | case 'see': |
|
346 | if (count($tags) === 0) continue; |
|
347 | /** @var See $return */ |
|
@@ 345-350 (lines=6) @@ | ||
342 | $return = $tags[0]; |
|
343 | $this->addMultiline(':Deprecated: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true); |
|
344 | break; |
|
345 | case 'see': |
|
346 | if (count($tags) === 0) continue; |
|
347 | /** @var See $return */ |
|
348 | $return = $tags[0]; |
|
349 | $this->addMultiline(':See: ' . $return->getReference() . ' ' . RstBuilder::escape($return->getDescription()), true); |
|
350 | break; |
|
351 | case 'license': |
|
352 | if (count($tags) === 0) continue; |
|
353 | /** @var DocBlock\Tags\BaseTag $return */ |
|
@@ 351-356 (lines=6) @@ | ||
348 | $return = $tags[0]; |
|
349 | $this->addMultiline(':See: ' . $return->getReference() . ' ' . RstBuilder::escape($return->getDescription()), true); |
|
350 | break; |
|
351 | case 'license': |
|
352 | if (count($tags) === 0) continue; |
|
353 | /** @var DocBlock\Tags\BaseTag $return */ |
|
354 | $return = $tags[0]; |
|
355 | $this->addMultiline(':License: ' . RstBuilder::escape($return->getDescription()), true); |
|
356 | break; |
|
357 | case 'param': |
|
358 | // param handling is done by subclasses since it is more that docbook parsing |
|
359 | break; |