Skip to content

Commit

Permalink
Updated Rector to commit 184eb2ed84405c011740792f1fee4e914e11b445
Browse files Browse the repository at this point in the history
rectorphp/rector-src@184eb2e [TypeDeclaration] Handle default value with contant type on TypedPropertyFromAssignsRector (#6563)
  • Loading branch information
TomasVotruba committed Dec 12, 2024
1 parent 7f2e323 commit c578222
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,10 @@ private function resolveTypeWithVerifyDefaultValue(Property $property, array $as
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
{
Expand Down
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit c578222

Please sign in to comment.