mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-22 02:52:23 +00:00
remove rather useless tearDown() from AbstractRector
This commit is contained in:
parent
8b66cbc2fc
commit
e1140cf920
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user