remove rather useless tearDown() from AbstractRector

This commit is contained in:
TomasVotruba 2020-03-31 16:08:11 +02:00
parent 8b66cbc2fc
commit e1140cf920
2 changed files with 3 additions and 15 deletions

View File

@ -116,12 +116,6 @@ final class PhpSpecPromisesToPHPUnitAssertRector extends AbstractPhpSpecToPHPUni
$this->matchersManipulator = $matchersManipulator;
}
protected function tearDown(): void
{
$this->isPrepared = false;
$this->matchersKeys = [];
}
/**
* @return string[]
*/
@ -135,6 +129,9 @@ final class PhpSpecPromisesToPHPUnitAssertRector extends AbstractPhpSpecToPHPUni
*/
public function refactor(Node $node): ?Node
{
$this->isPrepared = false;
$this->matchersKeys = [];
if (! $this->isInPhpSpecBehavior($node)) {
return null;
}

View File

@ -108,13 +108,6 @@ abstract class AbstractRector extends NodeVisitorAbstract implements PhpRectorIn
AttributeKey::RESOLVED_NAME,
];
/**
* Run once in the every end of one processed file
*/
protected function tearDown(): void
{
}
/**
* @required
*/
@ -220,8 +213,6 @@ abstract class AbstractRector extends NodeVisitorAbstract implements PhpRectorIn
$nodes = $commander->traverseNodes($nodes);
}
$this->tearDown();
return $nodes;
}