public function __toString()
{
$isNullableObjectParam = $this->getTypeHint() && $this->getTypeHint() instanceof Types\Object_ && $this->isOptional();
return sprintf('Parameter #%d [ %s %s%s%s%s$%s%s ]', $this->parameterIndex, $this->isVariadic() || $this->isOptional() ? '<optional>' : '<required>', $this->getTypeHint() ? ltrim($this->getTypeHint()->__toString(), '\\') . ' ' : '', $isNullableObjectParam ? 'or NULL ' : '', $this->isVariadic() ? '...' : '', $this->isPassedByReference() ? '&' : '', $this->getName(), $this->isOptional() && $this->isDefaultValueAvailable() ? ' = ' . $this->getDefaultValueAsString() : '');
}