public function __toString() : string
{
$string = '';
$typeObj = $this->getVariadicElementUnionType();
if (!$typeObj->isEmpty()) {
$string .= (string) $typeObj . ' ';
}
if ($this->isPassByReference()) {
$string .= '&';
}
$string .= "\${$this->getName()}";
if ($this->isVariadic()) {
$string .= ' ...';
}
if ($this->hasDefaultValue()) {
if ($this->getDefaultValue() instanceof \ast\Node) {
$string .= ' = null';
} else {
$string .= ' = ' . (string) $this->getDefaultValue();
}
}
return $string;
}