Updated Rector to commit a92fade7d0fbfcee3fb3e4f0ff5620e281de8ce0

a92fade7d0 [TypeDeclaration] Handle DateTimeInterface from use statement on MergeDateTimePropertyTypeDeclarationRector (#5330)
This commit is contained in:
Tomas Votruba 2023-12-05 21:28:49 +00:00
parent e86b6d37a6
commit 413475184c
2 changed files with 5 additions and 4 deletions

View File

@ -3,6 +3,7 @@
declare (strict_types=1);
namespace Rector\TypeDeclaration\Rector\Class_;
use PHPStan\Type\TypeWithClassName;
use PhpParser\Node;
use PhpParser\Node\Name\FullyQualified;
use PhpParser\Node\Stmt\Class_;
@ -12,7 +13,6 @@ use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory;
use Rector\Comments\NodeDocBlock\DocBlockUpdater;
use Rector\Core\Rector\AbstractRector;
use Rector\Core\ValueObject\PhpVersionFeature;
use Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedObjectType;
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
@ -86,7 +86,8 @@ CODE_SAMPLE
continue;
}
$varType = $phpDocInfo->getVarType();
if ($varType instanceof FullyQualifiedObjectType && $varType->getClassName() === 'DateTimeInterface') {
$className = $varType instanceof TypeWithClassName ? $this->nodeTypeResolver->getFullyQualifiedClassName($varType) : null;
if ($className === 'DateTimeInterface') {
$phpDocInfo->removeByType(VarTagValueNode::class);
$this->docBlockUpdater->updateRefactoredNodeWithPhpDocInfo($property);
$property->type = new FullyQualified('DateTimeInterface');

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'd22741edaf63d488b39f7754353b0ea8cc454836';
public const PACKAGE_VERSION = 'a92fade7d0fbfcee3fb3e4f0ff5620e281de8ce0';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-12-06 04:00:59';
public const RELEASE_DATE = '2023-12-06 04:26:37';
/**
* @var int
*/