Introduce a Simple implementation of the TagFactory interface

Less complex interface to implement makes it easier to implement tag factories as they
are part of the new behavior of the StandardTagFactory.
This commit is contained in:
Jaapio
2022-10-28 14:37:01 +02:00
parent d6c050a533
commit ece4f5ab18
6 changed files with 42 additions and 34 deletions
+3 -2
View File
@@ -16,6 +16,7 @@ namespace phpDocumentor\Reflection;
use InvalidArgumentException;
use LogicException;
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
use phpDocumentor\Reflection\DocBlock\SimpleTagFactory;
use phpDocumentor\Reflection\DocBlock\StandardTagFactory;
use phpDocumentor\Reflection\DocBlock\Tag;
use phpDocumentor\Reflection\DocBlock\TagFactory;
@@ -41,13 +42,13 @@ final class DocBlockFactory implements DocBlockFactoryInterface
/** @var DocBlock\DescriptionFactory */
private $descriptionFactory;
/** @var DocBlock\TagFactory */
/** @var DocBlock\SimpleTagFactory */
private $tagFactory;
/**
* Initializes this factory with the required subcontractors.
*/
public function __construct(DescriptionFactory $descriptionFactory, TagFactory $tagFactory)
public function __construct(DescriptionFactory $descriptionFactory, SimpleTagFactory $tagFactory)
{
$this->descriptionFactory = $descriptionFactory;
$this->tagFactory = $tagFactory;