mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
Apply new code style
This commit is contained in:
@@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<ruleset name="phpDocumentor">
|
||||||
|
<description>The coding standard for phpDocumentor.</description>
|
||||||
|
|
||||||
|
<file>src</file>
|
||||||
|
<file>tests/unit</file>
|
||||||
|
<exclude-pattern>*/tests/unit/Types/ContextFactoryTest.php</exclude-pattern>
|
||||||
|
<arg value="p"/>
|
||||||
|
<rule ref="PSR2">
|
||||||
|
<include-pattern>*\.php</include-pattern>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<rule ref="Doctrine">
|
||||||
|
<exclude name="SlevomatCodingStandard.TypeHints.UselessConstantTypeHint.UselessDocComment" />
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
|
||||||
|
<exclude-pattern>*/src/*_.php</exclude-pattern>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<rule ref="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming.SuperfluousPrefix">
|
||||||
|
<exclude-pattern>*/src/*/Abstract*.php</exclude-pattern>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<rule ref="Generic.Formatting.SpaceAfterNot">
|
||||||
|
<properties>
|
||||||
|
<property name="spacing" value="0" />
|
||||||
|
</properties>
|
||||||
|
</rule>
|
||||||
|
</ruleset>
|
||||||
+3
-3
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -15,6 +15,7 @@ namespace phpDocumentor\Reflection\DocBlock;
|
|||||||
|
|
||||||
use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
|
use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
|
||||||
use phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter;
|
use phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter;
|
||||||
|
use function vsprintf;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Object representing to description for a DocBlock.
|
* Object representing to description for a DocBlock.
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,14 +8,24 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace phpDocumentor\Reflection\DocBlock;
|
namespace phpDocumentor\Reflection\DocBlock;
|
||||||
|
|
||||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||||
|
use const PREG_SPLIT_DELIM_CAPTURE;
|
||||||
|
use function count;
|
||||||
|
use function explode;
|
||||||
|
use function implode;
|
||||||
|
use function ltrim;
|
||||||
|
use function min;
|
||||||
|
use function preg_split;
|
||||||
|
use function str_replace;
|
||||||
|
use function strlen;
|
||||||
|
use function strpos;
|
||||||
|
use function substr;
|
||||||
|
use function trim;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new Description object given a body of text.
|
* Creates a new Description object given a body of text.
|
||||||
@@ -58,7 +70,6 @@ class DescriptionFactory
|
|||||||
/**
|
/**
|
||||||
* Strips the contents from superfluous whitespace and splits the description into a series of tokens.
|
* Strips the contents from superfluous whitespace and splits the description into a series of tokens.
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @return string[] A series of tokens of which the description text is composed.
|
* @return string[] A series of tokens of which the description text is composed.
|
||||||
*/
|
*/
|
||||||
private function lex(string $contents) : array
|
private function lex(string $contents) : array
|
||||||
@@ -108,7 +119,7 @@ class DescriptionFactory
|
|||||||
*
|
*
|
||||||
* @return string[]|Tag[]
|
* @return string[]|Tag[]
|
||||||
*/
|
*/
|
||||||
private function parse($tokens, ?TypeContext $context = null): array
|
private function parse(array $tokens, ?TypeContext $context = null) : array
|
||||||
{
|
{
|
||||||
$count = count($tokens);
|
$count = count($tokens);
|
||||||
$tagCount = 0;
|
$tagCount = 0;
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,14 +8,21 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace phpDocumentor\Reflection\DocBlock;
|
namespace phpDocumentor\Reflection\DocBlock;
|
||||||
|
|
||||||
use phpDocumentor\Reflection\DocBlock\Tags\Example;
|
use phpDocumentor\Reflection\DocBlock\Tags\Example;
|
||||||
|
use const DIRECTORY_SEPARATOR;
|
||||||
|
use function array_slice;
|
||||||
|
use function file;
|
||||||
|
use function getcwd;
|
||||||
|
use function implode;
|
||||||
|
use function is_readable;
|
||||||
|
use function rtrim;
|
||||||
|
use function sprintf;
|
||||||
|
use function trim;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class used to find an example file's location based on a given ExampleDescriptor.
|
* Class used to find an example file's location based on a given ExampleDescriptor.
|
||||||
@@ -35,7 +44,7 @@ class ExampleFinder
|
|||||||
|
|
||||||
$file = $this->getExampleFileContents($filename);
|
$file = $this->getExampleFileContents($filename);
|
||||||
if (!$file) {
|
if (!$file) {
|
||||||
return "** File not found : {$filename} **";
|
return sprintf('** File not found : %s **', $filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
return implode('', array_slice($file, $example->getStartingLine() - 1, $example->getLineCount()));
|
return implode('', array_slice($file, $example->getStartingLine() - 1, $example->getLineCount()));
|
||||||
@@ -72,7 +81,7 @@ class ExampleFinder
|
|||||||
*
|
*
|
||||||
* @return string[]
|
* @return string[]
|
||||||
*/
|
*/
|
||||||
public function getExampleDirectories()
|
public function getExampleDirectories() : array
|
||||||
{
|
{
|
||||||
return $this->exampleDirectories;
|
return $this->exampleDirectories;
|
||||||
}
|
}
|
||||||
|
|||||||
+44
-22
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,14 +8,19 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace phpDocumentor\Reflection\DocBlock;
|
namespace phpDocumentor\Reflection\DocBlock;
|
||||||
|
|
||||||
use phpDocumentor\Reflection\DocBlock;
|
use phpDocumentor\Reflection\DocBlock;
|
||||||
|
use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
|
||||||
|
use phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter;
|
||||||
|
use function sprintf;
|
||||||
|
use function str_repeat;
|
||||||
|
use function str_replace;
|
||||||
|
use function strlen;
|
||||||
|
use function wordwrap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts a DocBlock back from an object to a complete DocComment including Asterisks.
|
* Converts a DocBlock back from an object to a complete DocComment including Asterisks.
|
||||||
@@ -32,7 +39,7 @@ class Serializer
|
|||||||
/** @var int|null The max length of a line. */
|
/** @var int|null The max length of a line. */
|
||||||
protected $lineLength;
|
protected $lineLength;
|
||||||
|
|
||||||
/** @var DocBlock\Tags\Formatter A custom tag formatter. */
|
/** @var Formatter A custom tag formatter. */
|
||||||
protected $tagFormatter;
|
protected $tagFormatter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,15 +49,20 @@ class Serializer
|
|||||||
* @param string $indentString The string to indent the comment with.
|
* @param string $indentString The string to indent the comment with.
|
||||||
* @param bool $indentFirstLine Whether to indent the first line.
|
* @param bool $indentFirstLine Whether to indent the first line.
|
||||||
* @param int|null $lineLength The max length of a line or NULL to disable line wrapping.
|
* @param int|null $lineLength The max length of a line or NULL to disable line wrapping.
|
||||||
* @param DocBlock\Tags\Formatter $tagFormatter A custom tag formatter, defaults to PassthroughFormatter.
|
* @param Formatter $tagFormatter A custom tag formatter, defaults to PassthroughFormatter.
|
||||||
*/
|
*/
|
||||||
public function __construct(int $indent = 0, string $indentString = ' ', bool $indentFirstLine = true, ?int $lineLength = null, ?DocBlock\Tags\Formatter $tagFormatter = null)
|
public function __construct(
|
||||||
{
|
int $indent = 0,
|
||||||
|
string $indentString = ' ',
|
||||||
|
bool $indentFirstLine = true,
|
||||||
|
?int $lineLength = null,
|
||||||
|
?Formatter $tagFormatter = null
|
||||||
|
) {
|
||||||
$this->indent = $indent;
|
$this->indent = $indent;
|
||||||
$this->indentString = $indentString;
|
$this->indentString = $indentString;
|
||||||
$this->isFirstLineIndented = $indentFirstLine;
|
$this->isFirstLineIndented = $indentFirstLine;
|
||||||
$this->lineLength = $lineLength;
|
$this->lineLength = $lineLength;
|
||||||
$this->tagFormatter = $tagFormatter ?: new DocBlock\Tags\Formatter\PassthroughFormatter();
|
$this->tagFormatter = $tagFormatter ?: new PassthroughFormatter();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -75,35 +87,41 @@ class Serializer
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$comment = "{$firstIndent}/**\n";
|
$comment = $firstIndent . "/**\n";
|
||||||
if ($text) {
|
if ($text) {
|
||||||
$comment .= "{$indent} * {$text}\n";
|
$comment .= $indent . ' * ' . $text . "\n";
|
||||||
$comment .= "{$indent} *\n";
|
$comment .= $indent . " *\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$comment = $this->addTagBlock($docblock, $wrapLength, $indent, $comment);
|
$comment = $this->addTagBlock($docblock, $wrapLength, $indent, $comment);
|
||||||
$comment .= $indent . ' */';
|
return $comment . $indent . ' */';
|
||||||
|
|
||||||
return $comment;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
private function removeTrailingSpaces($indent, $text)
|
private function removeTrailingSpaces(string $indent, string $text)
|
||||||
{
|
{
|
||||||
return str_replace("\n{$indent} * \n", "\n{$indent} *\n", $text);
|
return str_replace(
|
||||||
|
sprintf("\n%s * \n", $indent),
|
||||||
|
sprintf("\n%s *\n", $indent),
|
||||||
|
$text
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
private function addAsterisksForEachLine($indent, $text)
|
private function addAsterisksForEachLine(string $indent, string $text)
|
||||||
{
|
{
|
||||||
return str_replace("\n", "\n{$indent} * ", $text);
|
return str_replace(
|
||||||
|
"\n",
|
||||||
|
sprintf("\n%s * ", $indent),
|
||||||
|
$text
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getSummaryAndDescriptionTextBlock(DocBlock $docblock, $wrapLength): string
|
private function getSummaryAndDescriptionTextBlock(DocBlock $docblock, ?int $wrapLength) : string
|
||||||
{
|
{
|
||||||
$text = $docblock->getSummary() . ((string) $docblock->getDescription() ? "\n\n" . $docblock->getDescription()
|
$text = $docblock->getSummary() . ((string) $docblock->getDescription() ? "\n\n" . $docblock->getDescription()
|
||||||
: '');
|
: '');
|
||||||
@@ -115,7 +133,7 @@ class Serializer
|
|||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function addTagBlock(DocBlock $docblock, $wrapLength, $indent, $comment): string
|
private function addTagBlock(DocBlock $docblock, ?int $wrapLength, string $indent, string $comment) : string
|
||||||
{
|
{
|
||||||
foreach ($docblock->getTags() as $tag) {
|
foreach ($docblock->getTags() as $tag) {
|
||||||
$tagText = $this->tagFormatter->format($tag);
|
$tagText = $this->tagFormatter->format($tag);
|
||||||
@@ -123,9 +141,13 @@ class Serializer
|
|||||||
$tagText = wordwrap($tagText, $wrapLength);
|
$tagText = wordwrap($tagText, $wrapLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
$tagText = str_replace("\n", "\n{$indent} * ", $tagText);
|
$tagText = str_replace(
|
||||||
|
"\n",
|
||||||
|
sprintf("\n%s * ", $indent),
|
||||||
|
$tagText
|
||||||
|
);
|
||||||
|
|
||||||
$comment .= "{$indent} * {$tagText}\n";
|
$comment .= sprintf("%s * %s\n", $indent, $tagText);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $comment;
|
return $comment;
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,18 +8,26 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace phpDocumentor\Reflection\DocBlock;
|
namespace phpDocumentor\Reflection\DocBlock;
|
||||||
|
|
||||||
|
use InvalidArgumentException;
|
||||||
use phpDocumentor\Reflection\DocBlock\Tags\Factory\StaticMethod;
|
use phpDocumentor\Reflection\DocBlock\Tags\Factory\StaticMethod;
|
||||||
use phpDocumentor\Reflection\DocBlock\Tags\Generic;
|
use phpDocumentor\Reflection\DocBlock\Tags\Generic;
|
||||||
use phpDocumentor\Reflection\FqsenResolver;
|
use phpDocumentor\Reflection\FqsenResolver;
|
||||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||||
|
use ReflectionMethod;
|
||||||
|
use ReflectionParameter;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
use function array_merge;
|
||||||
|
use function array_slice;
|
||||||
|
use function call_user_func_array;
|
||||||
|
use function count;
|
||||||
|
use function get_class;
|
||||||
|
use function preg_match;
|
||||||
|
use function strpos;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a Tag object given the contents of a tag.
|
* Creates a Tag object given the contents of a tag.
|
||||||
@@ -42,7 +52,8 @@ final class StandardTagFactory implements TagFactory
|
|||||||
public const REGEX_TAGNAME = '[\w\-\_\\\\]+';
|
public const REGEX_TAGNAME = '[\w\-\_\\\\]+';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string[] An array with a tag as a key, and an FQCN to a class that handles it as an array value.
|
* @var string[] An array with a tag as a key, and an
|
||||||
|
* FQCN to a class that handles it as an array value.
|
||||||
*/
|
*/
|
||||||
private $tagHandlerMappings = [
|
private $tagHandlerMappings = [
|
||||||
'author' => '\phpDocumentor\Reflection\DocBlock\Tags\Author',
|
'author' => '\phpDocumentor\Reflection\DocBlock\Tags\Author',
|
||||||
@@ -67,13 +78,18 @@ final class StandardTagFactory implements TagFactory
|
|||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \ReflectionParameter[][] a lazy-loading cache containing parameters for each tagHandler that has been used.
|
* @var string[] An array with a anotation s a key, and an
|
||||||
|
* FQCN to a class that handles it as an array value.
|
||||||
|
*/
|
||||||
|
private $annotationMappings = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var ReflectionParameter[][] a lazy-loading cache containing parameters
|
||||||
|
* for each tagHandler that has been used.
|
||||||
*/
|
*/
|
||||||
private $tagHandlerParameterCache = [];
|
private $tagHandlerParameterCache = [];
|
||||||
|
|
||||||
/**
|
/** @var FqsenResolver */
|
||||||
* @var FqsenResolver
|
|
||||||
*/
|
|
||||||
private $fqsenResolver;
|
private $fqsenResolver;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -88,9 +104,9 @@ final class StandardTagFactory implements TagFactory
|
|||||||
* If no tag handlers are provided than the default list in the {@see self::$tagHandlerMappings} property
|
* If no tag handlers are provided than the default list in the {@see self::$tagHandlerMappings} property
|
||||||
* is used.
|
* is used.
|
||||||
*
|
*
|
||||||
* @param string[] $tagHandlers
|
|
||||||
*
|
|
||||||
* @see self::registerTagHandler() to add a new tag handler to the existing default list.
|
* @see self::registerTagHandler() to add a new tag handler to the existing default list.
|
||||||
|
*
|
||||||
|
* @param string[] $tagHandlers
|
||||||
*/
|
*/
|
||||||
public function __construct(FqsenResolver $fqsenResolver, ?array $tagHandlers = null)
|
public function __construct(FqsenResolver $fqsenResolver, ?array $tagHandlers = null)
|
||||||
{
|
{
|
||||||
@@ -113,8 +129,8 @@ final class StandardTagFactory implements TagFactory
|
|||||||
|
|
||||||
[$tagName, $tagBody] = $this->extractTagParts($tagLine);
|
[$tagName, $tagBody] = $this->extractTagParts($tagLine);
|
||||||
|
|
||||||
if ($tagBody !== '' && $tagBody[0] === '[') {
|
if ($tagBody !== '' && strpos($tagBody, '[') === 0) {
|
||||||
throw new \InvalidArgumentException(
|
throw new InvalidArgumentException(
|
||||||
'The tag "' . $tagLine . '" does not seem to be wellformed, please check it for errors'
|
'The tag "' . $tagLine . '" does not seem to be wellformed, please check it for errors'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -149,7 +165,7 @@ final class StandardTagFactory implements TagFactory
|
|||||||
Assert::implementsInterface($handler, StaticMethod::class);
|
Assert::implementsInterface($handler, StaticMethod::class);
|
||||||
|
|
||||||
if (strpos($tagName, '\\') && $tagName[0] !== '\\') {
|
if (strpos($tagName, '\\') && $tagName[0] !== '\\') {
|
||||||
throw new \InvalidArgumentException(
|
throw new InvalidArgumentException(
|
||||||
'A namespaced tag must have a leading backslash as it must be fully qualified'
|
'A namespaced tag must have a leading backslash as it must be fully qualified'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -160,14 +176,13 @@ final class StandardTagFactory implements TagFactory
|
|||||||
/**
|
/**
|
||||||
* Extracts all components for a tag.
|
* Extracts all components for a tag.
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @return string[]
|
* @return string[]
|
||||||
*/
|
*/
|
||||||
private function extractTagParts(string $tagLine) : array
|
private function extractTagParts(string $tagLine) : array
|
||||||
{
|
{
|
||||||
$matches = [];
|
$matches = [];
|
||||||
if (!preg_match('/^@(' . self::REGEX_TAGNAME . ')(?:\s*([^\s].*)|$)/us', $tagLine, $matches)) {
|
if (!preg_match('/^@(' . self::REGEX_TAGNAME . ')(?:\s*([^\s].*)|$)/us', $tagLine, $matches)) {
|
||||||
throw new \InvalidArgumentException(
|
throw new InvalidArgumentException(
|
||||||
'The tag "' . $tagLine . '" does not seem to be wellformed, please check it for errors'
|
'The tag "' . $tagLine . '" does not seem to be wellformed, please check it for errors'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -193,7 +208,7 @@ final class StandardTagFactory implements TagFactory
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
return call_user_func_array([$handlerClassName, 'create'], $arguments);
|
return call_user_func_array([$handlerClassName, 'create'], $arguments);
|
||||||
} catch (\InvalidArgumentException $e) {
|
} catch (InvalidArgumentException $e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -208,10 +223,10 @@ final class StandardTagFactory implements TagFactory
|
|||||||
$handlerClassName = $this->tagHandlerMappings[$tagName];
|
$handlerClassName = $this->tagHandlerMappings[$tagName];
|
||||||
} elseif ($this->isAnnotation($tagName)) {
|
} elseif ($this->isAnnotation($tagName)) {
|
||||||
// TODO: Annotation support is planned for a later stage and as such is disabled for now
|
// TODO: Annotation support is planned for a later stage and as such is disabled for now
|
||||||
// $tagName = (string)$this->fqsenResolver->resolve($tagName, $context);
|
$tagName = (string) $this->fqsenResolver->resolve($tagName, $context);
|
||||||
// if (isset($this->annotationMappings[$tagName])) {
|
if (isset($this->annotationMappings[$tagName])) {
|
||||||
// $handlerClassName = $this->annotationMappings[$tagName];
|
$handlerClassName = $this->annotationMappings[$tagName];
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $handlerClassName;
|
return $handlerClassName;
|
||||||
@@ -220,16 +235,16 @@ final class StandardTagFactory implements TagFactory
|
|||||||
/**
|
/**
|
||||||
* Retrieves the arguments that need to be passed to the Factory Method with the given Parameters.
|
* Retrieves the arguments that need to be passed to the Factory Method with the given Parameters.
|
||||||
*
|
*
|
||||||
* @param \ReflectionParameter[] $parameters
|
* @param ReflectionParameter[] $parameters
|
||||||
* @param mixed[] $locator
|
* @param mixed[] $locator
|
||||||
*
|
*
|
||||||
* @return mixed[] A series of values that can be passed to the Factory Method of the tag whose parameters
|
* @return mixed[] A series of values that can be passed to the Factory Method of the tag whose parameters
|
||||||
* is provided with this method.
|
* is provided with this method.
|
||||||
*/
|
*/
|
||||||
private function getArgumentsForParametersFromWiring($parameters, $locator): array
|
private function getArgumentsForParametersFromWiring(array $parameters, array $locator) : array
|
||||||
{
|
{
|
||||||
$arguments = [];
|
$arguments = [];
|
||||||
foreach ($parameters as $index => $parameter) {
|
foreach ($parameters as $parameter) {
|
||||||
$typeHint = $parameter->getClass() ? $parameter->getClass()->getName() : null;
|
$typeHint = $parameter->getClass() ? $parameter->getClass()->getName() : null;
|
||||||
if (isset($locator[$typeHint])) {
|
if (isset($locator[$typeHint])) {
|
||||||
$arguments[] = $locator[$typeHint];
|
$arguments[] = $locator[$typeHint];
|
||||||
@@ -252,13 +267,12 @@ final class StandardTagFactory implements TagFactory
|
|||||||
* Retrieves a series of ReflectionParameter objects for the static 'create' method of the given
|
* Retrieves a series of ReflectionParameter objects for the static 'create' method of the given
|
||||||
* tag handler class name.
|
* tag handler class name.
|
||||||
*
|
*
|
||||||
*
|
* @return ReflectionParameter[]
|
||||||
* @return \ReflectionParameter[]
|
|
||||||
*/
|
*/
|
||||||
private function fetchParametersForHandlerFactoryMethod(string $handlerClassName) : array
|
private function fetchParametersForHandlerFactoryMethod(string $handlerClassName) : array
|
||||||
{
|
{
|
||||||
if (!isset($this->tagHandlerParameterCache[$handlerClassName])) {
|
if (!isset($this->tagHandlerParameterCache[$handlerClassName])) {
|
||||||
$methodReflection = new \ReflectionMethod($handlerClassName, 'create');
|
$methodReflection = new ReflectionMethod($handlerClassName, 'create');
|
||||||
$this->tagHandlerParameterCache[$handlerClassName] = $methodReflection->getParameters();
|
$this->tagHandlerParameterCache[$handlerClassName] = $methodReflection->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -266,18 +280,24 @@ final class StandardTagFactory implements TagFactory
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a copy of this class' Service Locator with added dynamic parameters, such as the tag's name, body and
|
* Returns a copy of this class' Service Locator with added dynamic parameters,
|
||||||
* Context.
|
* such as the tag's name, body and Context.
|
||||||
*
|
*
|
||||||
* @param TypeContext $context The Context (namespace and aliasses) that may be passed and is used to resolve FQSENs.
|
* @param TypeContext $context The Context (namespace and aliasses) that may be
|
||||||
* @param string $tagName The name of the tag that may be passed onto the factory method of the Tag class.
|
* passed and is used to resolve FQSENs.
|
||||||
* @param string $tagBody The body of the tag that may be passed onto the factory method of the Tag class.
|
* @param string $tagName The name of the tag that may be
|
||||||
|
* passed onto the factory method of the Tag class.
|
||||||
|
* @param string $tagBody The body of the tag that may be
|
||||||
|
* passed onto the factory method of the Tag class.
|
||||||
*
|
*
|
||||||
* @return mixed[]
|
* @return mixed[]
|
||||||
*/
|
*/
|
||||||
private function getServiceLocatorWithDynamicParameters(TypeContext $context, string $tagName, string $tagBody): array
|
private function getServiceLocatorWithDynamicParameters(
|
||||||
{
|
TypeContext $context,
|
||||||
$locator = array_merge(
|
string $tagName,
|
||||||
|
string $tagBody
|
||||||
|
) : array {
|
||||||
|
return array_merge(
|
||||||
$this->serviceLocator,
|
$this->serviceLocator,
|
||||||
[
|
[
|
||||||
'name' => $tagName,
|
'name' => $tagName,
|
||||||
@@ -285,14 +305,11 @@ final class StandardTagFactory implements TagFactory
|
|||||||
TypeContext::class => $context,
|
TypeContext::class => $context,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
return $locator;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether the given tag belongs to an annotation.
|
* Returns whether the given tag belongs to an annotation.
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @todo this method should be populated once we implement Annotation notation support.
|
* @todo this method should be populated once we implement Annotation notation support.
|
||||||
*/
|
*/
|
||||||
private function isAnnotation(string $tagContent) : bool
|
private function isAnnotation(string $tagContent) : bool
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
+27
-28
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,13 +8,12 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace phpDocumentor\Reflection\DocBlock;
|
namespace phpDocumentor\Reflection\DocBlock;
|
||||||
|
|
||||||
|
use InvalidArgumentException;
|
||||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||||
|
|
||||||
interface TagFactory
|
interface TagFactory
|
||||||
@@ -39,6 +40,17 @@ interface TagFactory
|
|||||||
*/
|
*/
|
||||||
public function addParameter(string $name, $value) : void;
|
public function addParameter(string $name, $value) : void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Factory method responsible for instantiating the correct sub type.
|
||||||
|
*
|
||||||
|
* @param string $tagLine The text for this tag, including description.
|
||||||
|
*
|
||||||
|
* @return Tag A new tag object.
|
||||||
|
*
|
||||||
|
* @throws InvalidArgumentException If an invalid tag line was presented.
|
||||||
|
*/
|
||||||
|
public function create(string $tagLine, ?TypeContext $context = null) : ?Tag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers a service with the Service Locator using the FQCN of the class or the alias, if provided.
|
* Registers a service with the Service Locator using the FQCN of the class or the alias, if provided.
|
||||||
*
|
*
|
||||||
@@ -47,39 +59,26 @@ interface TagFactory
|
|||||||
*
|
*
|
||||||
* Because interfaces are regularly used as type-hints this method provides an alias parameter; if the FQCN of the
|
* Because interfaces are regularly used as type-hints this method provides an alias parameter; if the FQCN of the
|
||||||
* interface is passed as alias then every time that interface is requested the provided service will be returned.
|
* interface is passed as alias then every time that interface is requested the provided service will be returned.
|
||||||
*
|
|
||||||
* @param object $service
|
|
||||||
*/
|
*/
|
||||||
public function addService($service): void;
|
public function addService(object $service) : void;
|
||||||
|
|
||||||
/**
|
|
||||||
* Factory method responsible for instantiating the correct sub type.
|
|
||||||
*
|
|
||||||
* @param string $tagLine The text for this tag, including description.
|
|
||||||
*
|
|
||||||
* @throws \InvalidArgumentException if an invalid tag line was presented.
|
|
||||||
*
|
|
||||||
* @return Tag A new tag object.
|
|
||||||
*/
|
|
||||||
public function create(string $tagLine, ?TypeContext $context = null): ?Tag;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers a handler for tags.
|
* Registers a handler for tags.
|
||||||
*
|
*
|
||||||
* If you want to use your own tags then you can use this method to instruct the TagFactory to register the name
|
* If you want to use your own tags then you can use this method to instruct the TagFactory
|
||||||
* of a tag with the FQCN of a 'Tag Handler'. The Tag handler should implement the {@see Tag} interface (and thus
|
* to register the name of a tag with the FQCN of a 'Tag Handler'. The Tag handler should implement
|
||||||
* the create method).
|
* the {@see Tag} interface (and thus the create method).
|
||||||
*
|
*
|
||||||
* @param string $tagName Name of tag to register a handler for. When registering a namespaced tag, the full
|
* @param string $tagName Name of tag to register a handler for. When registering a namespaced tag,
|
||||||
* name, along with a prefixing slash MUST be provided.
|
* the full name, along with a prefixing slash MUST be provided.
|
||||||
* @param string $handler FQCN of handler.
|
* @param string $handler FQCN of handler.
|
||||||
*
|
*
|
||||||
* @throws \InvalidArgumentException if the tag name is not a string
|
* @throws InvalidArgumentException If the tag name is not a string.
|
||||||
* @throws \InvalidArgumentException if the tag name is namespaced (contains backslashes) but does not start with
|
* @throws InvalidArgumentException If the tag name is namespaced (contains backslashes) but
|
||||||
* a backslash
|
* does not start with a backslash.
|
||||||
* @throws \InvalidArgumentException if the handler is not a string
|
* @throws InvalidArgumentException If the handler is not a string.
|
||||||
* @throws \InvalidArgumentException if the handler is not an existing class
|
* @throws InvalidArgumentException If the handler is not an existing class.
|
||||||
* @throws \InvalidArgumentException if the handler does not implement the {@see Tag} interface
|
* @throws InvalidArgumentException If the handler does not implement the {@see Tag} interface.
|
||||||
*/
|
*/
|
||||||
public function registerTagHandler(string $tagName, string $handler) : void;
|
public function registerTagHandler(string $tagName, string $handler) : void;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,13 +8,18 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace phpDocumentor\Reflection\DocBlock\Tags;
|
namespace phpDocumentor\Reflection\DocBlock\Tags;
|
||||||
|
|
||||||
|
use InvalidArgumentException;
|
||||||
|
use const FILTER_VALIDATE_EMAIL;
|
||||||
|
use function filter_var;
|
||||||
|
use function preg_match;
|
||||||
|
use function strlen;
|
||||||
|
use function trim;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reflection class for an {@}author tag in a Docblock.
|
* Reflection class for an {@}author tag in a Docblock.
|
||||||
*/
|
*/
|
||||||
@@ -33,7 +40,7 @@ final class Author extends BaseTag implements Factory\StaticMethod
|
|||||||
public function __construct(string $authorName, string $authorEmail)
|
public function __construct(string $authorName, string $authorEmail)
|
||||||
{
|
{
|
||||||
if ($authorEmail && !filter_var($authorEmail, FILTER_VALIDATE_EMAIL)) {
|
if ($authorEmail && !filter_var($authorEmail, FILTER_VALIDATE_EMAIL)) {
|
||||||
throw new \InvalidArgumentException('The author tag does not have a valid e-mail address');
|
throw new InvalidArgumentException('The author tag does not have a valid e-mail address');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->authorName = $authorName;
|
$this->authorName = $authorName;
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -37,6 +37,9 @@ abstract class BaseTag implements DocBlock\Tag
|
|||||||
return $this->name;
|
return $this->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Description|string|null
|
||||||
|
*/
|
||||||
public function getDescription()
|
public function getDescription()
|
||||||
{
|
{
|
||||||
return $this->description;
|
return $this->description;
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -19,12 +19,14 @@ use phpDocumentor\Reflection\Fqsen;
|
|||||||
use phpDocumentor\Reflection\FqsenResolver;
|
use phpDocumentor\Reflection\FqsenResolver;
|
||||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
use function preg_split;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reflection class for a @covers tag in a Docblock.
|
* Reflection class for a @covers tag in a Docblock.
|
||||||
*/
|
*/
|
||||||
final class Covers extends BaseTag implements Factory\StaticMethod
|
final class Covers extends BaseTag implements Factory\StaticMethod
|
||||||
{
|
{
|
||||||
|
/** @var string */
|
||||||
protected $name = 'covers';
|
protected $name = 'covers';
|
||||||
|
|
||||||
/** @var Fqsen */
|
/** @var Fqsen */
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -17,12 +17,14 @@ use phpDocumentor\Reflection\DocBlock\Description;
|
|||||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
use function preg_match;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reflection class for a {@}deprecated tag in a Docblock.
|
* Reflection class for a {@}deprecated tag in a Docblock.
|
||||||
*/
|
*/
|
||||||
final class Deprecated extends BaseTag implements Factory\StaticMethod
|
final class Deprecated extends BaseTag implements Factory\StaticMethod
|
||||||
{
|
{
|
||||||
|
/** @var string */
|
||||||
protected $name = 'deprecated';
|
protected $name = 'deprecated';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,7 +46,7 @@ final class Deprecated extends BaseTag implements Factory\StaticMethod
|
|||||||
/** @var string The version vector. */
|
/** @var string The version vector. */
|
||||||
private $version = '';
|
private $version = '';
|
||||||
|
|
||||||
public function __construct($version = null, ?Description $description = null)
|
public function __construct(?string $version = null, ?Description $description = null)
|
||||||
{
|
{
|
||||||
Assert::nullOrStringNotEmpty($version);
|
Assert::nullOrStringNotEmpty($version);
|
||||||
|
|
||||||
@@ -68,7 +70,7 @@ final class Deprecated extends BaseTag implements Factory\StaticMethod
|
|||||||
if (!preg_match('/^(' . self::REGEX_VECTOR . ')\s*(.+)?$/sux', $body, $matches)) {
|
if (!preg_match('/^(' . self::REGEX_VECTOR . ')\s*(.+)?$/sux', $body, $matches)) {
|
||||||
return new static(
|
return new static(
|
||||||
null,
|
null,
|
||||||
null !== $descriptionFactory ? $descriptionFactory->create($body, $context) : null
|
$descriptionFactory !== null ? $descriptionFactory->create($body, $context) : null
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,24 +8,27 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace phpDocumentor\Reflection\DocBlock\Tags;
|
namespace phpDocumentor\Reflection\DocBlock\Tags;
|
||||||
|
|
||||||
|
use phpDocumentor\Reflection\DocBlock\Description;
|
||||||
use phpDocumentor\Reflection\DocBlock\Tag;
|
use phpDocumentor\Reflection\DocBlock\Tag;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
use function array_key_exists;
|
||||||
|
use function preg_match;
|
||||||
|
use function rawurlencode;
|
||||||
|
use function str_replace;
|
||||||
|
use function strpos;
|
||||||
|
use function trim;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reflection class for a {@}example tag in a Docblock.
|
* Reflection class for a {@}example tag in a Docblock.
|
||||||
*/
|
*/
|
||||||
final class Example extends BaseTag
|
final class Example extends BaseTag
|
||||||
{
|
{
|
||||||
/**
|
/** @var string Path to a file to use as an example. May also be an absolute URI. */
|
||||||
* @var string Path to a file to use as an example. May also be an absolute URI.
|
|
||||||
*/
|
|
||||||
private $filePath;
|
private $filePath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -32,16 +37,15 @@ final class Example extends BaseTag
|
|||||||
*/
|
*/
|
||||||
private $isURI = false;
|
private $isURI = false;
|
||||||
|
|
||||||
/**
|
/** @var int */
|
||||||
* @var int
|
|
||||||
*/
|
|
||||||
private $startingLine;
|
private $startingLine;
|
||||||
|
|
||||||
/**
|
/** @var int */
|
||||||
* @var int
|
|
||||||
*/
|
|
||||||
private $lineCount;
|
private $lineCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string|Description|null $description
|
||||||
|
*/
|
||||||
public function __construct(string $filePath, bool $isURI, int $startingLine, int $lineCount, $description)
|
public function __construct(string $filePath, bool $isURI, int $startingLine, int $lineCount, $description)
|
||||||
{
|
{
|
||||||
Assert::notEmpty($filePath);
|
Assert::notEmpty($filePath);
|
||||||
@@ -64,7 +68,7 @@ final class Example extends BaseTag
|
|||||||
*/
|
*/
|
||||||
public function getContent()
|
public function getContent()
|
||||||
{
|
{
|
||||||
if (null === $this->description) {
|
if ($this->description === null) {
|
||||||
$filePath = '"' . $this->filePath . '"';
|
$filePath = '"' . $this->filePath . '"';
|
||||||
if ($this->isURI) {
|
if ($this->isURI) {
|
||||||
$filePath = $this->isUriRelative($this->filePath)
|
$filePath = $this->isUriRelative($this->filePath)
|
||||||
@@ -90,7 +94,7 @@ final class Example extends BaseTag
|
|||||||
|
|
||||||
$filePath = null;
|
$filePath = null;
|
||||||
$fileUri = null;
|
$fileUri = null;
|
||||||
if ('' !== $matches[1]) {
|
if ($matches[1] !== '') {
|
||||||
$filePath = $matches[1];
|
$filePath = $matches[1];
|
||||||
} else {
|
} else {
|
||||||
$fileUri = $matches[2];
|
$fileUri = $matches[2];
|
||||||
@@ -117,7 +121,7 @@ final class Example extends BaseTag
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new static(
|
return new static(
|
||||||
$filePath !== null ? $filePath : $fileUri,
|
$filePath ?? $fileUri,
|
||||||
$fileUri !== null,
|
$fileUri !== null,
|
||||||
$startingLine,
|
$startingLine,
|
||||||
$lineCount,
|
$lineCount,
|
||||||
@@ -149,7 +153,7 @@ final class Example extends BaseTag
|
|||||||
*/
|
*/
|
||||||
private function isUriRelative(string $uri) : bool
|
private function isUriRelative(string $uri) : bool
|
||||||
{
|
{
|
||||||
return false === strpos($uri, ':');
|
return strpos($uri, ':') === false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getStartingLine() : int
|
public function getStartingLine() : int
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
<?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-2018 Mike van Riel<[email protected]>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace phpDocumentor\Reflection\DocBlock\Tags\Factory;
|
|
||||||
|
|
||||||
interface Strategy
|
|
||||||
{
|
|
||||||
public function create($body): void;
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,9 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @author Jan Schneider <[email protected]>
|
|
||||||
* @copyright 2018 Mike van Riel<[email protected]>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -16,6 +15,9 @@ namespace phpDocumentor\Reflection\DocBlock\Tags\Formatter;
|
|||||||
|
|
||||||
use phpDocumentor\Reflection\DocBlock\Tag;
|
use phpDocumentor\Reflection\DocBlock\Tag;
|
||||||
use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
|
use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
|
||||||
|
use function max;
|
||||||
|
use function str_repeat;
|
||||||
|
use function strlen;
|
||||||
|
|
||||||
class AlignFormatter implements Formatter
|
class AlignFormatter implements Formatter
|
||||||
{
|
{
|
||||||
@@ -23,8 +25,6 @@ class AlignFormatter implements Formatter
|
|||||||
protected $maxLen = 0;
|
protected $maxLen = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
|
||||||
*
|
|
||||||
* @param Tag[] $tags All tags that should later be aligned with the formatter.
|
* @param Tag[] $tags All tags that should later be aligned with the formatter.
|
||||||
*/
|
*/
|
||||||
public function __construct(array $tags)
|
public function __construct(array $tags)
|
||||||
@@ -39,6 +39,11 @@ class AlignFormatter implements Formatter
|
|||||||
*/
|
*/
|
||||||
public function format(Tag $tag) : string
|
public function format(Tag $tag) : string
|
||||||
{
|
{
|
||||||
return '@' . $tag->getName() . str_repeat(' ', $this->maxLen - strlen($tag->getName()) + 1) . (string) $tag;
|
return '@' . $tag->getName() .
|
||||||
|
str_repeat(
|
||||||
|
' ',
|
||||||
|
$this->maxLen - strlen($tag->getName()) + 1
|
||||||
|
) .
|
||||||
|
$tag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -15,6 +15,7 @@ namespace phpDocumentor\Reflection\DocBlock\Tags\Formatter;
|
|||||||
|
|
||||||
use phpDocumentor\Reflection\DocBlock\Tag;
|
use phpDocumentor\Reflection\DocBlock\Tag;
|
||||||
use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
|
use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
|
||||||
|
use function trim;
|
||||||
|
|
||||||
class PassthroughFormatter implements Formatter
|
class PassthroughFormatter implements Formatter
|
||||||
{
|
{
|
||||||
@@ -23,6 +24,6 @@ class PassthroughFormatter implements Formatter
|
|||||||
*/
|
*/
|
||||||
public function format(Tag $tag) : string
|
public function format(Tag $tag) : string
|
||||||
{
|
{
|
||||||
return trim('@' . $tag->getName() . ' ' . (string) $tag);
|
return trim('@' . $tag->getName() . ' ' . $tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,18 +8,18 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace phpDocumentor\Reflection\DocBlock\Tags;
|
namespace phpDocumentor\Reflection\DocBlock\Tags;
|
||||||
|
|
||||||
|
use InvalidArgumentException;
|
||||||
use phpDocumentor\Reflection\DocBlock\Description;
|
use phpDocumentor\Reflection\DocBlock\Description;
|
||||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||||
use phpDocumentor\Reflection\DocBlock\StandardTagFactory;
|
use phpDocumentor\Reflection\DocBlock\StandardTagFactory;
|
||||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
use function preg_match;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses a tag definition for a DocBlock.
|
* Parses a tag definition for a DocBlock.
|
||||||
@@ -41,7 +43,6 @@ class Generic extends BaseTag implements Factory\StaticMethod
|
|||||||
/**
|
/**
|
||||||
* Creates a new tag that represents any unknown tag type.
|
* Creates a new tag that represents any unknown tag type.
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @return static
|
* @return static
|
||||||
*/
|
*/
|
||||||
public static function create(
|
public static function create(
|
||||||
@@ -53,7 +54,7 @@ class Generic extends BaseTag implements Factory\StaticMethod
|
|||||||
Assert::stringNotEmpty($name);
|
Assert::stringNotEmpty($name);
|
||||||
Assert::notNull($descriptionFactory);
|
Assert::notNull($descriptionFactory);
|
||||||
|
|
||||||
$description = $descriptionFactory && $body !== "" ? $descriptionFactory->create($body, $context) : null;
|
$description = $descriptionFactory && $body !== '' ? $descriptionFactory->create($body, $context) : null;
|
||||||
|
|
||||||
return new static($name, $description);
|
return new static($name, $description);
|
||||||
}
|
}
|
||||||
@@ -72,7 +73,7 @@ class Generic extends BaseTag implements Factory\StaticMethod
|
|||||||
private function validateTagName(string $name) : void
|
private function validateTagName(string $name) : void
|
||||||
{
|
{
|
||||||
if (!preg_match('/^' . StandardTagFactory::REGEX_TAGNAME . '$/u', $name)) {
|
if (!preg_match('/^' . StandardTagFactory::REGEX_TAGNAME . '$/u', $name)) {
|
||||||
throw new \InvalidArgumentException(
|
throw new InvalidArgumentException(
|
||||||
'The tag name "' . $name . '" is not wellformed. Tags may only consist of letters, underscores, '
|
'The tag name "' . $name . '" is not wellformed. Tags may only consist of letters, underscores, '
|
||||||
. 'hyphens and backslashes.'
|
. 'hyphens and backslashes.'
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* phpDocumentor
|
* This file is part of phpDocumentor.
|
||||||
*
|
*
|
||||||
* PHP Version 5.3
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @author Ben Selby <[email protected]>
|
|
||||||
* @copyright 2010-2018 Mike van Riel / Naenius (http://www.naenius.com)
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -17,16 +17,18 @@ use phpDocumentor\Reflection\DocBlock\Description;
|
|||||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
use function preg_split;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reflection class for a @link tag in a Docblock.
|
* Reflection class for a @link tag in a Docblock.
|
||||||
*/
|
*/
|
||||||
final class Link extends BaseTag implements Factory\StaticMethod
|
final class Link extends BaseTag implements Factory\StaticMethod
|
||||||
{
|
{
|
||||||
|
/** @var string */
|
||||||
protected $name = 'link';
|
protected $name = 'link';
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $link = '';
|
private $link;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes a link to a URL.
|
* Initializes a link to a URL.
|
||||||
@@ -40,8 +42,11 @@ final class Link extends BaseTag implements Factory\StaticMethod
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public static function create(string $body, ?DescriptionFactory $descriptionFactory = null, ?TypeContext $context = null): self
|
public static function create(
|
||||||
{
|
string $body,
|
||||||
|
?DescriptionFactory $descriptionFactory = null,
|
||||||
|
?TypeContext $context = null
|
||||||
|
) : self {
|
||||||
Assert::notNull($descriptionFactory);
|
Assert::notNull($descriptionFactory);
|
||||||
|
|
||||||
$parts = preg_split('/\s+/Su', $body, 2);
|
$parts = preg_split('/\s+/Su', $body, 2);
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,13 +8,12 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace phpDocumentor\Reflection\DocBlock\Tags;
|
namespace phpDocumentor\Reflection\DocBlock\Tags;
|
||||||
|
|
||||||
|
use InvalidArgumentException;
|
||||||
use phpDocumentor\Reflection\DocBlock\Description;
|
use phpDocumentor\Reflection\DocBlock\Description;
|
||||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||||
use phpDocumentor\Reflection\Type;
|
use phpDocumentor\Reflection\Type;
|
||||||
@@ -20,12 +21,24 @@ use phpDocumentor\Reflection\TypeResolver;
|
|||||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||||
use phpDocumentor\Reflection\Types\Void_;
|
use phpDocumentor\Reflection\Types\Void_;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
use function array_keys;
|
||||||
|
use function explode;
|
||||||
|
use function implode;
|
||||||
|
use function is_string;
|
||||||
|
use function preg_match;
|
||||||
|
use function sort;
|
||||||
|
use function strlen;
|
||||||
|
use function strpos;
|
||||||
|
use function substr;
|
||||||
|
use function trim;
|
||||||
|
use function var_export;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reflection class for an {@}method in a Docblock.
|
* Reflection class for an {@}method in a Docblock.
|
||||||
*/
|
*/
|
||||||
final class Method extends BaseTag implements Factory\StaticMethod
|
final class Method extends BaseTag implements Factory\StaticMethod
|
||||||
{
|
{
|
||||||
|
/** @var string */
|
||||||
protected $name = 'method';
|
protected $name = 'method';
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
@@ -40,11 +53,14 @@ final class Method extends BaseTag implements Factory\StaticMethod
|
|||||||
/** @var Type */
|
/** @var Type */
|
||||||
private $returnType;
|
private $returnType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed[][] $arguments $arguments
|
||||||
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
$methodName,
|
string $methodName,
|
||||||
array $arguments = [],
|
array $arguments = [],
|
||||||
?Type $returnType = null,
|
?Type $returnType = null,
|
||||||
$static = false,
|
bool $static = false,
|
||||||
?Description $description = null
|
?Description $description = null
|
||||||
) {
|
) {
|
||||||
Assert::stringNotEmpty($methodName);
|
Assert::stringNotEmpty($methodName);
|
||||||
@@ -204,6 +220,11 @@ final class Method extends BaseTag implements Factory\StaticMethod
|
|||||||
. ($this->description ? ' ' . $this->description->render() : ''));
|
. ($this->description ? ' ' . $this->description->render() : ''));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed[][] $arguments
|
||||||
|
*
|
||||||
|
* @return mixed[][]
|
||||||
|
*/
|
||||||
private function filterArguments(array $arguments = []) : array
|
private function filterArguments(array $arguments = []) : array
|
||||||
{
|
{
|
||||||
foreach ($arguments as &$argument) {
|
foreach ($arguments as &$argument) {
|
||||||
@@ -218,7 +239,7 @@ final class Method extends BaseTag implements Factory\StaticMethod
|
|||||||
$keys = array_keys($argument);
|
$keys = array_keys($argument);
|
||||||
sort($keys);
|
sort($keys);
|
||||||
if ($keys !== ['name', 'type']) {
|
if ($keys !== ['name', 'type']) {
|
||||||
throw new \InvalidArgumentException(
|
throw new InvalidArgumentException(
|
||||||
'Arguments can only have the "name" and "type" fields, found: ' . var_export($keys, true)
|
'Arguments can only have the "name" and "type" fields, found: ' . var_export($keys, true)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -19,6 +19,13 @@ use phpDocumentor\Reflection\Type;
|
|||||||
use phpDocumentor\Reflection\TypeResolver;
|
use phpDocumentor\Reflection\TypeResolver;
|
||||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
use const PREG_SPLIT_DELIM_CAPTURE;
|
||||||
|
use function array_shift;
|
||||||
|
use function implode;
|
||||||
|
use function preg_split;
|
||||||
|
use function strlen;
|
||||||
|
use function strpos;
|
||||||
|
use function substr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reflection class for the {@}param tag in a Docblock.
|
* Reflection class for the {@}param tag in a Docblock.
|
||||||
@@ -37,8 +44,12 @@ final class Param extends BaseTag implements Factory\StaticMethod
|
|||||||
/** @var bool determines whether this is a variadic argument */
|
/** @var bool determines whether this is a variadic argument */
|
||||||
private $isVariadic = false;
|
private $isVariadic = false;
|
||||||
|
|
||||||
public function __construct(string $variableName, ?Type $type = null, bool $isVariadic = false, ?Description $description = null)
|
public function __construct(
|
||||||
{
|
string $variableName,
|
||||||
|
?Type $type = null,
|
||||||
|
bool $isVariadic = false,
|
||||||
|
?Description $description = null
|
||||||
|
) {
|
||||||
$this->variableName = $variableName;
|
$this->variableName = $variableName;
|
||||||
$this->type = $type;
|
$this->type = $type;
|
||||||
$this->isVariadic = $isVariadic;
|
$this->isVariadic = $isVariadic;
|
||||||
@@ -69,7 +80,9 @@ final class Param extends BaseTag implements Factory\StaticMethod
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if the next item starts with a $ or ...$ it must be the variable name
|
// 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) &&
|
||||||
|
(strpos($parts[0], '$') === 0 || strpos($parts[0], '...$') === 0)
|
||||||
|
) {
|
||||||
$variableName = array_shift($parts);
|
$variableName = array_shift($parts);
|
||||||
array_shift($parts);
|
array_shift($parts);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -19,6 +19,12 @@ use phpDocumentor\Reflection\Type;
|
|||||||
use phpDocumentor\Reflection\TypeResolver;
|
use phpDocumentor\Reflection\TypeResolver;
|
||||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
use const PREG_SPLIT_DELIM_CAPTURE;
|
||||||
|
use function array_shift;
|
||||||
|
use function implode;
|
||||||
|
use function preg_split;
|
||||||
|
use function strlen;
|
||||||
|
use function substr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reflection class for a {@}property tag in a Docblock.
|
* Reflection class for a {@}property tag in a Docblock.
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -19,6 +19,12 @@ use phpDocumentor\Reflection\Type;
|
|||||||
use phpDocumentor\Reflection\TypeResolver;
|
use phpDocumentor\Reflection\TypeResolver;
|
||||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
use const PREG_SPLIT_DELIM_CAPTURE;
|
||||||
|
use function array_shift;
|
||||||
|
use function implode;
|
||||||
|
use function preg_split;
|
||||||
|
use function strlen;
|
||||||
|
use function substr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reflection class for a {@}property-read tag in a Docblock.
|
* Reflection class for a {@}property-read tag in a Docblock.
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -19,6 +19,12 @@ use phpDocumentor\Reflection\Type;
|
|||||||
use phpDocumentor\Reflection\TypeResolver;
|
use phpDocumentor\Reflection\TypeResolver;
|
||||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
use const PREG_SPLIT_DELIM_CAPTURE;
|
||||||
|
use function array_shift;
|
||||||
|
use function implode;
|
||||||
|
use function preg_split;
|
||||||
|
use function strlen;
|
||||||
|
use function substr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reflection class for a {@}property-write tag in a Docblock.
|
* Reflection class for a {@}property-write tag in a Docblock.
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -16,18 +16,13 @@ namespace phpDocumentor\Reflection\DocBlock\Tags\Reference;
|
|||||||
use phpDocumentor\Reflection\Fqsen as RealFqsen;
|
use phpDocumentor\Reflection\Fqsen as RealFqsen;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fqsen reference used by {@see phpDocumentor\Reflection\DocBlock\Tags\See}
|
* Fqsen reference used by {@see \phpDocumentor\Reflection\DocBlock\Tags\See}
|
||||||
*/
|
*/
|
||||||
final class Fqsen implements Reference
|
final class Fqsen implements Reference
|
||||||
{
|
{
|
||||||
/**
|
/** @var RealFqsen */
|
||||||
* @var RealFqsen
|
|
||||||
*/
|
|
||||||
private $fqsen;
|
private $fqsen;
|
||||||
|
|
||||||
/**
|
|
||||||
* Fqsen constructor.
|
|
||||||
*/
|
|
||||||
public function __construct(RealFqsen $fqsen)
|
public function __construct(RealFqsen $fqsen)
|
||||||
{
|
{
|
||||||
$this->fqsen = $fqsen;
|
$this->fqsen = $fqsen;
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,15 +8,13 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace phpDocumentor\Reflection\DocBlock\Tags\Reference;
|
namespace phpDocumentor\Reflection\DocBlock\Tags\Reference;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for references in {@see phpDocumentor\Reflection\DocBlock\Tags\See}
|
* Interface for references in {@see \phpDocumentor\Reflection\DocBlock\Tags\See}
|
||||||
*/
|
*/
|
||||||
interface Reference
|
interface Reference
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -16,18 +16,13 @@ namespace phpDocumentor\Reflection\DocBlock\Tags\Reference;
|
|||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Url reference used by {@see phpDocumentor\Reflection\DocBlock\Tags\See}
|
* Url reference used by {@see \phpDocumentor\Reflection\DocBlock\Tags\See}
|
||||||
*/
|
*/
|
||||||
final class Url implements Reference
|
final class Url implements Reference
|
||||||
{
|
{
|
||||||
/**
|
/** @var string */
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
private $uri;
|
private $uri;
|
||||||
|
|
||||||
/**
|
|
||||||
* Url constructor.
|
|
||||||
*/
|
|
||||||
public function __construct(string $uri)
|
public function __construct(string $uri)
|
||||||
{
|
{
|
||||||
Assert::stringNotEmpty($uri);
|
Assert::stringNotEmpty($uri);
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -19,12 +19,14 @@ use phpDocumentor\Reflection\Type;
|
|||||||
use phpDocumentor\Reflection\TypeResolver;
|
use phpDocumentor\Reflection\TypeResolver;
|
||||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
use function preg_split;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reflection class for a {@}return tag in a Docblock.
|
* Reflection class for a {@}return tag in a Docblock.
|
||||||
*/
|
*/
|
||||||
final class Return_ extends BaseTag implements Factory\StaticMethod
|
final class Return_ extends BaseTag implements Factory\StaticMethod
|
||||||
{
|
{
|
||||||
|
/** @var string */
|
||||||
protected $name = 'return';
|
protected $name = 'return';
|
||||||
|
|
||||||
/** @var Type */
|
/** @var Type */
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -21,12 +21,15 @@ use phpDocumentor\Reflection\DocBlock\Tags\Reference\Url;
|
|||||||
use phpDocumentor\Reflection\FqsenResolver;
|
use phpDocumentor\Reflection\FqsenResolver;
|
||||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
use function preg_match;
|
||||||
|
use function preg_split;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reflection class for an {@}see tag in a Docblock.
|
* Reflection class for an {@}see tag in a Docblock.
|
||||||
*/
|
*/
|
||||||
class See extends BaseTag implements Factory\StaticMethod
|
class See extends BaseTag implements Factory\StaticMethod
|
||||||
{
|
{
|
||||||
|
/** @var string */
|
||||||
protected $name = 'see';
|
protected $name = 'see';
|
||||||
|
|
||||||
/** @var Reference */
|
/** @var Reference */
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -17,12 +17,14 @@ use phpDocumentor\Reflection\DocBlock\Description;
|
|||||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
use function preg_match;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reflection class for a {@}since tag in a Docblock.
|
* Reflection class for a {@}since tag in a Docblock.
|
||||||
*/
|
*/
|
||||||
final class Since extends BaseTag implements Factory\StaticMethod
|
final class Since extends BaseTag implements Factory\StaticMethod
|
||||||
{
|
{
|
||||||
|
/** @var string */
|
||||||
protected $name = 'since';
|
protected $name = 'since';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,7 +46,7 @@ final class Since extends BaseTag implements Factory\StaticMethod
|
|||||||
/** @var string The version vector. */
|
/** @var string The version vector. */
|
||||||
private $version = '';
|
private $version = '';
|
||||||
|
|
||||||
public function __construct($version = null, ?Description $description = null)
|
public function __construct(?string $version = null, ?Description $description = null)
|
||||||
{
|
{
|
||||||
Assert::nullOrStringNotEmpty($version);
|
Assert::nullOrStringNotEmpty($version);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -17,6 +17,7 @@ use phpDocumentor\Reflection\DocBlock\Description;
|
|||||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
use function preg_match;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reflection class for a {@}source tag in a Docblock.
|
* Reflection class for a {@}source tag in a Docblock.
|
||||||
@@ -32,6 +33,10 @@ final class Source extends BaseTag implements Factory\StaticMethod
|
|||||||
/** @var int|null The number of lines, relative to the starting line. NULL means "to the end". */
|
/** @var int|null The number of lines, relative to the starting line. NULL means "to the end". */
|
||||||
private $lineCount;
|
private $lineCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int|string $startingLine should be a to int convertible value
|
||||||
|
* @param int|string|null $lineCount should be a to int convertible value
|
||||||
|
*/
|
||||||
public function __construct($startingLine, $lineCount = null, ?Description $description = null)
|
public function __construct($startingLine, $lineCount = null, ?Description $description = null)
|
||||||
{
|
{
|
||||||
Assert::integerish($startingLine);
|
Assert::integerish($startingLine);
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -19,12 +19,14 @@ use phpDocumentor\Reflection\Type;
|
|||||||
use phpDocumentor\Reflection\TypeResolver;
|
use phpDocumentor\Reflection\TypeResolver;
|
||||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
use function preg_split;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reflection class for a {@}throws tag in a Docblock.
|
* Reflection class for a {@}throws tag in a Docblock.
|
||||||
*/
|
*/
|
||||||
final class Throws extends BaseTag implements Factory\StaticMethod
|
final class Throws extends BaseTag implements Factory\StaticMethod
|
||||||
{
|
{
|
||||||
|
/** @var string */
|
||||||
protected $name = 'throws';
|
protected $name = 'throws';
|
||||||
|
|
||||||
/** @var Type */
|
/** @var Type */
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -19,12 +19,14 @@ use phpDocumentor\Reflection\Fqsen;
|
|||||||
use phpDocumentor\Reflection\FqsenResolver;
|
use phpDocumentor\Reflection\FqsenResolver;
|
||||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
use function preg_split;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reflection class for a {@}uses tag in a Docblock.
|
* Reflection class for a {@}uses tag in a Docblock.
|
||||||
*/
|
*/
|
||||||
final class Uses extends BaseTag implements Factory\StaticMethod
|
final class Uses extends BaseTag implements Factory\StaticMethod
|
||||||
{
|
{
|
||||||
|
/** @var string */
|
||||||
protected $name = 'uses';
|
protected $name = 'uses';
|
||||||
|
|
||||||
/** @var Fqsen */
|
/** @var Fqsen */
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -19,6 +19,12 @@ use phpDocumentor\Reflection\Type;
|
|||||||
use phpDocumentor\Reflection\TypeResolver;
|
use phpDocumentor\Reflection\TypeResolver;
|
||||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
use const PREG_SPLIT_DELIM_CAPTURE;
|
||||||
|
use function array_shift;
|
||||||
|
use function implode;
|
||||||
|
use function preg_split;
|
||||||
|
use function strlen;
|
||||||
|
use function substr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reflection class for a {@}var tag in a Docblock.
|
* Reflection class for a {@}var tag in a Docblock.
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* phpDocumentor
|
* This file is part of phpDocumentor.
|
||||||
*
|
*
|
||||||
* PHP Version 5.3
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @author Vasil Rangelov <boen.robot@gmail.com>
|
|
||||||
* @copyright 2010-2018 Mike van Riel / Naenius (http://www.naenius.com)
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -17,12 +17,14 @@ use phpDocumentor\Reflection\DocBlock\Description;
|
|||||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
use function preg_match;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reflection class for a {@}version tag in a Docblock.
|
* Reflection class for a {@}version tag in a Docblock.
|
||||||
*/
|
*/
|
||||||
final class Version extends BaseTag implements Factory\StaticMethod
|
final class Version extends BaseTag implements Factory\StaticMethod
|
||||||
{
|
{
|
||||||
|
/** @var string */
|
||||||
protected $name = 'version';
|
protected $name = 'version';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,7 +46,7 @@ final class Version extends BaseTag implements Factory\StaticMethod
|
|||||||
/** @var string The version vector. */
|
/** @var string The version vector. */
|
||||||
private $version = '';
|
private $version = '';
|
||||||
|
|
||||||
public function __construct($version = null, ?Description $description = null)
|
public function __construct(?string $version = null, ?Description $description = null)
|
||||||
{
|
{
|
||||||
Assert::nullOrStringNotEmpty($version);
|
Assert::nullOrStringNotEmpty($version);
|
||||||
|
|
||||||
|
|||||||
+37
-14
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,18 +8,30 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace phpDocumentor\Reflection;
|
namespace phpDocumentor\Reflection;
|
||||||
|
|
||||||
|
use InvalidArgumentException;
|
||||||
|
use LogicException;
|
||||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||||
use phpDocumentor\Reflection\DocBlock\StandardTagFactory;
|
use phpDocumentor\Reflection\DocBlock\StandardTagFactory;
|
||||||
use phpDocumentor\Reflection\DocBlock\Tag;
|
use phpDocumentor\Reflection\DocBlock\Tag;
|
||||||
use phpDocumentor\Reflection\DocBlock\TagFactory;
|
use phpDocumentor\Reflection\DocBlock\TagFactory;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
use function array_filter;
|
||||||
|
use function array_shift;
|
||||||
|
use function count;
|
||||||
|
use function explode;
|
||||||
|
use function is_object;
|
||||||
|
use function method_exists;
|
||||||
|
use function preg_match;
|
||||||
|
use function preg_replace;
|
||||||
|
use function str_replace;
|
||||||
|
use function strpos;
|
||||||
|
use function substr;
|
||||||
|
use function trim;
|
||||||
|
|
||||||
final class DocBlockFactory implements DocBlockFactoryInterface
|
final class DocBlockFactory implements DocBlockFactoryInterface
|
||||||
{
|
{
|
||||||
@@ -67,7 +81,7 @@ final class DocBlockFactory implements DocBlockFactoryInterface
|
|||||||
if (is_object($docblock)) {
|
if (is_object($docblock)) {
|
||||||
if (!method_exists($docblock, 'getDocComment')) {
|
if (!method_exists($docblock, 'getDocComment')) {
|
||||||
$exceptionMessage = 'Invalid object passed; the given object must support the getDocComment method';
|
$exceptionMessage = 'Invalid object passed; the given object must support the getDocComment method';
|
||||||
throw new \InvalidArgumentException($exceptionMessage);
|
throw new InvalidArgumentException($exceptionMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
$docblock = $docblock->getDocComment();
|
$docblock = $docblock->getDocComment();
|
||||||
@@ -80,14 +94,18 @@ final class DocBlockFactory implements DocBlockFactoryInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$parts = $this->splitDocBlock($this->stripDocComment($docblock));
|
$parts = $this->splitDocBlock($this->stripDocComment($docblock));
|
||||||
|
|
||||||
[$templateMarker, $summary, $description, $tags] = $parts;
|
[$templateMarker, $summary, $description, $tags] = $parts;
|
||||||
|
|
||||||
return new DocBlock(
|
return new DocBlock(
|
||||||
$summary,
|
$summary,
|
||||||
$description ? $this->descriptionFactory->create($description, $context) : null,
|
$description ? $this->descriptionFactory->create($description, $context) : null,
|
||||||
array_filter($this->parseTagBlock($tags, $context), function ($tag) {
|
array_filter(
|
||||||
|
$this->parseTagBlock($tags, $context),
|
||||||
|
static function ($tag) {
|
||||||
return $tag instanceof Tag;
|
return $tag instanceof Tag;
|
||||||
}),
|
}
|
||||||
|
),
|
||||||
$context,
|
$context,
|
||||||
$location,
|
$location,
|
||||||
$templateMarker === '#@+',
|
$templateMarker === '#@+',
|
||||||
@@ -95,7 +113,7 @@ final class DocBlockFactory implements DocBlockFactoryInterface
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function registerTagHandler($tagName, $handler): void
|
public function registerTagHandler(string $tagName, string $handler) : void
|
||||||
{
|
{
|
||||||
$this->tagFactory->registerTagHandler($tagName, $handler);
|
$this->tagFactory->registerTagHandler($tagName, $handler);
|
||||||
}
|
}
|
||||||
@@ -107,7 +125,9 @@ final class DocBlockFactory implements DocBlockFactoryInterface
|
|||||||
*/
|
*/
|
||||||
private function stripDocComment(string $comment) : string
|
private function stripDocComment(string $comment) : string
|
||||||
{
|
{
|
||||||
$comment = trim(preg_replace('#[ \t]*(?:\/\*\*|\*\/|\*)?[ \t]{0,1}(.*)?#u', '$1', $comment));
|
/** @var string $comment */
|
||||||
|
$comment = preg_replace('#[ \t]*(?:\/\*\*|\*\/|\*)?[ \t]{0,1}(.*)?#u', '$1', $comment);
|
||||||
|
$comment = trim($comment);
|
||||||
|
|
||||||
// reg ex above is not able to remove */ from a single line docblock
|
// reg ex above is not able to remove */ from a single line docblock
|
||||||
if (substr($comment, -2) === '*/') {
|
if (substr($comment, -2) === '*/') {
|
||||||
@@ -117,15 +137,17 @@ final class DocBlockFactory implements DocBlockFactoryInterface
|
|||||||
return str_replace(["\r\n", "\r"], "\n", $comment);
|
return str_replace(["\r\n", "\r"], "\n", $comment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable SlevomatCodingStandard.Commenting.ForbiddenAnnotations.AnnotationForbidden
|
||||||
/**
|
/**
|
||||||
* Splits the DocBlock into a template marker, summary, description and block of tags.
|
* Splits the DocBlock into a template marker, summary, description and block of tags.
|
||||||
*
|
*
|
||||||
* @param string $comment Comment to split into the sub-parts.
|
* @param string $comment Comment to split into the sub-parts.
|
||||||
*
|
*
|
||||||
* @author Richard van Velzen (@_richardJ) Special thanks to Richard for the regex responsible for the split.
|
* @return string[] containing the template marker (if any), summary, description and a string containing the tags.
|
||||||
|
*
|
||||||
* @author Mike van Riel <me@mikevanriel.com> for extending the regex with template marker support.
|
* @author Mike van Riel <me@mikevanriel.com> for extending the regex with template marker support.
|
||||||
*
|
*
|
||||||
* @return string[] containing the template marker (if any), summary, description and a string containing the tags.
|
* @author Richard van Velzen (@_richardJ) Special thanks to Richard for the regex responsible for the split.
|
||||||
*/
|
*/
|
||||||
private function splitDocBlock(string $comment) : array
|
private function splitDocBlock(string $comment) : array
|
||||||
{
|
{
|
||||||
@@ -137,6 +159,7 @@ final class DocBlockFactory implements DocBlockFactoryInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
// clears all extra horizontal whitespace from the line endings to prevent parsing issues
|
// clears all extra horizontal whitespace from the line endings to prevent parsing issues
|
||||||
|
/** @var string $comment */
|
||||||
$comment = preg_replace('/\h*$/Sum', '', $comment);
|
$comment = preg_replace('/\h*$/Sum', '', $comment);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -212,7 +235,7 @@ final class DocBlockFactory implements DocBlockFactoryInterface
|
|||||||
private function parseTagBlock(string $tags, Types\Context $context) : array
|
private function parseTagBlock(string $tags, Types\Context $context) : array
|
||||||
{
|
{
|
||||||
$tags = $this->filterTagBlock($tags);
|
$tags = $this->filterTagBlock($tags);
|
||||||
if (!$tags) {
|
if ($tags === null) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -241,18 +264,18 @@ final class DocBlockFactory implements DocBlockFactoryInterface
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function filterTagBlock($tags): ?string
|
private function filterTagBlock(string $tags) : ?string
|
||||||
{
|
{
|
||||||
$tags = trim($tags);
|
$tags = trim($tags);
|
||||||
if (!$tags) {
|
if (!$tags) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('@' !== $tags[0]) {
|
if ($tags[0] !== '@') {
|
||||||
// @codeCoverageIgnoreStart
|
// @codeCoverageIgnoreStart
|
||||||
// Can't simulate this; this only happens if there is an error with the parsing of the DocBlock that
|
// Can't simulate this; this only happens if there is an error with the parsing of the DocBlock that
|
||||||
// we didn't foresee.
|
// we didn't foresee.
|
||||||
throw new \LogicException('A tag block started with text instead of an at-sign(@): ' . $tags);
|
throw new LogicException('A tag block started with text instead of an at-sign(@): ' . $tags);
|
||||||
// @codeCoverageIgnoreEnd
|
// @codeCoverageIgnoreEnd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace phpDocumentor\Reflection;
|
namespace phpDocumentor\Reflection;
|
||||||
|
|
||||||
|
// phpcs:ignore SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming.SuperfluousSuffix
|
||||||
interface DocBlockFactoryInterface
|
interface DocBlockFactoryInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,15 +8,13 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace phpDocumentor\Reflection\DocBlock;
|
namespace phpDocumentor\Reflection\DocBlock;
|
||||||
|
|
||||||
use Mockery as m;
|
use Mockery as m;
|
||||||
use phpDocumentor\Reflection\DocBlock\Tags\Link;
|
use phpDocumentor\Reflection\DocBlock\Tags\Link as LinkTag;
|
||||||
use phpDocumentor\Reflection\Types\Context;
|
use phpDocumentor\Reflection\Types\Context;
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
@@ -33,12 +33,13 @@ class DescriptionFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
* @dataProvider provideSimpleExampleDescriptions
|
* @dataProvider provideSimpleExampleDescriptions
|
||||||
*/
|
*/
|
||||||
public function testDescriptionCanParseASimpleString($contents): void
|
public function testDescriptionCanParseASimpleString(string $contents) : void
|
||||||
{
|
{
|
||||||
$tagFactory = m::mock(TagFactory::class);
|
$tagFactory = m::mock(TagFactory::class);
|
||||||
$tagFactory->shouldReceive('create')->never();
|
$tagFactory->shouldReceive('create')->never();
|
||||||
@@ -50,12 +51,13 @@ class DescriptionFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
* @dataProvider provideEscapeSequences
|
* @dataProvider provideEscapeSequences
|
||||||
*/
|
*/
|
||||||
public function testEscapeSequences($contents, $expected): void
|
public function testEscapeSequences(string $contents, string $expected) : void
|
||||||
{
|
{
|
||||||
$tagFactory = m::mock(TagFactory::class);
|
$tagFactory = m::mock(TagFactory::class);
|
||||||
$tagFactory->shouldReceive('create')->never();
|
$tagFactory->shouldReceive('create')->never();
|
||||||
@@ -67,13 +69,14 @@ class DescriptionFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Link
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Link
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
|
||||||
* @uses phpDocumentor\Reflection\Types\Context
|
|
||||||
*/
|
*/
|
||||||
public function testDescriptionCanParseAStringWithInlineTag() : void
|
public function testDescriptionCanParseAStringWithInlineTag() : void
|
||||||
{
|
{
|
||||||
@@ -83,7 +86,7 @@ class DescriptionFactoryTest extends TestCase
|
|||||||
$tagFactory->shouldReceive('create')
|
$tagFactory->shouldReceive('create')
|
||||||
->once()
|
->once()
|
||||||
->with('@link http://phpdoc.org/ description', $context)
|
->with('@link http://phpdoc.org/ description', $context)
|
||||||
->andReturn(new Link('http://phpdoc.org/', new Description('description')));
|
->andReturn(new LinkTag('http://phpdoc.org/', new Description('description')));
|
||||||
|
|
||||||
$factory = new DescriptionFactory($tagFactory);
|
$factory = new DescriptionFactory($tagFactory);
|
||||||
$description = $factory->create($contents, $context);
|
$description = $factory->create($contents, $context);
|
||||||
@@ -92,13 +95,14 @@ class DescriptionFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Link
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Link
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
|
||||||
* @uses phpDocumentor\Reflection\Types\Context
|
|
||||||
*/
|
*/
|
||||||
public function testDescriptionCanParseAStringStartingWithInlineTag() : void
|
public function testDescriptionCanParseAStringStartingWithInlineTag() : void
|
||||||
{
|
{
|
||||||
@@ -108,7 +112,7 @@ class DescriptionFactoryTest extends TestCase
|
|||||||
$tagFactory->shouldReceive('create')
|
$tagFactory->shouldReceive('create')
|
||||||
->once()
|
->once()
|
||||||
->with('@link http://phpdoc.org/ This', $context)
|
->with('@link http://phpdoc.org/ This', $context)
|
||||||
->andReturn(new Link('http://phpdoc.org/', new Description('This')));
|
->andReturn(new LinkTag('http://phpdoc.org/', new Description('This')));
|
||||||
|
|
||||||
$factory = new DescriptionFactory($tagFactory);
|
$factory = new DescriptionFactory($tagFactory);
|
||||||
$description = $factory->create($contents, $context);
|
$description = $factory->create($contents, $context);
|
||||||
@@ -117,9 +121,10 @@ class DescriptionFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testIfSuperfluousStartingSpacesAreRemoved() : void
|
public function testIfSuperfluousStartingSpacesAreRemoved() : void
|
||||||
{
|
{
|
||||||
@@ -162,7 +167,7 @@ DESCRIPTION;
|
|||||||
*
|
*
|
||||||
* @return string[][]
|
* @return string[][]
|
||||||
*/
|
*/
|
||||||
public function provideSimpleExampleDescriptions()
|
public function provideSimpleExampleDescriptions() : array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
['This is text for a description.'],
|
['This is text for a description.'],
|
||||||
@@ -172,7 +177,10 @@ DESCRIPTION;
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function provideEscapeSequences()
|
/**
|
||||||
|
* @return string[][]
|
||||||
|
*/
|
||||||
|
public function provideEscapeSequences() : array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
['This is text for a description with a {@}.', 'This is text for a description with a @.'],
|
['This is text for a description with a {@}.', 'This is text for a description with a @.'],
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -32,11 +32,12 @@ class DescriptionTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
|
||||||
* @covers ::render
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
|
*
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers ::render
|
||||||
*/
|
*/
|
||||||
public function testDescriptionCanRenderUsingABodyWithPlaceholdersAndTags() : void
|
public function testDescriptionCanRenderUsingABodyWithPlaceholdersAndTags() : void
|
||||||
{
|
{
|
||||||
@@ -56,12 +57,13 @@ class DescriptionTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
|
||||||
* @covers ::render
|
|
||||||
* @covers ::__toString
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
|
*
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers ::render
|
||||||
|
* @covers ::__toString
|
||||||
*/
|
*/
|
||||||
public function testDescriptionCanBeCastToString() : void
|
public function testDescriptionCanBeCastToString() : void
|
||||||
{
|
{
|
||||||
@@ -75,9 +77,10 @@ class DescriptionTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::getTags
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
|
*
|
||||||
|
* @covers ::getTags
|
||||||
*/
|
*/
|
||||||
public function testDescriptionTagsGetter() : void
|
public function testDescriptionTagsGetter() : void
|
||||||
{
|
{
|
||||||
@@ -102,12 +105,13 @@ class DescriptionTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
|
||||||
* @covers ::render
|
|
||||||
* @covers ::__toString
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
|
*
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers ::render
|
||||||
|
* @covers ::__toString
|
||||||
*/
|
*/
|
||||||
public function testDescriptionMultipleTagsCanBeCastToString() : void
|
public function testDescriptionMultipleTagsCanBeCastToString() : void
|
||||||
{
|
{
|
||||||
@@ -122,7 +126,8 @@ class DescriptionTest extends TestCase
|
|||||||
];
|
];
|
||||||
|
|
||||||
$fixture = new Description($body, $tags);
|
$fixture = new Description($body, $tags);
|
||||||
$expected = '@JoinTable(name="table", joinColumns={@JoinColumn (name="column_id", referencedColumnName="id")}, inverseJoinColumns={@JoinColumn (name="column_id_2", referencedColumnName="id")})';
|
$expected = '@JoinTable(name="table", joinColumns={@JoinColumn (name="column_id", referencedColumnName="id")}, '
|
||||||
|
. 'inverseJoinColumns={@JoinColumn (name="column_id_2", referencedColumnName="id")})';
|
||||||
$this->assertSame($expected, (string) $fixture);
|
$this->assertSame($expected, (string) $fixture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace phpDocumentor\Reflection\DocBlock;
|
namespace phpDocumentor\Reflection\DocBlock;
|
||||||
|
|
||||||
@@ -7,7 +9,7 @@ use phpDocumentor\Reflection\DocBlock\Tags\Example;
|
|||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @coversDefaultClass phpDocumentor\Reflection\DocBlock\ExampleFinder
|
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\ExampleFinder
|
||||||
* @covers ::<private>
|
* @covers ::<private>
|
||||||
*/
|
*/
|
||||||
class ExampleFinderTest extends TestCase
|
class ExampleFinderTest extends TestCase
|
||||||
@@ -29,10 +31,11 @@ class ExampleFinderTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::find
|
|
||||||
* @covers ::getSourceDirectory
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Example
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Example
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
|
* @covers ::find
|
||||||
|
* @covers ::getSourceDirectory
|
||||||
*/
|
*/
|
||||||
public function testFileNotFound() : void
|
public function testFileNotFound() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -32,13 +32,14 @@ class SerializerTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getDocComment
|
* @covers ::getDocComment
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Generic
|
|
||||||
*/
|
*/
|
||||||
public function testReconstructsADocCommentFromADocBlock() : void
|
public function testReconstructsADocCommentFromADocBlock() : void
|
||||||
{
|
{
|
||||||
@@ -66,13 +67,14 @@ DOCCOMMENT;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getDocComment
|
* @covers ::getDocComment
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Generic
|
|
||||||
*/
|
*/
|
||||||
public function testAddPrefixToDocBlock() : void
|
public function testAddPrefixToDocBlock() : void
|
||||||
{
|
{
|
||||||
@@ -100,13 +102,14 @@ DOCCOMMENT;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getDocComment
|
* @covers ::getDocComment
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Generic
|
|
||||||
*/
|
*/
|
||||||
public function testAddPrefixToDocBlockExceptFirstLine() : void
|
public function testAddPrefixToDocBlockExceptFirstLine() : void
|
||||||
{
|
{
|
||||||
@@ -134,13 +137,14 @@ DOCCOMMENT;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getDocComment
|
* @covers ::getDocComment
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Generic
|
|
||||||
*/
|
*/
|
||||||
public function testWordwrapsAroundTheGivenAmountOfCharacters() : void
|
public function testWordwrapsAroundTheGivenAmountOfCharacters() : void
|
||||||
{
|
{
|
||||||
@@ -177,7 +181,7 @@ DOCCOMMENT;
|
|||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getDocComment
|
* @covers ::getDocComment
|
||||||
*/
|
*/
|
||||||
public function testNoExtraSpacesAfterTagRemoval()
|
public function testNoExtraSpacesAfterTagRemoval() : void
|
||||||
{
|
{
|
||||||
$expected = <<<'DOCCOMMENT'
|
$expected = <<<'DOCCOMMENT'
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ use phpDocumentor\Reflection\Types\Context;
|
|||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @coversDefaultClass phpDocumentor\Reflection\DocBlock\StandardTagFactory
|
* @coversDefaultClass \phpDocumentor\Reflection\DocBlock\StandardTagFactory
|
||||||
* @covers ::<private>
|
* @covers ::<private>
|
||||||
*/
|
*/
|
||||||
class StandardTagFactoryTest extends TestCase
|
class StandardTagFactoryTest extends TestCase
|
||||||
@@ -41,12 +41,13 @@ class StandardTagFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Generic
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testCreatingAGenericTag() : void
|
public function testCreatingAGenericTag() : void
|
||||||
{
|
{
|
||||||
@@ -74,11 +75,12 @@ class StandardTagFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Author
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
|
||||||
*/
|
*/
|
||||||
public function testCreatingASpecificTag() : void
|
public function testCreatingASpecificTag() : void
|
||||||
{
|
{
|
||||||
@@ -93,13 +95,14 @@ class StandardTagFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\See
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\See
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
* @uses \phpDocumentor\Reflection\Fqsen
|
* @uses \phpDocumentor\Reflection\Fqsen
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen
|
||||||
|
*
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testAnEmptyContextIsCreatedIfNoneIsProvided() : void
|
public function testAnEmptyContextIsCreatedIfNoneIsProvided() : void
|
||||||
{
|
{
|
||||||
@@ -123,11 +126,12 @@ class StandardTagFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Author
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
|
||||||
*/
|
*/
|
||||||
public function testPassingYourOwnSetOfTagHandlers() : void
|
public function testPassingYourOwnSetOfTagHandlers() : void
|
||||||
{
|
{
|
||||||
@@ -142,22 +146,26 @@ class StandardTagFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
||||||
|
*
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
|
||||||
*/
|
*/
|
||||||
public function testExceptionIsThrownIfProvidedTagIsNotWellformed() : void
|
public function testExceptionIsThrownIfProvidedTagIsNotWellformed() : void
|
||||||
{
|
{
|
||||||
$this->expectException('InvalidArgumentException');
|
$this->expectException('InvalidArgumentException');
|
||||||
$this->expectExceptionMessage('The tag "@user[myuser" does not seem to be wellformed, please check it for errors');
|
$this->expectExceptionMessage(
|
||||||
|
'The tag "@user[myuser" does not seem to be wellformed, please check it for errors'
|
||||||
|
);
|
||||||
$tagFactory = new StandardTagFactory(m::mock(FqsenResolver::class));
|
$tagFactory = new StandardTagFactory(m::mock(FqsenResolver::class));
|
||||||
$tagFactory->create('@user[myuser');
|
$tagFactory->create('@user[myuser');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::addParameter
|
* @covers ::addParameter
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
|
||||||
*/
|
*/
|
||||||
public function testAddParameterToServiceLocator() : void
|
public function testAddParameterToServiceLocator() : void
|
||||||
{
|
{
|
||||||
@@ -173,8 +181,9 @@ class StandardTagFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
|
||||||
|
*
|
||||||
* @covers ::addService
|
* @covers ::addService
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
|
|
||||||
*/
|
*/
|
||||||
public function testAddServiceToServiceLocator() : void
|
public function testAddServiceToServiceLocator() : void
|
||||||
{
|
{
|
||||||
@@ -192,8 +201,9 @@ class StandardTagFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
|
||||||
|
*
|
||||||
* @covers ::addService
|
* @covers ::addService
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
|
|
||||||
*/
|
*/
|
||||||
public function testInjectConcreteServiceForInterfaceToServiceLocator() : void
|
public function testInjectConcreteServiceForInterfaceToServiceLocator() : void
|
||||||
{
|
{
|
||||||
@@ -212,11 +222,12 @@ class StandardTagFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::create
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author
|
||||||
|
*
|
||||||
* @covers ::registerTagHandler
|
* @covers ::registerTagHandler
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::create
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Author
|
|
||||||
*/
|
*/
|
||||||
public function testRegisteringAHandlerForANewTag() : void
|
public function testRegisteringAHandlerForANewTag() : void
|
||||||
{
|
{
|
||||||
@@ -231,22 +242,25 @@ class StandardTagFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
||||||
|
*
|
||||||
* @covers ::registerTagHandler
|
* @covers ::registerTagHandler
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
|
||||||
*/
|
*/
|
||||||
public function testHandlerRegistrationFailsIfProvidedTagNameIsNamespaceButNotFullyQualified() : void
|
public function testHandlerRegistrationFailsIfProvidedTagNameIsNamespaceButNotFullyQualified() : void
|
||||||
{
|
{
|
||||||
$this->expectException('InvalidArgumentException');
|
$this->expectException('InvalidArgumentException');
|
||||||
$resolver = m::mock(FqsenResolver::class);
|
$resolver = m::mock(FqsenResolver::class);
|
||||||
$tagFactory = new StandardTagFactory($resolver);
|
$tagFactory = new StandardTagFactory($resolver);
|
||||||
|
// phpcs:ignore SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName
|
||||||
$tagFactory->registerTagHandler(\Name\Spaced\Tag::class, Author::class);
|
$tagFactory->registerTagHandler(\Name\Spaced\Tag::class, Author::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
||||||
|
*
|
||||||
* @covers ::registerTagHandler
|
* @covers ::registerTagHandler
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
|
||||||
*/
|
*/
|
||||||
public function testHandlerRegistrationFailsIfProvidedHandlerIsEmpty() : void
|
public function testHandlerRegistrationFailsIfProvidedHandlerIsEmpty() : void
|
||||||
{
|
{
|
||||||
@@ -257,9 +271,10 @@ class StandardTagFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
||||||
|
*
|
||||||
* @covers ::registerTagHandler
|
* @covers ::registerTagHandler
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
|
||||||
*/
|
*/
|
||||||
public function testHandlerRegistrationFailsIfProvidedHandlerIsNotAnExistingClassName() : void
|
public function testHandlerRegistrationFailsIfProvidedHandlerIsNotAnExistingClassName() : void
|
||||||
{
|
{
|
||||||
@@ -270,9 +285,10 @@ class StandardTagFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
||||||
|
*
|
||||||
* @covers ::registerTagHandler
|
* @covers ::registerTagHandler
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
|
||||||
*/
|
*/
|
||||||
public function testHandlerRegistrationFailsIfProvidedHandlerDoesNotImplementTheTagInterface() : void
|
public function testHandlerRegistrationFailsIfProvidedHandlerDoesNotImplementTheTagInterface() : void
|
||||||
{
|
{
|
||||||
@@ -283,14 +299,15 @@ class StandardTagFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
||||||
|
* @uses \phpDocumentor\Reflection\Docblock\Description
|
||||||
|
* @uses \phpDocumentor\Reflection\Docblock\Tags\Return_
|
||||||
|
* @uses \phpDocumentor\Reflection\Docblock\Tags\BaseTag
|
||||||
|
*
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::__construct
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\StandardTagFactory::addService
|
|
||||||
* @uses phpDocumentor\Reflection\Docblock\Description
|
|
||||||
* @uses phpDocumentor\Reflection\Docblock\Tags\Return_
|
|
||||||
* @uses phpDocumentor\Reflection\Docblock\Tags\BaseTag
|
|
||||||
*/
|
*/
|
||||||
public function testReturntagIsMappedCorrectly(): void
|
public function testReturnTagIsMappedCorrectly() : void
|
||||||
{
|
{
|
||||||
$context = new Context('');
|
$context = new Context('');
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -32,6 +32,7 @@ class AuthorTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::__construct
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
public function testIfCorrectTagNameIsReturned() : void
|
public function testIfCorrectTagNameIsReturned() : void
|
||||||
@@ -45,6 +46,7 @@ class AuthorTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::__toString
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
@@ -57,6 +59,7 @@ class AuthorTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::__construct
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
*/
|
*/
|
||||||
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
||||||
@@ -127,8 +130,9 @@ class AuthorTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::<public>
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethod() : void
|
public function testFactoryMethod() : void
|
||||||
{
|
{
|
||||||
@@ -140,8 +144,9 @@ class AuthorTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Author::<public>
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethodReturnsNullIfItCouldNotReadBody() : void
|
public function testFactoryMethodReturnsNullIfItCouldNotReadBody() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -38,6 +38,7 @@ class CoversTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Covers::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Covers::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
public function testIfCorrectTagNameIsReturned() : void
|
public function testIfCorrectTagNameIsReturned() : void
|
||||||
@@ -52,6 +53,7 @@ class CoversTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Covers::__toString
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Covers::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
@@ -65,6 +67,7 @@ class CoversTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Covers::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Covers::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
*/
|
*/
|
||||||
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
||||||
@@ -91,9 +94,10 @@ class CoversTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testHasDescription() : void
|
public function testHasDescription() : void
|
||||||
{
|
{
|
||||||
@@ -105,9 +109,10 @@ class CoversTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::__toString
|
* @covers ::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testStringRepresentationIsReturned() : void
|
public function testStringRepresentationIsReturned() : void
|
||||||
{
|
{
|
||||||
@@ -117,13 +122,14 @@ class CoversTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Covers::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Covers::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\FqsenResolver
|
* @uses \phpDocumentor\Reflection\FqsenResolver
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Fqsen
|
* @uses \phpDocumentor\Reflection\Fqsen
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethod() : void
|
public function testFactoryMethod() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -36,6 +36,7 @@ class DeprecatedTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
public function testIfCorrectTagNameIsReturned() : void
|
public function testIfCorrectTagNameIsReturned() : void
|
||||||
@@ -50,6 +51,7 @@ class DeprecatedTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated::__toString
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
@@ -63,6 +65,7 @@ class DeprecatedTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
*/
|
*/
|
||||||
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
||||||
@@ -89,9 +92,10 @@ class DeprecatedTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testHasDescription() : void
|
public function testHasDescription() : void
|
||||||
{
|
{
|
||||||
@@ -103,9 +107,10 @@ class DeprecatedTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::__toString
|
* @covers ::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testStringRepresentationIsReturned() : void
|
public function testStringRepresentationIsReturned() : void
|
||||||
{
|
{
|
||||||
@@ -115,11 +120,12 @@ class DeprecatedTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethod() : void
|
public function testFactoryMethod() : void
|
||||||
{
|
{
|
||||||
@@ -139,11 +145,12 @@ class DeprecatedTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethodCreatesEmptyDeprecatedTag() : void
|
public function testFactoryMethodCreatesEmptyDeprecatedTag() : void
|
||||||
{
|
{
|
||||||
@@ -158,8 +165,9 @@ class DeprecatedTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated::__construct
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethodReturnsNullIfBodyDoesNotMatchRegex() : void
|
public function testFactoryMethodReturnsNullIfBodyDoesNotMatchRegex() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace DocBlock\Tags;
|
namespace DocBlock\Tags;
|
||||||
|
|
||||||
@@ -20,10 +22,11 @@ class ExampleTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
|
*
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getContent
|
* @covers ::getContent
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
|
||||||
*/
|
*/
|
||||||
public function testExampleWithoutContent() : void
|
public function testExampleWithoutContent() : void
|
||||||
{
|
{
|
||||||
@@ -34,11 +37,12 @@ class ExampleTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
|
*
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getFilePath
|
* @covers ::getFilePath
|
||||||
* @covers ::getDescription
|
* @covers ::getDescription
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
|
||||||
*/
|
*/
|
||||||
public function testWithDescription() : void
|
public function testWithDescription() : void
|
||||||
{
|
{
|
||||||
@@ -48,11 +52,12 @@ class ExampleTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
|
*
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getFilePath
|
* @covers ::getFilePath
|
||||||
* @covers ::getStartingLine
|
* @covers ::getStartingLine
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
|
||||||
*/
|
*/
|
||||||
public function testStartlineIsParsed() : void
|
public function testStartlineIsParsed() : void
|
||||||
{
|
{
|
||||||
@@ -62,12 +67,13 @@ class ExampleTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
|
*
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getFilePath
|
* @covers ::getFilePath
|
||||||
* @covers ::getStartingLine
|
* @covers ::getStartingLine
|
||||||
* @covers ::getDescription
|
* @covers ::getDescription
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
|
||||||
*/
|
*/
|
||||||
public function testAllowOmitingLineCount() : void
|
public function testAllowOmitingLineCount() : void
|
||||||
{
|
{
|
||||||
@@ -78,12 +84,13 @@ class ExampleTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
|
*
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getFilePath
|
* @covers ::getFilePath
|
||||||
* @covers ::getStartingLine
|
* @covers ::getStartingLine
|
||||||
* @covers ::getLineCount
|
* @covers ::getLineCount
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
|
||||||
*/
|
*/
|
||||||
public function testLengthIsParsed() : void
|
public function testLengthIsParsed() : void
|
||||||
{
|
{
|
||||||
@@ -94,13 +101,14 @@ class ExampleTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
|
*
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getFilePath
|
* @covers ::getFilePath
|
||||||
* @covers ::getStartingLine
|
* @covers ::getStartingLine
|
||||||
* @covers ::getLineCount
|
* @covers ::getLineCount
|
||||||
* @covers ::getDescription
|
* @covers ::getDescription
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
|
||||||
*/
|
*/
|
||||||
public function testFullExample() : void
|
public function testFullExample() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,9 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @author Jan Schneider <jan@horde.org>
|
|
||||||
* @copyright 2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -16,7 +15,7 @@ namespace phpDocumentor\Reflection\DocBlock\Tags\Formatter;
|
|||||||
|
|
||||||
use Mockery as m;
|
use Mockery as m;
|
||||||
use phpDocumentor\Reflection\DocBlock\Description;
|
use phpDocumentor\Reflection\DocBlock\Description;
|
||||||
use phpDocumentor\Reflection\DocBlock\Tags\Link;
|
use phpDocumentor\Reflection\DocBlock\Tags\Link as LinkTag;
|
||||||
use phpDocumentor\Reflection\DocBlock\Tags\Param;
|
use phpDocumentor\Reflection\DocBlock\Tags\Param;
|
||||||
use phpDocumentor\Reflection\DocBlock\Tags\Version;
|
use phpDocumentor\Reflection\DocBlock\Tags\Version;
|
||||||
use phpDocumentor\Reflection\Types\String_;
|
use phpDocumentor\Reflection\Types\String_;
|
||||||
@@ -36,21 +35,22 @@ class AlignFormatterTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::format
|
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\Formatter\AlignFormatter::__construct
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Link
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Link
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Param
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Param
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Version
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Version
|
||||||
* @uses \phpDocumentor\Reflection\Types\String_
|
* @uses \phpDocumentor\Reflection\Types\String_
|
||||||
|
*
|
||||||
|
* @covers ::format
|
||||||
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\Formatter\AlignFormatter::__construct
|
||||||
*/
|
*/
|
||||||
public function testFormatterCallsToStringAndReturnsAStandardRepresentation() : void
|
public function testFormatterCallsToStringAndReturnsAStandardRepresentation() : void
|
||||||
{
|
{
|
||||||
$tags = [
|
$tags = [
|
||||||
new Param('foobar', new String_()),
|
new Param('foobar', new String_()),
|
||||||
new Version('1.2.0'),
|
new Version('1.2.0'),
|
||||||
new Link('http://www.example.com', new Description('Examples')),
|
new LinkTag('http://www.example.com', new Description('Examples')),
|
||||||
];
|
];
|
||||||
$fixture = new AlignFormatter($tags);
|
$fixture = new AlignFormatter($tags);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -32,10 +32,11 @@ class PassthroughFormatterTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::format
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic
|
||||||
|
*
|
||||||
|
* @covers ::format
|
||||||
*/
|
*/
|
||||||
public function testFormatterCallsToStringAndReturnsAStandardRepresentation() : void
|
public function testFormatterCallsToStringAndReturnsAStandardRepresentation() : void
|
||||||
{
|
{
|
||||||
@@ -50,10 +51,11 @@ class PassthroughFormatterTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::format
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic
|
||||||
|
*
|
||||||
|
* @covers ::format
|
||||||
*/
|
*/
|
||||||
public function testFormatterToStringWitoutDescription() : void
|
public function testFormatterToStringWitoutDescription() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @generic http://phpdoc.org
|
* @generic http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -36,6 +36,7 @@ class GenericTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
public function testIfCorrectTagNameIsReturned() : void
|
public function testIfCorrectTagNameIsReturned() : void
|
||||||
@@ -51,6 +52,7 @@ class GenericTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
*/
|
*/
|
||||||
public function testIfTagCanBeRenderedUsingDefaultFormatter() : void
|
public function testIfTagCanBeRenderedUsingDefaultFormatter() : void
|
||||||
@@ -63,6 +65,7 @@ class GenericTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
*/
|
*/
|
||||||
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
||||||
@@ -76,9 +79,10 @@ class GenericTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testHasDescription() : void
|
public function testHasDescription() : void
|
||||||
{
|
{
|
||||||
@@ -90,10 +94,11 @@ class GenericTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
|
||||||
* @covers ::__toString
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
|
*
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers ::__toString
|
||||||
*/
|
*/
|
||||||
public function testStringRepresentationIsReturned() : void
|
public function testStringRepresentationIsReturned() : void
|
||||||
{
|
{
|
||||||
@@ -103,11 +108,12 @@ class GenericTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Generic::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethod() : void
|
public function testFactoryMethod() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -36,6 +36,7 @@ class LinkTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Link::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Link::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
public function testIfCorrectTagNameIsReturned() : void
|
public function testIfCorrectTagNameIsReturned() : void
|
||||||
@@ -50,6 +51,7 @@ class LinkTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Link::__toString
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Link::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
@@ -63,6 +65,7 @@ class LinkTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Link::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Link::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
*/
|
*/
|
||||||
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
||||||
@@ -89,9 +92,10 @@ class LinkTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testHasDescription() : void
|
public function testHasDescription() : void
|
||||||
{
|
{
|
||||||
@@ -103,9 +107,10 @@ class LinkTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::__toString
|
* @covers ::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testStringRepresentationIsReturned() : void
|
public function testStringRepresentationIsReturned() : void
|
||||||
{
|
{
|
||||||
@@ -115,11 +120,12 @@ class LinkTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Link::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Link::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethod() : void
|
public function testFactoryMethod() : void
|
||||||
{
|
{
|
||||||
@@ -139,11 +145,12 @@ class LinkTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Link::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Link::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethodCreatesEmptyLinkTag() : void
|
public function testFactoryMethodCreatesEmptyLinkTag() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -44,6 +44,7 @@ class MethodTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::__construct
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
public function testIfCorrectTagNameIsReturned() : void
|
public function testIfCorrectTagNameIsReturned() : void
|
||||||
@@ -59,6 +60,7 @@ class MethodTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::__toString
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
@@ -68,7 +70,14 @@ class MethodTest extends TestCase
|
|||||||
['name' => 'argument1', 'type' => new String_()],
|
['name' => 'argument1', 'type' => new String_()],
|
||||||
['name' => 'argument2', 'type' => new Object_()],
|
['name' => 'argument2', 'type' => new Object_()],
|
||||||
];
|
];
|
||||||
$fixture = new Method('myMethod', $arguments, new Void_(), true, new Description('My Description'));
|
|
||||||
|
$fixture = new Method(
|
||||||
|
'myMethod',
|
||||||
|
$arguments,
|
||||||
|
new Void_(),
|
||||||
|
true,
|
||||||
|
new Description('My Description')
|
||||||
|
);
|
||||||
|
|
||||||
$this->assertSame(
|
$this->assertSame(
|
||||||
'@method static void myMethod(string $argument1, object $argument2) My Description',
|
'@method static void myMethod(string $argument1, object $argument2) My Description',
|
||||||
@@ -79,6 +88,7 @@ class MethodTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
*/
|
*/
|
||||||
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
||||||
@@ -152,10 +162,11 @@ class MethodTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::getArguments
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::getArguments
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testRestArgumentIsParsedAsRegularArg() : void
|
public function testRestArgumentIsParsedAsRegularArg() : void
|
||||||
{
|
{
|
||||||
@@ -221,9 +232,10 @@ class MethodTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testHasDescription() : void
|
public function testHasDescription() : void
|
||||||
{
|
{
|
||||||
@@ -235,10 +247,11 @@ class MethodTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
|
||||||
* @covers ::__toString
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::isStatic
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::isStatic
|
||||||
|
*
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers ::__toString
|
||||||
*/
|
*/
|
||||||
public function testStringRepresentationIsReturned() : void
|
public function testStringRepresentationIsReturned() : void
|
||||||
{
|
{
|
||||||
@@ -255,13 +268,14 @@ class MethodTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Fqsen
|
* @uses \phpDocumentor\Reflection\Fqsen
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethod() : void
|
public function testFactoryMethod() : void
|
||||||
{
|
{
|
||||||
@@ -292,11 +306,12 @@ class MethodTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::<public>
|
||||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testReturnTypeThis() : void
|
public function testReturnTypeThis() : void
|
||||||
{
|
{
|
||||||
@@ -321,7 +336,10 @@ class MethodTest extends TestCase
|
|||||||
$this->assertInstanceOf(This::class, $fixture->getReturnType());
|
$this->assertInstanceOf(This::class, $fixture->getReturnType());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function collectionReturnTypesProvider()
|
/**
|
||||||
|
* @return string[][]
|
||||||
|
*/
|
||||||
|
public function collectionReturnTypesProvider() : array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
['int[]', Array_::class, Integer::class, Compound::class],
|
['int[]', Array_::class, Integer::class, Compound::class],
|
||||||
@@ -332,16 +350,17 @@ class MethodTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::<public>
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
|
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||||
|
* @uses \phpDocumentor\Reflection\Types\Array_
|
||||||
|
* @uses \phpDocumentor\Reflection\Types\Compound
|
||||||
|
* @uses \phpDocumentor\Reflection\Types\Integer
|
||||||
|
* @uses \phpDocumentor\Reflection\Types\Object_
|
||||||
|
*
|
||||||
* @dataProvider collectionReturnTypesProvider
|
* @dataProvider collectionReturnTypesProvider
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Method::<public>
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
|
||||||
* @uses phpDocumentor\Reflection\TypeResolver
|
|
||||||
* @uses phpDocumentor\Reflection\Types\Array_
|
|
||||||
* @uses phpDocumentor\Reflection\Types\Compound
|
|
||||||
* @uses phpDocumentor\Reflection\Types\Integer
|
|
||||||
* @uses phpDocumentor\Reflection\Types\Object_
|
|
||||||
*/
|
*/
|
||||||
public function testCollectionReturnTypes(
|
public function testCollectionReturnTypes(
|
||||||
string $returnType,
|
string $returnType,
|
||||||
@@ -357,11 +376,13 @@ class MethodTest extends TestCase
|
|||||||
$returnType = $fixture->getReturnType();
|
$returnType = $fixture->getReturnType();
|
||||||
$this->assertInstanceOf($expectedType, $returnType);
|
$this->assertInstanceOf($expectedType, $returnType);
|
||||||
|
|
||||||
if ($returnType instanceof Array_) {
|
if (!($returnType instanceof Array_)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->assertInstanceOf($expectedValueType, $returnType->getValueType());
|
$this->assertInstanceOf($expectedValueType, $returnType->getValueType());
|
||||||
$this->assertInstanceOf($expectedKeyType, $returnType->getKeyType());
|
$this->assertInstanceOf($expectedKeyType, $returnType->getKeyType());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
@@ -399,15 +420,6 @@ class MethodTest extends TestCase
|
|||||||
Method::create('body', new TypeResolver());
|
Method::create('body', new TypeResolver());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @covers ::__construct
|
|
||||||
*/
|
|
||||||
public function testCreationFailsIfBodyIsNotString(): void
|
|
||||||
{
|
|
||||||
$this->expectException('InvalidArgumentException');
|
|
||||||
new Method([]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
*/
|
*/
|
||||||
@@ -417,15 +429,6 @@ class MethodTest extends TestCase
|
|||||||
new Method('');
|
new Method('');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @covers ::__construct
|
|
||||||
*/
|
|
||||||
public function testCreationFailsIfStaticIsNotBoolean(): void
|
|
||||||
{
|
|
||||||
$this->expectException('InvalidArgumentException');
|
|
||||||
new Method('body', [], null, []);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
*/
|
*/
|
||||||
@@ -436,13 +439,14 @@ class MethodTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Fqsen
|
* @uses \phpDocumentor\Reflection\Fqsen
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testCreateMethodParenthesisMissing() : void
|
public function testCreateMethodParenthesisMissing() : void
|
||||||
{
|
{
|
||||||
@@ -469,7 +473,6 @@ class MethodTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||||
@@ -477,6 +480,8 @@ class MethodTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\Fqsen
|
* @uses \phpDocumentor\Reflection\Fqsen
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
* @uses \phpDocumentor\Reflection\Types\Void_
|
* @uses \phpDocumentor\Reflection\Types\Void_
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testCreateWithoutReturnType() : void
|
public function testCreateWithoutReturnType() : void
|
||||||
{
|
{
|
||||||
@@ -503,7 +508,6 @@ class MethodTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||||
@@ -514,6 +518,8 @@ class MethodTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\Types\Compound
|
* @uses \phpDocumentor\Reflection\Types\Compound
|
||||||
* @uses \phpDocumentor\Reflection\Types\Integer
|
* @uses \phpDocumentor\Reflection\Types\Integer
|
||||||
* @uses \phpDocumentor\Reflection\Types\Object_
|
* @uses \phpDocumentor\Reflection\Types\Object_
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testCreateWithMixedReturnTypes() : void
|
public function testCreateWithMixedReturnTypes() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -38,6 +38,7 @@ class ParamTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Param::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Param::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
public function testIfCorrectTagNameIsReturned() : void
|
public function testIfCorrectTagNameIsReturned() : void
|
||||||
@@ -53,6 +54,7 @@ class ParamTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Param::__toString
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Param::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
@@ -73,6 +75,7 @@ class ParamTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Param::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Param::__construct
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
*/
|
*/
|
||||||
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
||||||
@@ -125,9 +128,10 @@ class ParamTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testHasDescription() : void
|
public function testHasDescription() : void
|
||||||
{
|
{
|
||||||
@@ -139,11 +143,12 @@ class ParamTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
* @uses \phpDocumentor\Reflection\Types\String_
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::isVariadic
|
* @covers ::isVariadic
|
||||||
* @covers ::__toString
|
* @covers ::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
* @uses \phpDocumentor\Reflection\Types\String_
|
|
||||||
*/
|
*/
|
||||||
public function testStringRepresentationIsReturned() : void
|
public function testStringRepresentationIsReturned() : void
|
||||||
{
|
{
|
||||||
@@ -153,11 +158,12 @@ class ParamTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Param::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Param::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethod() : void
|
public function testFactoryMethod() : void
|
||||||
{
|
{
|
||||||
@@ -178,10 +184,11 @@ class ParamTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Param::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Param::<public>
|
||||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethodFailsIfEmptyBodyIsGiven() : void
|
public function testFactoryMethodFailsIfEmptyBodyIsGiven() : void
|
||||||
{
|
{
|
||||||
@@ -200,8 +207,9 @@ class ParamTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull() : void
|
public function testFactoryMethodFailsIfDescriptionFactoryIsNull() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -38,6 +38,7 @@ class PropertyReadTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyRead::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyRead::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
public function testIfCorrectTagNameIsReturned() : void
|
public function testIfCorrectTagNameIsReturned() : void
|
||||||
@@ -52,6 +53,7 @@ class PropertyReadTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyRead::__toString
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyRead::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
@@ -69,6 +71,7 @@ class PropertyReadTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyRead::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyRead::__construct
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
*/
|
*/
|
||||||
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
||||||
@@ -108,9 +111,10 @@ class PropertyReadTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testHasDescription() : void
|
public function testHasDescription() : void
|
||||||
{
|
{
|
||||||
@@ -122,10 +126,11 @@ class PropertyReadTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
|
||||||
* @covers ::__toString
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\String_
|
* @uses \phpDocumentor\Reflection\Types\String_
|
||||||
|
*
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers ::__toString
|
||||||
*/
|
*/
|
||||||
public function testStringRepresentationIsReturned() : void
|
public function testStringRepresentationIsReturned() : void
|
||||||
{
|
{
|
||||||
@@ -135,11 +140,12 @@ class PropertyReadTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyRead::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyRead::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethod() : void
|
public function testFactoryMethod() : void
|
||||||
{
|
{
|
||||||
@@ -164,10 +170,11 @@ class PropertyReadTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyRead::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyRead::<public>
|
||||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethodFailsIfEmptyBodyIsGiven() : void
|
public function testFactoryMethodFailsIfEmptyBodyIsGiven() : void
|
||||||
{
|
{
|
||||||
@@ -186,8 +193,9 @@ class PropertyReadTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull() : void
|
public function testFactoryMethodFailsIfDescriptionFactoryIsNull() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -38,6 +38,7 @@ class PropertyTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Property::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Property::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
public function testIfCorrectTagNameIsReturned() : void
|
public function testIfCorrectTagNameIsReturned() : void
|
||||||
@@ -52,6 +53,7 @@ class PropertyTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Property::__toString
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Property::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
@@ -69,6 +71,7 @@ class PropertyTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Property::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Property::__construct
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
*/
|
*/
|
||||||
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
||||||
@@ -108,9 +111,10 @@ class PropertyTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testHasDescription() : void
|
public function testHasDescription() : void
|
||||||
{
|
{
|
||||||
@@ -122,10 +126,11 @@ class PropertyTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
|
||||||
* @covers ::__toString
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\String_
|
* @uses \phpDocumentor\Reflection\Types\String_
|
||||||
|
*
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers ::__toString
|
||||||
*/
|
*/
|
||||||
public function testStringRepresentationIsReturned() : void
|
public function testStringRepresentationIsReturned() : void
|
||||||
{
|
{
|
||||||
@@ -135,11 +140,12 @@ class PropertyTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Property::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Property::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethod() : void
|
public function testFactoryMethod() : void
|
||||||
{
|
{
|
||||||
@@ -159,10 +165,11 @@ class PropertyTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Property::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Property::<public>
|
||||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethodFailsIfEmptyBodyIsGiven() : void
|
public function testFactoryMethodFailsIfEmptyBodyIsGiven() : void
|
||||||
{
|
{
|
||||||
@@ -181,8 +188,9 @@ class PropertyTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull() : void
|
public function testFactoryMethodFailsIfDescriptionFactoryIsNull() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -38,6 +38,7 @@ class PropertyWriteTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
public function testIfCorrectTagNameIsReturned() : void
|
public function testIfCorrectTagNameIsReturned() : void
|
||||||
@@ -52,6 +53,7 @@ class PropertyWriteTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite::__toString
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
@@ -69,6 +71,7 @@ class PropertyWriteTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite::__construct
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
*/
|
*/
|
||||||
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
||||||
@@ -108,9 +111,10 @@ class PropertyWriteTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testHasDescription() : void
|
public function testHasDescription() : void
|
||||||
{
|
{
|
||||||
@@ -122,10 +126,11 @@ class PropertyWriteTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
|
||||||
* @covers ::__toString
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\String_
|
* @uses \phpDocumentor\Reflection\Types\String_
|
||||||
|
*
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers ::__toString
|
||||||
*/
|
*/
|
||||||
public function testStringRepresentationIsReturned() : void
|
public function testStringRepresentationIsReturned() : void
|
||||||
{
|
{
|
||||||
@@ -135,11 +140,12 @@ class PropertyWriteTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethod() : void
|
public function testFactoryMethod() : void
|
||||||
{
|
{
|
||||||
@@ -164,10 +170,11 @@ class PropertyWriteTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite::<public>
|
||||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethodFailsIfEmptyBodyIsGiven() : void
|
public function testFactoryMethodFailsIfEmptyBodyIsGiven() : void
|
||||||
{
|
{
|
||||||
@@ -186,8 +193,9 @@ class PropertyWriteTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull() : void
|
public function testFactoryMethodFailsIfDescriptionFactoryIsNull() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -38,6 +38,7 @@ class ReturnTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Return_::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Return_::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
public function testIfCorrectTagNameIsReturned() : void
|
public function testIfCorrectTagNameIsReturned() : void
|
||||||
@@ -52,6 +53,7 @@ class ReturnTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Return_::__toString
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Return_::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
@@ -65,6 +67,7 @@ class ReturnTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Return_::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Return_::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
*/
|
*/
|
||||||
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
||||||
@@ -91,9 +94,10 @@ class ReturnTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testHasDescription() : void
|
public function testHasDescription() : void
|
||||||
{
|
{
|
||||||
@@ -105,9 +109,10 @@ class ReturnTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::__toString
|
* @covers ::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testStringRepresentationIsReturned() : void
|
public function testStringRepresentationIsReturned() : void
|
||||||
{
|
{
|
||||||
@@ -117,13 +122,14 @@ class ReturnTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Return_::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Return_::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\String_
|
* @uses \phpDocumentor\Reflection\Types\String_
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethod() : void
|
public function testFactoryMethod() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -42,6 +42,7 @@ class SeeTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen
|
||||||
* @uses \phpDocumentor\Reflection\Fqsen
|
* @uses \phpDocumentor\Reflection\Fqsen
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
public function testIfCorrectTagNameIsReturned() : void
|
public function testIfCorrectTagNameIsReturned() : void
|
||||||
@@ -57,6 +58,7 @@ class SeeTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
@@ -72,6 +74,7 @@ class SeeTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen
|
||||||
* @uses \phpDocumentor\Reflection\Fqsen
|
* @uses \phpDocumentor\Reflection\Fqsen
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
*/
|
*/
|
||||||
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
||||||
@@ -87,6 +90,7 @@ class SeeTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen
|
||||||
* @uses \phpDocumentor\Reflection\Fqsen
|
* @uses \phpDocumentor\Reflection\Fqsen
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getReference
|
* @covers ::getReference
|
||||||
*/
|
*/
|
||||||
@@ -100,11 +104,12 @@ class SeeTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen
|
||||||
* @uses \phpDocumentor\Reflection\Fqsen
|
* @uses \phpDocumentor\Reflection\Fqsen
|
||||||
|
*
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||||
*/
|
*/
|
||||||
public function testHasDescription() : void
|
public function testHasDescription() : void
|
||||||
{
|
{
|
||||||
@@ -116,11 +121,12 @@ class SeeTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
|
||||||
* @covers ::__toString
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen
|
||||||
* @uses \phpDocumentor\Reflection\Fqsen
|
* @uses \phpDocumentor\Reflection\Fqsen
|
||||||
|
*
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers ::__toString
|
||||||
*/
|
*/
|
||||||
public function testStringRepresentationIsReturned() : void
|
public function testStringRepresentationIsReturned() : void
|
||||||
{
|
{
|
||||||
@@ -130,7 +136,6 @@ class SeeTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\See::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\See::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\FqsenResolver
|
* @uses \phpDocumentor\Reflection\FqsenResolver
|
||||||
@@ -138,6 +143,8 @@ class SeeTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen
|
||||||
* @uses \phpDocumentor\Reflection\Fqsen
|
* @uses \phpDocumentor\Reflection\Fqsen
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethod() : void
|
public function testFactoryMethod() : void
|
||||||
{
|
{
|
||||||
@@ -161,13 +168,14 @@ class SeeTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\See::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\See::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\FqsenResolver
|
* @uses \phpDocumentor\Reflection\FqsenResolver
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Url
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Reference\Url
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethodWithUrl() : void
|
public function testFactoryMethodWithUrl() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -36,6 +36,7 @@ class SinceTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Since::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Since::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
public function testIfCorrectTagNameIsReturned() : void
|
public function testIfCorrectTagNameIsReturned() : void
|
||||||
@@ -50,6 +51,7 @@ class SinceTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Since::__toString
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Since::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
@@ -63,6 +65,7 @@ class SinceTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Since::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Since::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
*/
|
*/
|
||||||
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
||||||
@@ -89,9 +92,10 @@ class SinceTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testHasDescription() : void
|
public function testHasDescription() : void
|
||||||
{
|
{
|
||||||
@@ -103,9 +107,10 @@ class SinceTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::__toString
|
* @covers ::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testStringRepresentationIsReturned() : void
|
public function testStringRepresentationIsReturned() : void
|
||||||
{
|
{
|
||||||
@@ -115,11 +120,12 @@ class SinceTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Since::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Since::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethod() : void
|
public function testFactoryMethod() : void
|
||||||
{
|
{
|
||||||
@@ -139,11 +145,12 @@ class SinceTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Since::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Since::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethodCreatesEmptySinceTag() : void
|
public function testFactoryMethodCreatesEmptySinceTag() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -36,6 +36,7 @@ class SourceTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Source::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Source::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
public function testIfCorrectTagNameIsReturned() : void
|
public function testIfCorrectTagNameIsReturned() : void
|
||||||
@@ -50,6 +51,7 @@ class SourceTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Source::__toString
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Source::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
@@ -67,6 +69,7 @@ class SourceTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Source::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Source::__construct
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
*/
|
*/
|
||||||
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
||||||
@@ -106,9 +109,10 @@ class SourceTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testHasDescription() : void
|
public function testHasDescription() : void
|
||||||
{
|
{
|
||||||
@@ -120,10 +124,11 @@ class SourceTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
|
||||||
* @covers ::__toString
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\String_
|
* @uses \phpDocumentor\Reflection\Types\String_
|
||||||
|
*
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers ::__toString
|
||||||
*/
|
*/
|
||||||
public function testStringRepresentationIsReturned() : void
|
public function testStringRepresentationIsReturned() : void
|
||||||
{
|
{
|
||||||
@@ -133,11 +138,12 @@ class SourceTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Source::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Source::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethod() : void
|
public function testFactoryMethod() : void
|
||||||
{
|
{
|
||||||
@@ -156,10 +162,11 @@ class SourceTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Source::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Source::<public>
|
||||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethodFailsIfEmptyBodyIsGiven() : void
|
public function testFactoryMethodFailsIfEmptyBodyIsGiven() : void
|
||||||
{
|
{
|
||||||
@@ -169,8 +176,9 @@ class SourceTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull() : void
|
public function testFactoryMethodFailsIfDescriptionFactoryIsNull() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -38,6 +38,7 @@ class ThrowsTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Throws::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Throws::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
public function testIfCorrectTagNameIsReturned() : void
|
public function testIfCorrectTagNameIsReturned() : void
|
||||||
@@ -52,6 +53,7 @@ class ThrowsTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Throws::__toString
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Throws::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
@@ -65,6 +67,7 @@ class ThrowsTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Throws::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Throws::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
*/
|
*/
|
||||||
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
||||||
@@ -91,9 +94,10 @@ class ThrowsTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testHasDescription() : void
|
public function testHasDescription() : void
|
||||||
{
|
{
|
||||||
@@ -105,9 +109,10 @@ class ThrowsTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::__toString
|
* @covers ::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testStringRepresentationIsReturned() : void
|
public function testStringRepresentationIsReturned() : void
|
||||||
{
|
{
|
||||||
@@ -117,13 +122,14 @@ class ThrowsTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Throws::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Throws::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\String_
|
* @uses \phpDocumentor\Reflection\Types\String_
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethod() : void
|
public function testFactoryMethod() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -38,6 +38,7 @@ class UsesTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Uses::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Uses::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
public function testIfCorrectTagNameIsReturned() : void
|
public function testIfCorrectTagNameIsReturned() : void
|
||||||
@@ -52,6 +53,7 @@ class UsesTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Uses::__toString
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Uses::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
@@ -65,6 +67,7 @@ class UsesTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Uses::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Uses::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
*/
|
*/
|
||||||
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
||||||
@@ -91,9 +94,10 @@ class UsesTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testHasDescription() : void
|
public function testHasDescription() : void
|
||||||
{
|
{
|
||||||
@@ -105,9 +109,10 @@ class UsesTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::__toString
|
* @covers ::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testStringRepresentationIsReturned() : void
|
public function testStringRepresentationIsReturned() : void
|
||||||
{
|
{
|
||||||
@@ -117,13 +122,14 @@ class UsesTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Uses::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Uses::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\FqsenResolver
|
* @uses \phpDocumentor\Reflection\FqsenResolver
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Fqsen
|
* @uses \phpDocumentor\Reflection\Fqsen
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethod() : void
|
public function testFactoryMethod() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -38,6 +38,7 @@ class VarTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
public function testIfCorrectTagNameIsReturned() : void
|
public function testIfCorrectTagNameIsReturned() : void
|
||||||
@@ -49,6 +50,7 @@ class VarTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_::__construct
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
*/
|
*/
|
||||||
public function testIfVariableNameIsOmmitedIfEmpty() : void
|
public function testIfVariableNameIsOmmitedIfEmpty() : void
|
||||||
@@ -63,6 +65,7 @@ class VarTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_::__toString
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
@@ -80,6 +83,7 @@ class VarTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_::__construct
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
*/
|
*/
|
||||||
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
||||||
@@ -119,9 +123,10 @@ class VarTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testHasDescription() : void
|
public function testHasDescription() : void
|
||||||
{
|
{
|
||||||
@@ -133,10 +138,11 @@ class VarTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
|
||||||
* @covers ::__toString
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\String_
|
* @uses \phpDocumentor\Reflection\Types\String_
|
||||||
|
*
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers ::__toString
|
||||||
*/
|
*/
|
||||||
public function testStringRepresentationIsReturned() : void
|
public function testStringRepresentationIsReturned() : void
|
||||||
{
|
{
|
||||||
@@ -146,11 +152,12 @@ class VarTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethod() : void
|
public function testFactoryMethod() : void
|
||||||
{
|
{
|
||||||
@@ -170,10 +177,11 @@ class VarTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Var_::<public>
|
||||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethodFailsIfEmptyBodyIsGiven() : void
|
public function testFactoryMethodFailsIfEmptyBodyIsGiven() : void
|
||||||
{
|
{
|
||||||
@@ -192,8 +200,9 @@ class VarTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethodFailsIfDescriptionFactoryIsNull() : void
|
public function testFactoryMethodFailsIfDescriptionFactoryIsNull() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -36,6 +36,7 @@ class VersionTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Version::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Version::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
public function testIfCorrectTagNameIsReturned() : void
|
public function testIfCorrectTagNameIsReturned() : void
|
||||||
@@ -50,6 +51,7 @@ class VersionTest extends TestCase
|
|||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Version::__toString
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Version::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getName
|
||||||
*/
|
*/
|
||||||
@@ -63,6 +65,7 @@ class VersionTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Version::__construct
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Version::__construct
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render
|
||||||
*/
|
*/
|
||||||
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
public function testIfTagCanBeRenderedUsingSpecificFormatter() : void
|
||||||
@@ -89,9 +92,10 @@ class VersionTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
* @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::getDescription
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testHasDescription() : void
|
public function testHasDescription() : void
|
||||||
{
|
{
|
||||||
@@ -103,9 +107,10 @@ class VersionTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::__toString
|
* @covers ::__toString
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testStringRepresentationIsReturned() : void
|
public function testStringRepresentationIsReturned() : void
|
||||||
{
|
{
|
||||||
@@ -115,11 +120,12 @@ class VersionTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Version::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Version::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethod() : void
|
public function testFactoryMethod() : void
|
||||||
{
|
{
|
||||||
@@ -139,11 +145,12 @@ class VersionTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::create
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Version::<public>
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Version::<public>
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::create
|
||||||
*/
|
*/
|
||||||
public function testFactoryMethodCreatesEmptyVersionTag() : void
|
public function testFactoryMethodCreatesEmptyVersionTag() : void
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -21,12 +21,14 @@ use phpDocumentor\Reflection\DocBlock\TagFactory;
|
|||||||
use phpDocumentor\Reflection\DocBlock\Tags\Param;
|
use phpDocumentor\Reflection\DocBlock\Tags\Param;
|
||||||
use phpDocumentor\Reflection\Types\Context;
|
use phpDocumentor\Reflection\Types\Context;
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
use ReflectionClass;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @coversDefaultClass phpDocumentor\Reflection\DocBlockFactory
|
|
||||||
* @covers ::<private>
|
|
||||||
* @uses \Webmozart\Assert\Assert
|
* @uses \Webmozart\Assert\Assert
|
||||||
* @uses phpDocumentor\Reflection\DocBlock
|
* @uses \phpDocumentor\Reflection\DocBlock
|
||||||
|
*
|
||||||
|
* @coversDefaultClass \phpDocumentor\Reflection\DocBlockFactory
|
||||||
|
* @covers ::<private>
|
||||||
*/
|
*/
|
||||||
class DocBlockFactoryTest extends TestCase
|
class DocBlockFactoryTest extends TestCase
|
||||||
{
|
{
|
||||||
@@ -39,10 +41,11 @@ class DocBlockFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
|
||||||
* @covers ::createInstance
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\StandardTagFactory
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
|
*
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers ::createInstance
|
||||||
*/
|
*/
|
||||||
public function testCreateFactoryUsingFactoryMethod() : void
|
public function testCreateFactoryUsingFactoryMethod() : void
|
||||||
{
|
{
|
||||||
@@ -52,16 +55,17 @@ class DocBlockFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testCreateDocBlockFromReflection() : void
|
public function testCreateDocBlockFromReflection() : void
|
||||||
{
|
{
|
||||||
$fixture = new DocBlockFactory(m::mock(DescriptionFactory::class), m::mock(TagFactory::class));
|
$fixture = new DocBlockFactory(m::mock(DescriptionFactory::class), m::mock(TagFactory::class));
|
||||||
|
|
||||||
$docBlock = '/** This is a DocBlock */';
|
$docBlock = '/** This is a DocBlock */';
|
||||||
$classReflector = m::mock(\ReflectionClass::class);
|
$classReflector = m::mock(ReflectionClass::class);
|
||||||
$classReflector->shouldReceive('getDocComment')->andReturn($docBlock);
|
$classReflector->shouldReceive('getDocComment')->andReturn($docBlock);
|
||||||
$docblock = $fixture->create($classReflector);
|
$docblock = $fixture->create($classReflector);
|
||||||
|
|
||||||
@@ -74,9 +78,10 @@ class DocBlockFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testCreateDocBlockFromStringWithDocComment() : void
|
public function testCreateDocBlockFromStringWithDocComment() : void
|
||||||
{
|
{
|
||||||
@@ -93,9 +98,10 @@ class DocBlockFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testCreateDocBlockFromStringWithoutDocComment() : void
|
public function testCreateDocBlockFromStringWithoutDocComment() : void
|
||||||
{
|
{
|
||||||
@@ -112,13 +118,15 @@ class DocBlockFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
*
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
* @dataProvider provideSummaryAndDescriptions
|
* @dataProvider provideSummaryAndDescriptions
|
||||||
*/
|
*/
|
||||||
public function testSummaryAndDescriptionAreSeparated($given, $summary, $description): void
|
public function testSummaryAndDescriptionAreSeparated(string $given, string $summary, string $description) : void
|
||||||
{
|
{
|
||||||
$tagFactory = m::mock(TagFactory::class);
|
$tagFactory = m::mock(TagFactory::class);
|
||||||
$fixture = new DocBlockFactory(new DescriptionFactory($tagFactory), $tagFactory);
|
$fixture = new DocBlockFactory(new DescriptionFactory($tagFactory), $tagFactory);
|
||||||
@@ -130,10 +138,11 @@ class DocBlockFactoryTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testDescriptionsRetainFormatting() : void
|
public function testDescriptionsRetainFormatting() : void
|
||||||
{
|
{
|
||||||
@@ -163,10 +172,11 @@ DESCRIPTION;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testTagsAreInterpretedUsingFactory() : void
|
public function testTagsAreInterpretedUsingFactory() : void
|
||||||
{
|
{
|
||||||
@@ -195,7 +205,10 @@ DOCBLOCK;
|
|||||||
$this->assertEquals([$tag], $docblock->getTags());
|
$this->assertEquals([$tag], $docblock->getTags());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function provideSummaryAndDescriptions()
|
/**
|
||||||
|
* @return string[]
|
||||||
|
*/
|
||||||
|
public function provideSummaryAndDescriptions() : array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
['This is a DocBlock', 'This is a DocBlock', ''],
|
['This is a DocBlock', 'This is a DocBlock', ''],
|
||||||
@@ -208,8 +221,7 @@ DOCBLOCK;
|
|||||||
<<<DOCBLOCK
|
<<<DOCBLOCK
|
||||||
This is a DocBlock.
|
This is a DocBlock.
|
||||||
This should be a Description.
|
This should be a Description.
|
||||||
DOCBLOCK
|
DOCBLOCK,
|
||||||
,
|
|
||||||
'This is a DocBlock.',
|
'This is a DocBlock.',
|
||||||
'This should be a Description.',
|
'This should be a Description.',
|
||||||
],
|
],
|
||||||
@@ -218,8 +230,7 @@ DOCBLOCK
|
|||||||
This is a
|
This is a
|
||||||
multiline Summary.
|
multiline Summary.
|
||||||
This should be a Description.
|
This should be a Description.
|
||||||
DOCBLOCK
|
DOCBLOCK,
|
||||||
,
|
|
||||||
"This is a\nmultiline Summary.",
|
"This is a\nmultiline Summary.",
|
||||||
'This should be a Description.',
|
'This should be a Description.',
|
||||||
],
|
],
|
||||||
@@ -228,8 +239,7 @@ DOCBLOCK
|
|||||||
This is a Summary without dot but with a whiteline
|
This is a Summary without dot but with a whiteline
|
||||||
|
|
||||||
This should be a Description.
|
This should be a Description.
|
||||||
DOCBLOCK
|
DOCBLOCK,
|
||||||
,
|
|
||||||
'This is a Summary without dot but with a whiteline',
|
'This is a Summary without dot but with a whiteline',
|
||||||
'This should be a Description.',
|
'This should be a Description.',
|
||||||
],
|
],
|
||||||
@@ -238,8 +248,7 @@ DOCBLOCK
|
|||||||
This is a Summary with dot and with a whiteline.
|
This is a Summary with dot and with a whiteline.
|
||||||
|
|
||||||
This should be a Description.
|
This should be a Description.
|
||||||
DOCBLOCK
|
DOCBLOCK,
|
||||||
,
|
|
||||||
'This is a Summary with dot and with a whiteline.',
|
'This is a Summary with dot and with a whiteline.',
|
||||||
'This should be a Description.',
|
'This should be a Description.',
|
||||||
],
|
],
|
||||||
@@ -247,13 +256,13 @@ DOCBLOCK
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Param
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
*
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
* @uses phpDocumentor\Reflection\Types\Context
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Tags\Param
|
|
||||||
*/
|
*/
|
||||||
public function testTagsWithContextNamespace() : void
|
public function testTagsWithContextNamespace() : void
|
||||||
{
|
{
|
||||||
@@ -268,11 +277,11 @@ DOCBLOCK
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::create
|
* @covers ::create
|
||||||
*
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\DescriptionFactory
|
|
||||||
* @uses phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testTagsAreFilteredForNullValues() : void
|
public function testTagsAreFilteredForNullValues() : void
|
||||||
{
|
{
|
||||||
|
|||||||
+36
-36
@@ -1,4 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of phpDocumentor.
|
* This file is part of phpDocumentor.
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*
|
*
|
||||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
|
||||||
* @link http://phpdoc.org
|
* @link http://phpdoc.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -19,9 +19,10 @@ use phpDocumentor\Reflection\Types\Context;
|
|||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \Webmozart\Assert\Assert
|
||||||
|
*
|
||||||
* @coversDefaultClass phpDocumentor\Reflection\DocBlock
|
* @coversDefaultClass phpDocumentor\Reflection\DocBlock
|
||||||
* @covers ::<private>
|
* @covers ::<private>
|
||||||
* @uses \Webmozart\Assert\Assert
|
|
||||||
*/
|
*/
|
||||||
class DocBlockTest extends TestCase
|
class DocBlockTest extends TestCase
|
||||||
{
|
{
|
||||||
@@ -34,10 +35,10 @@ class DocBlockTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getSummary
|
* @covers ::getSummary
|
||||||
*
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testDocBlockCanHaveASummary() : void
|
public function testDocBlockCanHaveASummary() : void
|
||||||
{
|
{
|
||||||
@@ -49,10 +50,10 @@ class DocBlockTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getSummary
|
* @covers ::getSummary
|
||||||
*
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testDocBlockCanHaveEllipsisInSummary() : void
|
public function testDocBlockCanHaveEllipsisInSummary() : void
|
||||||
{
|
{
|
||||||
@@ -64,10 +65,10 @@ class DocBlockTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getDescription
|
* @covers ::getDescription
|
||||||
*
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testDocBlockCanHaveADescription() : void
|
public function testDocBlockCanHaveADescription() : void
|
||||||
{
|
{
|
||||||
@@ -79,11 +80,11 @@ class DocBlockTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
|
||||||
* @covers ::getTags
|
|
||||||
*
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tag
|
* @uses \phpDocumentor\Reflection\DocBlock\Tag
|
||||||
|
*
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers ::getTags
|
||||||
*/
|
*/
|
||||||
public function testDocBlockCanHaveTags() : void
|
public function testDocBlockCanHaveTags() : void
|
||||||
{
|
{
|
||||||
@@ -97,27 +98,26 @@ class DocBlockTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
|
||||||
* @covers ::getTags
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tag
|
* @uses \phpDocumentor\Reflection\DocBlock\Tag
|
||||||
|
*
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers ::getTags
|
||||||
*/
|
*/
|
||||||
public function testDocBlockAllowsOnlyTags() : void
|
public function testDocBlockAllowsOnlyTags() : void
|
||||||
{
|
{
|
||||||
$this->expectException('InvalidArgumentException');
|
$this->expectException('InvalidArgumentException');
|
||||||
$tags = [
|
$tags = [null];
|
||||||
null,
|
|
||||||
];
|
|
||||||
$fixture = new DocBlock('', null, $tags);
|
$fixture = new DocBlock('', null, $tags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
|
||||||
* @covers ::getTagsByName
|
|
||||||
*
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock::getTags
|
* @uses \phpDocumentor\Reflection\DocBlock::getTags
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tag
|
* @uses \phpDocumentor\Reflection\DocBlock\Tag
|
||||||
|
*
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers ::getTagsByName
|
||||||
*/
|
*/
|
||||||
public function testFindTagsInDocBlockByName() : void
|
public function testFindTagsInDocBlockByName() : void
|
||||||
{
|
{
|
||||||
@@ -137,12 +137,12 @@ class DocBlockTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
|
||||||
* @covers ::hasTag
|
|
||||||
*
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock::getTags
|
* @uses \phpDocumentor\Reflection\DocBlock::getTags
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tag
|
* @uses \phpDocumentor\Reflection\DocBlock\Tag
|
||||||
|
*
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers ::hasTag
|
||||||
*/
|
*/
|
||||||
public function testCheckIfThereAreTagsWithAGivenName() : void
|
public function testCheckIfThereAreTagsWithAGivenName() : void
|
||||||
{
|
{
|
||||||
@@ -162,11 +162,11 @@ class DocBlockTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
|
||||||
* @covers ::getContext
|
|
||||||
*
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Types\Context
|
* @uses \phpDocumentor\Reflection\Types\Context
|
||||||
|
*
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers ::getContext
|
||||||
*/
|
*/
|
||||||
public function testDocBlockKnowsInWhichNamespaceItIsAndWhichAliasesThereAre() : void
|
public function testDocBlockKnowsInWhichNamespaceItIsAndWhichAliasesThereAre() : void
|
||||||
{
|
{
|
||||||
@@ -178,11 +178,11 @@ class DocBlockTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
|
||||||
* @covers ::getLocation
|
|
||||||
*
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
* @uses \phpDocumentor\Reflection\Location
|
* @uses \phpDocumentor\Reflection\Location
|
||||||
|
*
|
||||||
|
* @covers ::__construct
|
||||||
|
* @covers ::getLocation
|
||||||
*/
|
*/
|
||||||
public function testDocBlockKnowsAtWhichLineItIs() : void
|
public function testDocBlockKnowsAtWhichLineItIs() : void
|
||||||
{
|
{
|
||||||
@@ -194,10 +194,10 @@ class DocBlockTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::isTemplateStart
|
* @covers ::isTemplateStart
|
||||||
*
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testDocBlockKnowsIfItIsTheStartOfADocBlockTemplate() : void
|
public function testDocBlockKnowsIfItIsTheStartOfADocBlockTemplate() : void
|
||||||
{
|
{
|
||||||
@@ -207,10 +207,10 @@ class DocBlockTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::isTemplateEnd
|
* @covers ::isTemplateEnd
|
||||||
*
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
|
||||||
*/
|
*/
|
||||||
public function testDocBlockKnowsIfItIsTheEndOfADocBlockTemplate() : void
|
public function testDocBlockKnowsIfItIsTheEndOfADocBlockTemplate() : void
|
||||||
{
|
{
|
||||||
@@ -220,10 +220,10 @@ class DocBlockTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated
|
||||||
|
*
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::removeTag
|
* @covers ::removeTag
|
||||||
*
|
|
||||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Deprecated
|
|
||||||
*/
|
*/
|
||||||
public function testRemoveTag() : void
|
public function testRemoveTag() : void
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user