mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 11:44:14 +01:00
cleanup
This commit is contained in:
parent
5cc5f77bb2
commit
d9b13a5e1b
@ -59,11 +59,6 @@ final class DocBlockManipulator
|
||||
*/
|
||||
private $staticTypeMapper;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $hasPhpDocChanged = false;
|
||||
|
||||
/**
|
||||
* @var DocBlockClassRenamer
|
||||
*/
|
||||
@ -302,14 +297,8 @@ final class DocBlockManipulator
|
||||
$nameParts = explode('_', $staticType->getClassName());
|
||||
$node->name = '\\' . implode('\\', $nameParts);
|
||||
|
||||
$this->hasPhpDocChanged = true;
|
||||
|
||||
return $node;
|
||||
});
|
||||
|
||||
if (! $this->hasPhpDocChanged) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -18,6 +18,7 @@ use PhpParser\Node\Stmt\Property;
|
||||
use PhpParser\Node\Stmt\Use_;
|
||||
use PhpParser\Node\Stmt\UseUse;
|
||||
use PHPStan\Type\ObjectType;
|
||||
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo;
|
||||
use Rector\CodingStyle\Naming\ClassNaming;
|
||||
use Rector\NodeTypeResolver\ClassExistenceStaticHelper;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
@ -149,8 +150,9 @@ PHP
|
||||
*/
|
||||
private function refactorPhpDoc(Node $node): void
|
||||
{
|
||||
$nodePhpDocInfo = $node->getAttribute(AttributeKey::PHP_DOC_INFO);
|
||||
if ($nodePhpDocInfo === null) {
|
||||
/** @var PhpDocInfo|null $phpDocInfo */
|
||||
$phpDocInfo = $node->getAttribute(AttributeKey::PHP_DOC_INFO);
|
||||
if ($phpDocInfo === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user