Laravel version update
Laravel version update
This commit is contained in:
@@ -24,7 +24,7 @@ final class DocBlock
|
||||
private $description = null;
|
||||
|
||||
/** @var Tag[] An array containing all the tags in this docblock; except inline. */
|
||||
private $tags = array();
|
||||
private $tags = [];
|
||||
|
||||
/** @var Types\Context Information about the context of this DocBlock. */
|
||||
private $context = null;
|
||||
@@ -55,8 +55,7 @@ final class DocBlock
|
||||
Location $location = null,
|
||||
$isTemplateStart = false,
|
||||
$isTemplateEnd = false
|
||||
)
|
||||
{
|
||||
) {
|
||||
Assert::string($summary);
|
||||
Assert::boolean($isTemplateStart);
|
||||
Assert::boolean($isTemplateEnd);
|
||||
@@ -171,11 +170,11 @@ final class DocBlock
|
||||
{
|
||||
Assert::string($name);
|
||||
|
||||
$result = array();
|
||||
$result = [];
|
||||
|
||||
/** @var Tag $tag */
|
||||
foreach ($this->getTags() as $tag) {
|
||||
if ($tag->getName() != $name) {
|
||||
if ($tag->getName() !== $name) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -198,7 +197,7 @@ final class DocBlock
|
||||
|
||||
/** @var Tag $tag */
|
||||
foreach ($this->getTags() as $tag) {
|
||||
if ($tag->getName() == $name) {
|
||||
if ($tag->getName() === $name) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -206,6 +205,23 @@ final class DocBlock
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a tag from this DocBlock.
|
||||
*
|
||||
* @param Tag $tag The tag to remove.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function removeTag(Tag $tagToRemove)
|
||||
{
|
||||
foreach ($this->tags as $key => $tag) {
|
||||
if ($tag === $tagToRemove) {
|
||||
unset($this->tags[$key]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a tag to this DocBlock.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user