3 namespace mdref\Generator
;
6 use phpDocumentor\Reflection\
{DocBlock
, DocBlock\Tags
};
8 class Arg
extends Scrap
{
9 public function __toString() : string {
10 return parent
::toString(__FILE__
, __COMPILER_HALT_OFFSET__
, [
11 "tag" => $this->getParamTag($this->ref
->getName())
17 /** @var $gen Generator */
18 /** @var $ref \ReflectionParameter */
19 /** @var $doc ?DocBlock */
20 /** @var $tag ?Tags\Param */
23 <?
= $ref->hasType() ?
$ref->getType() : str_replace("\\ref", "", $tag?
->getType() ??
"mixed")
25 if ($ref->isVariadic()) : ?
>
28 if ($ref->isPassedByReference()) :
33 if ($ref->isDefaultValueAvailable()) :
34 ?
> = <?php
var_export($ref->getDefaultValue()) ?
><?php