mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 10:07:12 +00:00
add more unit tests and fixed the output v2
This commit is contained in:
@@ -140,11 +140,11 @@ final class Param extends TagWithType implements Factory\StaticMethod
|
||||
*/
|
||||
public function __toString() : string
|
||||
{
|
||||
return ($this->type ? $this->type . ' ' : '')
|
||||
return ($this->type ? $this->type . ($this->variableName ? ' ' : '') : '')
|
||||
. ($this->isReference() ? '&' : '')
|
||||
. ($this->isVariadic() ? '...' : '')
|
||||
. ($this->variableName ? '$' . $this->variableName : '')
|
||||
. ($this->description ? ($this->variableName ? ' ' : '') . $this->description : '');
|
||||
. (('' . $this->description) ? ' ' . $this->description : '');
|
||||
}
|
||||
|
||||
private static function strStartsWithVariable(string $str) : bool
|
||||
|
||||
@@ -98,8 +98,8 @@ final class Property extends TagWithType implements Factory\StaticMethod
|
||||
*/
|
||||
public function __toString() : string
|
||||
{
|
||||
return ($this->type ? $this->type . ' ' : '')
|
||||
return ($this->type ? $this->type . ($this->variableName ? ' ' : '') : '')
|
||||
. ($this->variableName ? '$' . $this->variableName : '')
|
||||
. ($this->description ? ($this->variableName ? ' ' : '') . $this->description : '');
|
||||
. (('' . $this->description) ? ' ' . $this->description : '');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,8 +98,8 @@ final class PropertyRead extends TagWithType implements Factory\StaticMethod
|
||||
*/
|
||||
public function __toString() : string
|
||||
{
|
||||
return ($this->type ? $this->type . ' ' : '')
|
||||
return ($this->type ? $this->type . ($this->variableName ? ' ' : '') : '')
|
||||
. ($this->variableName ? '$' . $this->variableName : '')
|
||||
. ($this->description ? ($this->variableName ? ' ' : '') . $this->description : '');
|
||||
. (('' . $this->description) ? ' ' . $this->description : '');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,8 +98,8 @@ final class PropertyWrite extends TagWithType implements Factory\StaticMethod
|
||||
*/
|
||||
public function __toString() : string
|
||||
{
|
||||
return ($this->type ? $this->type . ' ' : '')
|
||||
return ($this->type ? $this->type . ($this->variableName ? ' ' : '') : '')
|
||||
. ($this->variableName ? '$' . $this->variableName : '')
|
||||
. ($this->description ? ($this->variableName ? ' ' : '') . $this->description : '');
|
||||
. (('' . $this->description) ? ' ' . $this->description : '');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,8 +99,8 @@ final class Var_ extends TagWithType implements Factory\StaticMethod
|
||||
*/
|
||||
public function __toString() : string
|
||||
{
|
||||
return ($this->type ? $this->type . ' ' : '')
|
||||
return ($this->type ? $this->type . ($this->variableName ? ' ' : '') : '')
|
||||
. ($this->variableName ? '$' . $this->variableName : '')
|
||||
. ($this->description ? ($this->variableName ? ' ' : '') . $this->description : '');
|
||||
. (('' . $this->description) ? ' ' . $this->description : '');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user