mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 18:13:13 +00:00
[cs] finalize, spaces, concat and strict comparison
This commit is contained in:
committed by
Jaap van Otterdijk
parent
833126e6a3
commit
5ff9ca38c5
@@ -69,7 +69,7 @@ class Description
|
||||
$this->bodyTemplate = $bodyTemplate;
|
||||
$this->tags = $tags;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the tags for this DocBlock.
|
||||
*
|
||||
|
||||
@@ -77,7 +77,7 @@ final class Param extends BaseTag implements Factory\StaticMethod
|
||||
}
|
||||
|
||||
// if the next item starts with a $ or ...$ it must be the variable name
|
||||
if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] == '$' || substr($parts[0], 0, 4) === '...$')) {
|
||||
if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] === '$' || substr($parts[0], 0, 4) === '...$')) {
|
||||
$variableName = array_shift($parts);
|
||||
array_shift($parts);
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ class Property extends BaseTag implements Factory\StaticMethod
|
||||
}
|
||||
|
||||
// if the next item starts with a $ or ...$ it must be the variable name
|
||||
if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] == '$')) {
|
||||
if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] === '$')) {
|
||||
$variableName = array_shift($parts);
|
||||
array_shift($parts);
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ class PropertyRead extends BaseTag implements Factory\StaticMethod
|
||||
}
|
||||
|
||||
// if the next item starts with a $ or ...$ it must be the variable name
|
||||
if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] == '$')) {
|
||||
if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] === '$')) {
|
||||
$variableName = array_shift($parts);
|
||||
array_shift($parts);
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ class PropertyWrite extends BaseTag implements Factory\StaticMethod
|
||||
}
|
||||
|
||||
// if the next item starts with a $ or ...$ it must be the variable name
|
||||
if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] == '$')) {
|
||||
if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] === '$')) {
|
||||
$variableName = array_shift($parts);
|
||||
array_shift($parts);
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ class Var_ extends BaseTag implements Factory\StaticMethod
|
||||
}
|
||||
|
||||
// if the next item starts with a $ or ...$ it must be the variable name
|
||||
if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] == '$')) {
|
||||
if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] === '$')) {
|
||||
$variableName = array_shift($parts);
|
||||
array_shift($parts);
|
||||
|
||||
@@ -111,8 +111,8 @@ class Var_ extends BaseTag implements Factory\StaticMethod
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return ($this->type ? $this->type.' ' : '')
|
||||
.(empty($this->variableName) ? null : ('$'.$this->variableName))
|
||||
.($this->description ? ' '.$this->description : '');
|
||||
return ($this->type ? $this->type . ' ' : '')
|
||||
. (empty($this->variableName) ? null : ('$' . $this->variableName))
|
||||
. ($this->description ? ' ' . $this->description : '');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user