3 namespace mdref\Generator
;
6 use phpDocumentor\Reflection\
{DocBlock
, DocBlock\Tags
};
8 class Prop
extends Scrap
{
9 public function __toString() : string {
10 return parent
::toString(__FILE__
, __COMPILER_HALT_OFFSET__
, [
11 "tag" => $this->getVarTag($this->ref
->getName())
17 /** @var $gen Generator */
18 /** @var $ref \ReflectionParameter */
19 /** @var $doc ?DocBlock */
20 /** @var $tag ?Tags\Param */
23 <?
= implode(" ", \Reflection
::getModifierNames($ref->getModifiers()))
24 ?
> <?
= $ref->hasType() ?
$ref->getType() : ($tag?
->getType() ??
"mixed")
25 ?
> $
<?
=$ref->getName() ?
><?php
26 if ($ref->hasDefaultValue()) :
27 ?
> = <?php
var_export($ref->getDefaultValue()) ?
><?php
30 if (($desc = $doc?
->getSummary())) :