mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
Add aliases for Context class because newer phpunit versions have a global Context class
This commit is contained in:
+4
-5
@@ -13,7 +13,6 @@
|
||||
namespace phpDocumentor\Reflection;
|
||||
|
||||
use phpDocumentor\Reflection\DocBlock\Tag;
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
final class DocBlock
|
||||
@@ -27,7 +26,7 @@ final class DocBlock
|
||||
/** @var Tag[] An array containing all the tags in this docblock; except inline. */
|
||||
private $tags = array();
|
||||
|
||||
/** @var Context Information about the context of this DocBlock. */
|
||||
/** @var Types\Context Information about the context of this DocBlock. */
|
||||
private $context = null;
|
||||
|
||||
/** @var Location Information about the location of this DocBlock. */
|
||||
@@ -43,7 +42,7 @@ final class DocBlock
|
||||
* @param string $summary
|
||||
* @param DocBlock\Description $description
|
||||
* @param DocBlock\Tag[] $tags
|
||||
* @param Context $context The context in which the DocBlock occurs.
|
||||
* @param Types\Context $context The context in which the DocBlock occurs.
|
||||
* @param Location $location The location within the file that this DocBlock occurs in.
|
||||
* @param bool $isTemplateStart
|
||||
* @param bool $isTemplateEnd
|
||||
@@ -52,7 +51,7 @@ final class DocBlock
|
||||
$summary = '',
|
||||
DocBlock\Description $description = null,
|
||||
array $tags = [],
|
||||
Context $context = null,
|
||||
Types\Context $context = null,
|
||||
Location $location = null,
|
||||
$isTemplateStart = false,
|
||||
$isTemplateEnd = false
|
||||
@@ -95,7 +94,7 @@ final class DocBlock
|
||||
/**
|
||||
* Returns the current context.
|
||||
*
|
||||
* @return Context
|
||||
* @return Types\Context
|
||||
*/
|
||||
public function getContext()
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
namespace phpDocumentor\Reflection\DocBlock;
|
||||
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
|
||||
/**
|
||||
* Creates a new Description object given a body of text.
|
||||
@@ -50,11 +50,11 @@ class DescriptionFactory
|
||||
* Returns the parsed text of this description.
|
||||
*
|
||||
* @param string $contents
|
||||
* @param Context $context
|
||||
* @param TypeContext $context
|
||||
*
|
||||
* @return Description
|
||||
*/
|
||||
public function create($contents, Context $context = null)
|
||||
public function create($contents, TypeContext $context = null)
|
||||
{
|
||||
list($text, $tags) = $this->parse($this->lex($contents), $context);
|
||||
|
||||
@@ -112,11 +112,11 @@ class DescriptionFactory
|
||||
* Parses the stream of tokens in to a new set of tokens containing Tags.
|
||||
*
|
||||
* @param string[] $tokens
|
||||
* @param Context $context
|
||||
* @param TypeContext $context
|
||||
*
|
||||
* @return string[]|Tag[]
|
||||
*/
|
||||
private function parse($tokens, Context $context)
|
||||
private function parse($tokens, TypeContext $context)
|
||||
{
|
||||
$count = count($tokens);
|
||||
$tagCount = 0;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace phpDocumentor\Reflection\DocBlock;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Factory\StaticMethod;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Generic;
|
||||
use phpDocumentor\Reflection\FqsenResolver;
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
/**
|
||||
@@ -105,10 +105,10 @@ final class StandardTagFactory implements TagFactory
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function create($tagLine, Context $context = null)
|
||||
public function create($tagLine, TypeContext $context = null)
|
||||
{
|
||||
if (! $context) {
|
||||
$context = new Context('');
|
||||
$context = new TypeContext('');
|
||||
}
|
||||
|
||||
list($tagName, $tagBody) = $this->extractTagParts($tagLine);
|
||||
@@ -180,11 +180,11 @@ final class StandardTagFactory implements TagFactory
|
||||
*
|
||||
* @param string $body
|
||||
* @param string $name
|
||||
* @param Context $context
|
||||
* @param TypeContext $context
|
||||
*
|
||||
* @return Tag|null
|
||||
*/
|
||||
private function createTag($body, $name, Context $context)
|
||||
private function createTag($body, $name, TypeContext $context)
|
||||
{
|
||||
$handlerClassName = $this->findHandlerClassName($name, $context);
|
||||
$arguments = $this->getArgumentsForParametersFromWiring(
|
||||
@@ -200,11 +200,11 @@ final class StandardTagFactory implements TagFactory
|
||||
* Determines the Fully Qualified Class Name of the Factory or Tag (containing a Factory Method `create`).
|
||||
*
|
||||
* @param string $tagName
|
||||
* @param Context $context
|
||||
* @param TypeContext $context
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function findHandlerClassName($tagName, Context $context)
|
||||
private function findHandlerClassName($tagName, TypeContext $context)
|
||||
{
|
||||
$handlerClassName = Generic::class;
|
||||
if (isset($this->tagHandlerMappings[$tagName])) {
|
||||
@@ -273,20 +273,20 @@ 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
|
||||
* Context.
|
||||
*
|
||||
* @param Context $context The Context (namespace and aliasses) that may be passed and is used to resolve FQSENs.
|
||||
* @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.
|
||||
* @param TypeContext $context The Context (namespace and aliasses) that may be passed and is used to resolve FQSENs.
|
||||
* @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[]
|
||||
*/
|
||||
private function getServiceLocatorWithDynamicParameters(Context $context, $tagName, $tagBody)
|
||||
private function getServiceLocatorWithDynamicParameters(TypeContext $context, $tagName, $tagBody)
|
||||
{
|
||||
$locator = array_merge(
|
||||
$this->serviceLocator,
|
||||
[
|
||||
'name' => $tagName,
|
||||
'body' => $tagBody,
|
||||
Context::class => $context
|
||||
'name' => $tagName,
|
||||
'body' => $tagBody,
|
||||
TypeContext::class => $context
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
namespace phpDocumentor\Reflection\DocBlock;
|
||||
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
|
||||
interface TagFactory
|
||||
{
|
||||
@@ -61,13 +61,13 @@ interface TagFactory
|
||||
* Factory method responsible for instantiating the correct sub type.
|
||||
*
|
||||
* @param string $tagLine The text for this tag, including description.
|
||||
* @param Context $context
|
||||
* @param TypeContext $context
|
||||
*
|
||||
* @throws \InvalidArgumentException if an invalid tag line was presented.
|
||||
*
|
||||
* @return Tag A new tag object.
|
||||
*/
|
||||
public function create($tagLine, Context $context = null);
|
||||
public function create($tagLine, TypeContext $context = null);
|
||||
|
||||
/**
|
||||
* Registers a handler for tags.
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace phpDocumentor\Reflection\DocBlock\Tags;
|
||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||
use phpDocumentor\Reflection\Fqsen;
|
||||
use phpDocumentor\Reflection\DocBlock\Description;
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
use phpDocumentor\Reflection\FqsenResolver;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
@@ -48,7 +48,7 @@ final class Covers extends BaseTag implements Factory\StaticMethod
|
||||
$body,
|
||||
DescriptionFactory $descriptionFactory = null,
|
||||
FqsenResolver $resolver = null,
|
||||
Context $context = null
|
||||
TypeContext $context = null
|
||||
)
|
||||
{
|
||||
Assert::string($body);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
namespace phpDocumentor\Reflection\DocBlock\Tags;
|
||||
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
use phpDocumentor\Reflection\DocBlock\Description;
|
||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||
use Webmozart\Assert\Assert;
|
||||
@@ -54,7 +54,7 @@ final class Deprecated extends BaseTag implements Factory\StaticMethod
|
||||
/**
|
||||
* @return static
|
||||
*/
|
||||
public static function create($body, DescriptionFactory $descriptionFactory = null, Context $context = null)
|
||||
public static function create($body, DescriptionFactory $descriptionFactory = null, TypeContext $context = null)
|
||||
{
|
||||
Assert::nullOrString($body);
|
||||
if (empty($body)) {
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace phpDocumentor\Reflection\DocBlock\Tags;
|
||||
use phpDocumentor\Reflection\DocBlock\Description;
|
||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||
use phpDocumentor\Reflection\DocBlock\StandardTagFactory;
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
/**
|
||||
@@ -43,7 +43,7 @@ class Generic extends BaseTag implements Factory\StaticMethod
|
||||
* @param string $body
|
||||
* @param string $name
|
||||
* @param DescriptionFactory $descriptionFactory
|
||||
* @param Context $context
|
||||
* @param TypeContext $context
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
@@ -51,7 +51,7 @@ class Generic extends BaseTag implements Factory\StaticMethod
|
||||
$body,
|
||||
$name = '',
|
||||
DescriptionFactory $descriptionFactory = null,
|
||||
Context $context = null
|
||||
TypeContext $context = null
|
||||
) {
|
||||
Assert::string($body);
|
||||
Assert::stringNotEmpty($name);
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace phpDocumentor\Reflection\DocBlock\Tags;
|
||||
|
||||
use phpDocumentor\Reflection\DocBlock\Description;
|
||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
/**
|
||||
@@ -44,7 +44,7 @@ final class Link extends BaseTag implements Factory\StaticMethod
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function create($body, DescriptionFactory $descriptionFactory = null, Context $context = null)
|
||||
public static function create($body, DescriptionFactory $descriptionFactory = null, TypeContext $context = null)
|
||||
{
|
||||
Assert::string($body);
|
||||
Assert::notNull($descriptionFactory);
|
||||
|
||||
@@ -16,7 +16,7 @@ use phpDocumentor\Reflection\DocBlock\Description;
|
||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||
use phpDocumentor\Reflection\Type;
|
||||
use phpDocumentor\Reflection\TypeResolver;
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
use phpDocumentor\Reflection\Types\Void;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
@@ -67,7 +67,7 @@ final class Method extends BaseTag implements Factory\StaticMethod
|
||||
$body,
|
||||
TypeResolver $typeResolver = null,
|
||||
DescriptionFactory $descriptionFactory = null,
|
||||
Context $context = null
|
||||
TypeContext $context = null
|
||||
) {
|
||||
Assert::stringNotEmpty($body);
|
||||
Assert::allNotNull([ $typeResolver, $descriptionFactory ]);
|
||||
|
||||
@@ -16,7 +16,7 @@ use phpDocumentor\Reflection\DocBlock\Description;
|
||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||
use phpDocumentor\Reflection\Type;
|
||||
use phpDocumentor\Reflection\TypeResolver;
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
/**
|
||||
@@ -60,9 +60,8 @@ final class Param extends BaseTag implements Factory\StaticMethod
|
||||
$body,
|
||||
TypeResolver $typeResolver = null,
|
||||
DescriptionFactory $descriptionFactory = null,
|
||||
Context $context = null
|
||||
)
|
||||
{
|
||||
TypeContext $context = null
|
||||
) {
|
||||
Assert::stringNotEmpty($body);
|
||||
Assert::allNotNull([$typeResolver, $descriptionFactory]);
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ use phpDocumentor\Reflection\DocBlock\Description;
|
||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||
use phpDocumentor\Reflection\Type;
|
||||
use phpDocumentor\Reflection\TypeResolver;
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
/**
|
||||
@@ -54,7 +54,7 @@ class Property extends BaseTag implements Factory\StaticMethod
|
||||
$body,
|
||||
TypeResolver $typeResolver = null,
|
||||
DescriptionFactory $descriptionFactory = null,
|
||||
Context $context = null
|
||||
TypeContext $context = null
|
||||
) {
|
||||
Assert::stringNotEmpty($body);
|
||||
Assert::allNotNull([$typeResolver, $descriptionFactory]);
|
||||
|
||||
@@ -16,7 +16,7 @@ use phpDocumentor\Reflection\DocBlock\Description;
|
||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||
use phpDocumentor\Reflection\Type;
|
||||
use phpDocumentor\Reflection\TypeResolver;
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
/**
|
||||
@@ -54,7 +54,7 @@ class PropertyRead extends BaseTag implements Factory\StaticMethod
|
||||
$body,
|
||||
TypeResolver $typeResolver = null,
|
||||
DescriptionFactory $descriptionFactory = null,
|
||||
Context $context = null
|
||||
TypeContext $context = null
|
||||
) {
|
||||
Assert::stringNotEmpty($body);
|
||||
Assert::allNotNull([$typeResolver, $descriptionFactory]);
|
||||
|
||||
@@ -16,7 +16,7 @@ use phpDocumentor\Reflection\DocBlock\Description;
|
||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||
use phpDocumentor\Reflection\Type;
|
||||
use phpDocumentor\Reflection\TypeResolver;
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
/**
|
||||
@@ -54,7 +54,7 @@ class PropertyWrite extends BaseTag implements Factory\StaticMethod
|
||||
$body,
|
||||
TypeResolver $typeResolver = null,
|
||||
DescriptionFactory $descriptionFactory = null,
|
||||
Context $context = null
|
||||
TypeContext $context = null
|
||||
) {
|
||||
Assert::stringNotEmpty($body);
|
||||
Assert::allNotNull([$typeResolver, $descriptionFactory]);
|
||||
|
||||
@@ -16,7 +16,7 @@ use phpDocumentor\Reflection\DocBlock\Description;
|
||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||
use phpDocumentor\Reflection\Type;
|
||||
use phpDocumentor\Reflection\TypeResolver;
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
/**
|
||||
@@ -42,7 +42,7 @@ final class Return_ extends BaseTag implements Factory\StaticMethod
|
||||
$body,
|
||||
TypeResolver $typeResolver = null,
|
||||
DescriptionFactory $descriptionFactory = null,
|
||||
Context $context = null
|
||||
TypeContext $context = null
|
||||
)
|
||||
{
|
||||
Assert::string($body);
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace phpDocumentor\Reflection\DocBlock\Tags;
|
||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||
use phpDocumentor\Reflection\Fqsen;
|
||||
use phpDocumentor\Reflection\FqsenResolver;
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
use phpDocumentor\Reflection\DocBlock\Description;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
@@ -48,7 +48,7 @@ class See extends BaseTag implements Factory\StaticMethod
|
||||
$body,
|
||||
FqsenResolver $resolver = null,
|
||||
DescriptionFactory $descriptionFactory = null,
|
||||
Context $context = null
|
||||
TypeContext $context = null
|
||||
) {
|
||||
Assert::string($body);
|
||||
Assert::allNotNull([$resolver, $descriptionFactory]);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
namespace phpDocumentor\Reflection\DocBlock\Tags;
|
||||
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
use phpDocumentor\Reflection\DocBlock\Description;
|
||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||
use Webmozart\Assert\Assert;
|
||||
@@ -54,7 +54,7 @@ final class Since extends BaseTag implements Factory\StaticMethod
|
||||
/**
|
||||
* @return static
|
||||
*/
|
||||
public static function create($body, DescriptionFactory $descriptionFactory = null, Context $context = null)
|
||||
public static function create($body, DescriptionFactory $descriptionFactory = null, TypeContext $context = null)
|
||||
{
|
||||
Assert::nullOrString($body);
|
||||
if (empty($body)) {
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace phpDocumentor\Reflection\DocBlock\Tags;
|
||||
|
||||
use phpDocumentor\Reflection\DocBlock\Description;
|
||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
/**
|
||||
@@ -44,7 +44,7 @@ final class Source extends BaseTag implements Factory\StaticMethod
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function create($body, DescriptionFactory $descriptionFactory = null, Context $context = null)
|
||||
public static function create($body, DescriptionFactory $descriptionFactory = null, TypeContext $context = null)
|
||||
{
|
||||
Assert::stringNotEmpty($body);
|
||||
Assert::notNull($descriptionFactory);
|
||||
|
||||
@@ -16,7 +16,7 @@ use phpDocumentor\Reflection\DocBlock\Description;
|
||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||
use phpDocumentor\Reflection\Type;
|
||||
use phpDocumentor\Reflection\TypeResolver;
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
/**
|
||||
@@ -42,7 +42,7 @@ final class Throws extends BaseTag implements Factory\StaticMethod
|
||||
$body,
|
||||
TypeResolver $typeResolver = null,
|
||||
DescriptionFactory $descriptionFactory = null,
|
||||
Context $context = null
|
||||
TypeContext $context = null
|
||||
) {
|
||||
Assert::string($body);
|
||||
Assert::allNotNull([$typeResolver, $descriptionFactory]);
|
||||
|
||||
@@ -16,7 +16,7 @@ use phpDocumentor\Reflection\DocBlock\Description;
|
||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||
use phpDocumentor\Reflection\Fqsen;
|
||||
use phpDocumentor\Reflection\FqsenResolver;
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
/**
|
||||
@@ -48,7 +48,7 @@ final class Uses extends BaseTag implements Factory\StaticMethod
|
||||
$body,
|
||||
FqsenResolver $resolver = null,
|
||||
DescriptionFactory $descriptionFactory = null,
|
||||
Context $context = null
|
||||
TypeContext $context = null
|
||||
) {
|
||||
Assert::string($body);
|
||||
Assert::allNotNull([$resolver, $descriptionFactory]);
|
||||
|
||||
@@ -16,7 +16,7 @@ use phpDocumentor\Reflection\DocBlock\Description;
|
||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||
use phpDocumentor\Reflection\Type;
|
||||
use phpDocumentor\Reflection\TypeResolver;
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
/**
|
||||
@@ -54,7 +54,7 @@ class Var_ extends BaseTag implements Factory\StaticMethod
|
||||
$body,
|
||||
TypeResolver $typeResolver = null,
|
||||
DescriptionFactory $descriptionFactory = null,
|
||||
Context $context = null
|
||||
TypeContext $context = null
|
||||
) {
|
||||
Assert::stringNotEmpty($body);
|
||||
Assert::allNotNull([$typeResolver, $descriptionFactory]);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
namespace phpDocumentor\Reflection\DocBlock\Tags;
|
||||
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
use phpDocumentor\Reflection\DocBlock\Description;
|
||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||
use Webmozart\Assert\Assert;
|
||||
@@ -54,7 +54,7 @@ final class Version extends BaseTag implements Factory\StaticMethod
|
||||
/**
|
||||
* @return static
|
||||
*/
|
||||
public static function create($body, DescriptionFactory $descriptionFactory = null, Context $context = null)
|
||||
public static function create($body, DescriptionFactory $descriptionFactory = null, TypeContext $context = null)
|
||||
{
|
||||
Assert::nullOrString($body);
|
||||
if (empty($body)) {
|
||||
|
||||
@@ -16,7 +16,6 @@ use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||
use phpDocumentor\Reflection\DocBlock\StandardTagFactory;
|
||||
use phpDocumentor\Reflection\DocBlock\Tag;
|
||||
use phpDocumentor\Reflection\DocBlock\TagFactory;
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
final class DocBlockFactory implements DocBlockFactoryInterface
|
||||
@@ -85,7 +84,7 @@ final class DocBlockFactory implements DocBlockFactoryInterface
|
||||
Assert::stringNotEmpty($docblock);
|
||||
|
||||
if ($context === null) {
|
||||
$context = new Context('');
|
||||
$context = new Types\Context('');
|
||||
}
|
||||
|
||||
$parts = $this->splitDocBlock($this->stripDocComment($docblock));
|
||||
@@ -216,11 +215,11 @@ final class DocBlockFactory implements DocBlockFactoryInterface
|
||||
* Creates the tag objects.
|
||||
*
|
||||
* @param string $tags Tag block to parse.
|
||||
* @param Context $context Context of the parsed Tag
|
||||
* @param Types\Context $context Context of the parsed Tag
|
||||
*
|
||||
* @return DocBlock\Tag[]
|
||||
*/
|
||||
private function parseTagBlock($tags, Context $context)
|
||||
private function parseTagBlock($tags, Types\Context $context)
|
||||
{
|
||||
$tags = $this->filterTagBlock($tags);
|
||||
if (!$tags) {
|
||||
|
||||
Reference in New Issue
Block a user