From e10d636f628d703a450624a93dfa29d321f1fdf0 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Fri, 22 Mar 2024 18:09:58 +0000 Subject: [PATCH] Updated Rector to commit 61c7e9288885218b76a4a9431bba33a37059dea5 https://github.com/rectorphp/rector-src/commit/61c7e9288885218b76a4a9431bba33a37059dea5 [CodeQuality] No need to re-update doc when already union null doc on ExplicitReturnNullRector (#5757) --- .../Rector/ClassMethod/ExplicitReturnNullRector.php | 5 +++++ src/Application/VersionResolver.php | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/rules/CodeQuality/Rector/ClassMethod/ExplicitReturnNullRector.php b/rules/CodeQuality/Rector/ClassMethod/ExplicitReturnNullRector.php index 6ef74e24108..6e8cfe0adc7 100644 --- a/rules/CodeQuality/Rector/ClassMethod/ExplicitReturnNullRector.php +++ b/rules/CodeQuality/Rector/ClassMethod/ExplicitReturnNullRector.php @@ -132,12 +132,17 @@ CODE_SAMPLE return; } $newTypes = []; + $hasChanged = \false; foreach ($returnType->getTypes() as $type) { if ($type instanceof VoidType) { $type = new NullType(); + $hasChanged = \true; } $newTypes[] = $type; } + if (!$hasChanged) { + return; + } $type = $this->typeFactory->createMixedPassedOrUnionTypeAndKeepConstant($newTypes); if (!$type instanceof UnionType) { return; diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index bcce1ebeb89..1a4ea03c1b9 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 = '576198cf701684dd85ed42530bcb8c54b6c41a02'; + public const PACKAGE_VERSION = '61c7e9288885218b76a4a9431bba33a37059dea5'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-03-23 00:48:13'; + public const RELEASE_DATE = '2024-03-22 18:07:31'; /** * @var int */