mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 10:07:12 +00:00
Apply new code style
This commit is contained in:
+19
-19
@@ -1,4 +1,6 @@
|
||||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* This file is part of phpDocumentor.
|
||||
@@ -6,8 +8,6 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @copyright 2010-2018 Mike van Riel<[email protected]>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://phpdoc.org
|
||||
*/
|
||||
|
||||
@@ -41,8 +41,8 @@ final class DocBlock
|
||||
|
||||
/**
|
||||
* @param DocBlock\Tag[] $tags
|
||||
* @param Types\Context $context The context in which the DocBlock occurs.
|
||||
* @param Location $location The location within the file that this DocBlock occurs in.
|
||||
* @param Types\Context $context The context in which the DocBlock occurs.
|
||||
* @param Location $location The location within the file that this DocBlock occurs in.
|
||||
*/
|
||||
public function __construct(
|
||||
string $summary = '',
|
||||
@@ -55,25 +55,25 @@ final class DocBlock
|
||||
) {
|
||||
Assert::allIsInstanceOf($tags, Tag::class);
|
||||
|
||||
$this->summary = $summary;
|
||||
$this->summary = $summary;
|
||||
$this->description = $description ?: new DocBlock\Description('');
|
||||
foreach ($tags as $tag) {
|
||||
$this->addTag($tag);
|
||||
}
|
||||
|
||||
$this->context = $context;
|
||||
$this->context = $context;
|
||||
$this->location = $location;
|
||||
|
||||
$this->isTemplateEnd = $isTemplateEnd;
|
||||
$this->isTemplateEnd = $isTemplateEnd;
|
||||
$this->isTemplateStart = $isTemplateStart;
|
||||
}
|
||||
|
||||
public function getSummary(): string
|
||||
public function getSummary() : string
|
||||
{
|
||||
return $this->summary;
|
||||
}
|
||||
|
||||
public function getDescription(): DocBlock\Description
|
||||
public function getDescription() : DocBlock\Description
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
@@ -81,7 +81,7 @@ final class DocBlock
|
||||
/**
|
||||
* Returns the current context.
|
||||
*/
|
||||
public function getContext(): ?Types\Context
|
||||
public function getContext() : ?Types\Context
|
||||
{
|
||||
return $this->context;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ final class DocBlock
|
||||
/**
|
||||
* Returns the current location.
|
||||
*/
|
||||
public function getLocation(): ?Location
|
||||
public function getLocation() : ?Location
|
||||
{
|
||||
return $this->location;
|
||||
}
|
||||
@@ -113,7 +113,7 @@ final class DocBlock
|
||||
*
|
||||
* @see self::isTemplateEnd() for the check whether a closing marker was provided.
|
||||
*/
|
||||
public function isTemplateStart(): bool
|
||||
public function isTemplateStart() : bool
|
||||
{
|
||||
return $this->isTemplateStart;
|
||||
}
|
||||
@@ -123,7 +123,7 @@ final class DocBlock
|
||||
*
|
||||
* @see self::isTemplateStart() for a more complete description of the Docblock Template functionality.
|
||||
*/
|
||||
public function isTemplateEnd(): bool
|
||||
public function isTemplateEnd() : bool
|
||||
{
|
||||
return $this->isTemplateEnd;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ final class DocBlock
|
||||
*
|
||||
* @return Tag[]
|
||||
*/
|
||||
public function getTags(): array
|
||||
public function getTags() : array
|
||||
{
|
||||
return $this->tags;
|
||||
}
|
||||
@@ -146,7 +146,7 @@ final class DocBlock
|
||||
*
|
||||
* @return Tag[]
|
||||
*/
|
||||
public function getTagsByName(string $name): array
|
||||
public function getTagsByName(string $name) : array
|
||||
{
|
||||
$result = [];
|
||||
|
||||
@@ -167,7 +167,7 @@ final class DocBlock
|
||||
*
|
||||
* @param string $name Tag name to check for.
|
||||
*/
|
||||
public function hasTag(string $name): bool
|
||||
public function hasTag(string $name) : bool
|
||||
{
|
||||
/** @var Tag $tag */
|
||||
foreach ($this->getTags() as $tag) {
|
||||
@@ -184,7 +184,7 @@ final class DocBlock
|
||||
*
|
||||
* @param Tag $tagToRemove The tag to remove.
|
||||
*/
|
||||
public function removeTag(Tag $tagToRemove): void
|
||||
public function removeTag(Tag $tagToRemove) : void
|
||||
{
|
||||
foreach ($this->tags as $key => $tag) {
|
||||
if ($tag === $tagToRemove) {
|
||||
@@ -199,7 +199,7 @@ final class DocBlock
|
||||
*
|
||||
* @param Tag $tag The tag to add.
|
||||
*/
|
||||
private function addTag(Tag $tag): void
|
||||
private function addTag(Tag $tag) : void
|
||||
{
|
||||
$this->tags[] = $tag;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user