mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 10:07:12 +00:00
Remove abstract factory
This commit is contained in:
@@ -1,19 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace phpDocumentor\Reflection\DocBlock\Tags\Factory;
|
|
||||||
|
|
||||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
|
||||||
use phpDocumentor\Reflection\TypeResolver;
|
|
||||||
use phpDocumentor\Reflection\Types\Context;
|
|
||||||
use PHPStan\PhpDocParser\Ast\PhpDoc\ImplementsTagValueNode;
|
|
||||||
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @internal This class is not part of the BC promise of this library.
|
|
||||||
*/
|
|
||||||
abstract class AbstractImplementsFactory implements PHPStanFactory
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -18,7 +18,7 @@ use function is_string;
|
|||||||
/**
|
/**
|
||||||
* @internal This class is not part of the BC promise of this library.
|
* @internal This class is not part of the BC promise of this library.
|
||||||
*/
|
*/
|
||||||
final class ImplementsFactory extends AbstractImplementsFactory
|
final class ImplementsFactory implements Factory
|
||||||
{
|
{
|
||||||
private DescriptionFactory $descriptionFactory;
|
private DescriptionFactory $descriptionFactory;
|
||||||
private TypeResolver $typeResolver;
|
private TypeResolver $typeResolver;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace phpDocumentor\Reflection\DocBlock\Tags\Factory;
|
namespace phpDocumentor\Reflection\DocBlock\Tags\Factory;
|
||||||
|
|
||||||
|
use InvalidArgumentException;
|
||||||
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||||
use phpDocumentor\Reflection\DocBlock\Tag;
|
use phpDocumentor\Reflection\DocBlock\Tag;
|
||||||
use phpDocumentor\Reflection\DocBlock\Tags\Template;
|
use phpDocumentor\Reflection\DocBlock\Tags\Template;
|
||||||
@@ -36,7 +37,7 @@ final class TemplateFactory implements PHPStanFactory
|
|||||||
Assert::isInstanceOf($tagValue, TemplateTagValueNode::class);
|
Assert::isInstanceOf($tagValue, TemplateTagValueNode::class);
|
||||||
$name = $tagValue->name;
|
$name = $tagValue->name;
|
||||||
if ($name === '') {
|
if ($name === '') {
|
||||||
throw new \InvalidArgumentException('Template name cannot be empty');
|
throw new InvalidArgumentException('Template name cannot be empty');
|
||||||
}
|
}
|
||||||
|
|
||||||
$description = $tagValue->getAttribute('description');
|
$description = $tagValue->getAttribute('description');
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ use function is_string;
|
|||||||
/**
|
/**
|
||||||
* @internal This class is not part of the BC promise of this library.
|
* @internal This class is not part of the BC promise of this library.
|
||||||
*/
|
*/
|
||||||
final class TemplateImplementsFactory extends AbstractImplementsFactory
|
final class TemplateImplementsFactory implements Factory
|
||||||
{
|
{
|
||||||
private DescriptionFactory $descriptionFactory;
|
private DescriptionFactory $descriptionFactory;
|
||||||
private TypeResolver $typeResolver;
|
private TypeResolver $typeResolver;
|
||||||
|
|||||||
Reference in New Issue
Block a user