diff --git a/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedPropertyRector.php b/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedPropertyRector.php index 341c3e1b3f1..cd8f41d84a5 100644 --- a/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedPropertyRector.php +++ b/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedPropertyRector.php @@ -149,7 +149,7 @@ CODE_SAMPLE if ($phpPropertyReflection->getNativeType() instanceof MixedType) { return []; } - $propertyTypes[] = $phpPropertyReflection->getNativeType(); + $propertyTypes[] = $this->nodeTypeResolver->getNativeType($return->expr); } return $propertyTypes; } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 683e9ad8d00..e94e64c6e16 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = '93e025900b640f8182b267812a08c364d42590ef'; + public const PACKAGE_VERSION = '4c40eb60ca984574eea3fa75e8ac59e9c8e07e5e'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-03-31 00:27:47'; + public const RELEASE_DATE = '2024-04-01 02:05:13'; /** * @var int */