Skip to content

Commit 6ba5d0d

Browse files
authored
remove unused DocBlockTagReplacer (#8810)
1 parent 70b2c4a commit 6ba5d0d

4 files changed

Lines changed: 0 additions & 75 deletions

File tree

‎src/NodeTypeResolver/PhpDoc/NodeAnalyzer/DocBlockTagReplacer.php‎

Lines changed: 0 additions & 46 deletions
This file was deleted.

‎tests/BetterPhpDocParser/PhpDocInfo/PhpDocInfo/PhpDocInfoTest.php‎

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo;
1212
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory;
1313
use Rector\BetterPhpDocParser\Printer\PhpDocInfoPrinter;
14-
use Rector\NodeTypeResolver\PhpDoc\NodeAnalyzer\DocBlockTagReplacer;
1514
use Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocatorProvider\DynamicSourceLocatorProvider;
1615
use Rector\StaticTypeMapper\ValueObject\Type\NonExistingObjectType;
1716
use Rector\Testing\PHPUnit\AbstractLazyTestCase;
@@ -22,8 +21,6 @@ final class PhpDocInfoTest extends AbstractLazyTestCase
2221

2322
private PhpDocInfoPrinter $phpDocInfoPrinter;
2423

25-
private DocBlockTagReplacer $docBlockTagReplacer;
26-
2724
protected function setUp(): void
2825
{
2926
parent::setUp();
@@ -33,7 +30,6 @@ protected function setUp(): void
3330
$dynamicSourceLocatorProvider->reset();
3431

3532
$this->phpDocInfoPrinter = $this->make(PhpDocInfoPrinter::class);
36-
$this->docBlockTagReplacer = $this->make(DocBlockTagReplacer::class);
3733

3834
$phpDocInfo = $this->createPhpDocInfoFromFile(__DIR__ . '/Source/doc.txt');
3935
$this->assertInstanceOf(PhpDocInfo::class, $phpDocInfo);
@@ -59,21 +55,6 @@ public function testGetReturnType(): void
5955
$this->assertEquals($nonExistingObjectType, $this->phpDocInfo->getReturnType());
6056
}
6157

62-
public function testReplaceTagByAnother(): void
63-
{
64-
$phpDocInfo = $this->createPhpDocInfoFromFile(__DIR__ . '/Source/test-tag.txt');
65-
$this->assertInstanceOf(PhpDocInfo::class, $phpDocInfo);
66-
67-
$this->docBlockTagReplacer->replaceTagByAnother($phpDocInfo, 'test', 'flow');
68-
69-
$printedPhpDocInfo = $this->phpDocInfoPrinter->printFormatPreserving($phpDocInfo);
70-
$printedPhpDocInfo = str_replace("\r\n", "\n", $printedPhpDocInfo);
71-
72-
$fileContent = str_replace("\r\n", "\n", FileSystem::read(__DIR__ . '/Source/expected-replaced-tag.txt'));
73-
74-
$this->assertSame($fileContent, $printedPhpDocInfo);
75-
}
76-
7758
public function testDoNotAddSpaseWhenAddEmptyString(): void
7859
{
7960
$this->phpDocInfo->addPhpDocTagNode(new PhpDocTextNode(''));

‎tests/BetterPhpDocParser/PhpDocInfo/PhpDocInfo/Source/expected-replaced-tag.txt‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎tests/BetterPhpDocParser/PhpDocInfo/PhpDocInfo/Source/test-tag.txt‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)