Updated Rector to commit 184eb2ed84405c011740792f1fee4e914e11b445

184eb2ed84 [TypeDeclaration] Handle default value with contant type on TypedPropertyFromAssignsRector (#6563)
This commit is contained in:
Tomas Votruba 2024-12-12 01:15:05 +00:00
parent 7f2e323f76
commit c578222ddf
2 changed files with 3 additions and 6 deletions

View File

@ -120,13 +120,10 @@ final class AssignToPropertyTypeInferer
return null;
}
$inferredType = $this->typeFactory->createMixedPassedOrUnionType($assignedExprTypes);
// to compare with default value, constant type must not be kept
// eg, use more general bool over false or true
if ($this->shouldSkipWithDifferentDefaultValueType($defaultPropertyValue, $inferredType)) {
return null;
}
// returns with constant as final result
return $this->typeFactory->createMixedPassedOrUnionType($assignedExprTypes, \true);
return $inferredType;
}
private function shouldSkipWithDifferentDefaultValueType(?Expr $expr, Type $inferredType) : bool
{

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '457927353525b5f87771493eaa7f79523383b071';
public const PACKAGE_VERSION = '184eb2ed84405c011740792f1fee4e914e11b445';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-12-12 07:46:01';
public const RELEASE_DATE = '2024-12-12 08:12:34';
/**
* @var int
*/