mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 18:13:13 +00:00
Improve naming for tag factory
This commit is contained in:
@@ -13,6 +13,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace phpDocumentor\Reflection\DocBlock;
|
||||
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Factory\Factory;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
use phpDocumentor\Reflection\Utils;
|
||||
|
||||
@@ -47,13 +48,13 @@ use const PREG_SPLIT_DELIM_CAPTURE;
|
||||
*/
|
||||
class DescriptionFactory
|
||||
{
|
||||
/** @var SimpleTagFactory */
|
||||
/** @var Factory */
|
||||
private $tagFactory;
|
||||
|
||||
/**
|
||||
* Initializes this factory with the means to construct (inline) tags.
|
||||
*/
|
||||
public function __construct(SimpleTagFactory $tagFactory)
|
||||
public function __construct(Factory $tagFactory)
|
||||
{
|
||||
$this->tagFactory = $tagFactory;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ use InvalidArgumentException;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Author;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Covers;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Deprecated;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Factory\Factory;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Generic;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\InvalidTag;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Link as LinkTag;
|
||||
@@ -233,7 +234,7 @@ final class StandardTagFactory implements TagFactory
|
||||
/**
|
||||
* Determines the Fully Qualified Class Name of the Factory or Tag (containing a Factory Method `create`).
|
||||
*
|
||||
* @return class-string<Tag>|SimpleTagFactory
|
||||
* @return class-string<Tag>|Factory
|
||||
*/
|
||||
private function findHandlerClassName(string $tagName, TypeContext $context)
|
||||
{
|
||||
@@ -297,7 +298,7 @@ final class StandardTagFactory implements TagFactory
|
||||
* Retrieves a series of ReflectionParameter objects for the static 'create' method of the given
|
||||
* tag handler class name.
|
||||
*
|
||||
* @param class-string|SimpleTagFactory $handler
|
||||
* @param class-string|Factory $handler
|
||||
*
|
||||
* @return ReflectionParameter[]
|
||||
*/
|
||||
|
||||
@@ -14,9 +14,10 @@ declare(strict_types=1);
|
||||
namespace phpDocumentor\Reflection\DocBlock;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Factory\Factory;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
|
||||
interface TagFactory extends SimpleTagFactory
|
||||
interface TagFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Adds a parameter to the service locator that can be injected in a tag's factory method.
|
||||
|
||||
@@ -13,7 +13,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace phpDocumentor\Reflection\DocBlock\Tags\Factory;
|
||||
|
||||
use phpDocumentor\Reflection\DocBlock\SimpleTagFactory;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Factory\Factory;
|
||||
use phpDocumentor\Reflection\DocBlock\Tag;
|
||||
use phpDocumentor\Reflection\DocBlock\TagFactory;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\InvalidTag;
|
||||
@@ -32,7 +32,7 @@ use PHPStan\PhpDocParser\Parser\TypeParser;
|
||||
*
|
||||
* @internal This class is not part of the BC promise of this library.
|
||||
*/
|
||||
class AbstractPHPStanFactory implements SimpleTagFactory
|
||||
class AbstractPHPStanFactory implements Factory
|
||||
{
|
||||
private PhpDocParser $parser;
|
||||
private Lexer $lexer;
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
<?php
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* @link http://phpdoc.org
|
||||
*
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
@@ -11,12 +20,13 @@ declare(strict_types=1);
|
||||
* @link http://phpdoc.org
|
||||
*/
|
||||
|
||||
namespace phpDocumentor\Reflection\DocBlock;
|
||||
namespace phpDocumentor\Reflection\DocBlock\Tags\Factory;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use phpDocumentor\Reflection\DocBlock\Tag;
|
||||
use phpDocumentor\Reflection\Types\Context as TypeContext;
|
||||
|
||||
interface SimpleTagFactory
|
||||
interface Factory
|
||||
{
|
||||
|
||||
/**
|
||||
@@ -16,7 +16,7 @@ namespace phpDocumentor\Reflection;
|
||||
use InvalidArgumentException;
|
||||
use LogicException;
|
||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||
use phpDocumentor\Reflection\DocBlock\SimpleTagFactory;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Factory\Factory;
|
||||
use phpDocumentor\Reflection\DocBlock\StandardTagFactory;
|
||||
use phpDocumentor\Reflection\DocBlock\Tag;
|
||||
use phpDocumentor\Reflection\DocBlock\TagFactory;
|
||||
@@ -42,13 +42,13 @@ final class DocBlockFactory implements DocBlockFactoryInterface
|
||||
/** @var DocBlock\DescriptionFactory */
|
||||
private $descriptionFactory;
|
||||
|
||||
/** @var DocBlock\SimpleTagFactory */
|
||||
/** @var \phpDocumentor\Reflection\DocBlock\Tags\Factory\Factory */
|
||||
private $tagFactory;
|
||||
|
||||
/**
|
||||
* Initializes this factory with the required subcontractors.
|
||||
*/
|
||||
public function __construct(DescriptionFactory $descriptionFactory, SimpleTagFactory $tagFactory)
|
||||
public function __construct(DescriptionFactory $descriptionFactory, Factory $tagFactory)
|
||||
{
|
||||
$this->descriptionFactory = $descriptionFactory;
|
||||
$this->tagFactory = $tagFactory;
|
||||
|
||||
Reference in New Issue
Block a user