composer update

This commit is contained in:
2020-05-10 09:29:56 +00:00
parent c6f807ebad
commit 8e93eececf
919 changed files with 11790 additions and 7005 deletions

View File

@@ -1,12 +1,13 @@
<?php
declare(strict_types=1);
/**
* This file is part of phpDocumentor.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @copyright 2010-2015 Mike van Riel<mike@phpdoc.org>
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
@@ -14,7 +15,7 @@ namespace phpDocumentor\Reflection\DocBlock;
use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
use phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter;
use Webmozart\Assert\Assert;
use function vsprintf;
/**
* Object representing to description for a DocBlock.
@@ -59,15 +60,20 @@ class Description
/**
* Initializes a Description with its body (template) and a listing of the tags used in the body template.
*
* @param string $bodyTemplate
* @param Tag[] $tags
*/
public function __construct($bodyTemplate, array $tags = [])
public function __construct(string $bodyTemplate, array $tags = [])
{
Assert::string($bodyTemplate);
$this->bodyTemplate = $bodyTemplate;
$this->tags = $tags;
$this->tags = $tags;
}
/**
* Returns the body template.
*/
public function getBodyTemplate() : string
{
return $this->bodyTemplate;
}
/**
@@ -75,7 +81,7 @@ class Description
*
* @return Tag[]
*/
public function getTags()
public function getTags() : array
{
return $this->tags;
}
@@ -83,12 +89,8 @@ class Description
/**
* Renders this description as a string where the provided formatter will format the tags in the expected string
* format.
*
* @param Formatter|null $formatter
*
* @return string
*/
public function render(Formatter $formatter = null)
public function render(?Formatter $formatter = null) : string
{
if ($formatter === null) {
$formatter = new PassthroughFormatter();
@@ -104,10 +106,8 @@ class Description
/**
* Returns a plain string representation of this description.
*
* @return string
*/
public function __toString()
public function __toString() : string
{
return $this->render();
}