Skip to content

Commit c578222

Browse files
committed
Updated Rector to commit 184eb2ed84405c011740792f1fee4e914e11b445
rectorphp/rector-src@184eb2e [TypeDeclaration] Handle default value with contant type on TypedPropertyFromAssignsRector (#6563)
1 parent 7f2e323 commit c578222

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

rules/TypeDeclaration/TypeInferer/AssignToPropertyTypeInferer.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,10 @@ private function resolveTypeWithVerifyDefaultValue(Property $property, array $as
120120
return null;
121121
}
122122
$inferredType = $this->typeFactory->createMixedPassedOrUnionType($assignedExprTypes);
123-
// to compare with default value, constant type must not be kept
124-
// eg, use more general bool over false or true
125123
if ($this->shouldSkipWithDifferentDefaultValueType($defaultPropertyValue, $inferredType)) {
126124
return null;
127125
}
128-
// returns with constant as final result
129-
return $this->typeFactory->createMixedPassedOrUnionType($assignedExprTypes, \true);
126+
return $inferredType;
130127
}
131128
private function shouldSkipWithDifferentDefaultValueType(?Expr $expr, Type $inferredType) : bool
132129
{

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = '457927353525b5f87771493eaa7f79523383b071';
22+
public const PACKAGE_VERSION = '184eb2ed84405c011740792f1fee4e914e11b445';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2024-12-12 07:46:01';
27+
public const RELEASE_DATE = '2024-12-12 08:12:34';
2828
/**
2929
* @var int
3030
*/

0 commit comments

Comments
 (0)