mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 03:35:01 +01:00
remove unused interface
This commit is contained in:
parent
290dffbb53
commit
10f63db15d
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\BetterPhpDocParser\Contract;
|
||||
|
||||
interface ClassAwarePhpDocNodeFactoryInterface extends PhpDocNodeFactoryInterface
|
||||
{
|
||||
public function getClass(): string;
|
||||
}
|
@ -11,4 +11,6 @@ use PHPStan\PhpDocParser\Parser\TokenIterator;
|
||||
interface PhpDocNodeFactoryInterface
|
||||
{
|
||||
public function createFromNodeAndTokens(Node $node, TokenIterator $tokenIterator): ?PhpDocTagValueNode;
|
||||
|
||||
public function getClass(): string;
|
||||
}
|
||||
|
@ -8,11 +8,11 @@ use Nette\Utils\Strings;
|
||||
use PhpParser\Node;
|
||||
use PHPStan\PhpDocParser\Parser\TokenIterator;
|
||||
use Rector\BetterPhpDocParser\AnnotationReader\NodeAnnotationReader;
|
||||
use Rector\BetterPhpDocParser\Contract\ClassAwarePhpDocNodeFactoryInterface;
|
||||
use Rector\BetterPhpDocParser\Contract\PhpDocNodeFactoryInterface;
|
||||
use Rector\BetterPhpDocParser\PhpDocParser\AnnotationContentResolver;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
|
||||
abstract class AbstractPhpDocNodeFactory implements ClassAwarePhpDocNodeFactoryInterface
|
||||
abstract class AbstractPhpDocNodeFactory implements PhpDocNodeFactoryInterface
|
||||
{
|
||||
/**
|
||||
* @var NodeAnnotationReader
|
||||
|
@ -59,11 +59,6 @@ final class ParamPhpDocNodeFactory
|
||||
$this->annotationContentResolver = $annotationContentResolver;
|
||||
}
|
||||
|
||||
public function getName(): string
|
||||
{
|
||||
return 'param';
|
||||
}
|
||||
|
||||
public function createFromTokens(TokenIterator $tokenIterator): ?PhpDocTagValueNode
|
||||
{
|
||||
try {
|
||||
|
@ -19,7 +19,6 @@ use PHPStan\PhpDocParser\Parser\TypeParser;
|
||||
use Rector\AttributeAwarePhpDoc\Ast\PhpDoc\AttributeAwarePhpDocNode;
|
||||
use Rector\BetterPhpDocParser\Attributes\Ast\AttributeAwareNodeFactory;
|
||||
use Rector\BetterPhpDocParser\Attributes\Attribute\Attribute;
|
||||
use Rector\BetterPhpDocParser\Contract\ClassAwarePhpDocNodeFactoryInterface;
|
||||
use Rector\BetterPhpDocParser\Contract\PhpDocNodeFactoryInterface;
|
||||
use Rector\BetterPhpDocParser\PhpDocNodeFactory\ParamPhpDocNodeFactory;
|
||||
use Rector\BetterPhpDocParser\Printer\MultilineSpaceFormatPreserver;
|
||||
@ -288,15 +287,11 @@ final class BetterPhpDocParser extends PhpDocParser
|
||||
// normalize
|
||||
$tag = ltrim($tag, '@');
|
||||
|
||||
if ($phpDocNodeFactory instanceof ClassAwarePhpDocNodeFactoryInterface) {
|
||||
return $this->classAnnotationMatcher->isTagMatchToNodeAndClass(
|
||||
$tag,
|
||||
$phpNode,
|
||||
$phpDocNodeFactory->getClass()
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
return $this->classAnnotationMatcher->isTagMatchToNodeAndClass(
|
||||
$tag,
|
||||
$phpNode,
|
||||
$phpDocNodeFactory->getClass()
|
||||
);
|
||||
}
|
||||
|
||||
private function getTokenIteratorIndex(TokenIterator $tokenIterator): int
|
||||
|
Loading…
x
Reference in New Issue
Block a user