From 024ebc62a13e730de1c4d718d0159ac98c96d485 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Fri, 22 Mar 2024 19:55:35 +0000 Subject: [PATCH] Updated Rector to commit b042152eae866b5578ea15cb38e27ce493937001 https://github.com/rectorphp/rector-src/commit/b042152eae866b5578ea15cb38e27ce493937001 [CodeQuality] Skip __construct() method on ExplicitReturnNullRector (#5758) --- .../Rector/ClassMethod/ExplicitReturnNullRector.php | 4 ++++ src/Application/VersionResolver.php | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/rules/CodeQuality/Rector/ClassMethod/ExplicitReturnNullRector.php b/rules/CodeQuality/Rector/ClassMethod/ExplicitReturnNullRector.php index 6e8cfe0adc7..6e63e5c6f3c 100644 --- a/rules/CodeQuality/Rector/ClassMethod/ExplicitReturnNullRector.php +++ b/rules/CodeQuality/Rector/ClassMethod/ExplicitReturnNullRector.php @@ -20,6 +20,7 @@ use Rector\NodeTypeResolver\PHPStan\Type\TypeFactory; use Rector\PhpParser\Node\BetterNodeFinder; use Rector\Rector\AbstractRector; use Rector\TypeDeclaration\TypeInferer\SilentVoidResolver; +use Rector\ValueObject\MethodName; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** @@ -110,6 +111,9 @@ CODE_SAMPLE if ($node->returnType instanceof Node) { return null; } + if ($this->isName($node, MethodName::CONSTRUCT)) { + return null; + } if ($this->containsYieldOrThrow($node)) { return null; } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 1a4ea03c1b9..90757623e35 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 = '61c7e9288885218b76a4a9431bba33a37059dea5'; + public const PACKAGE_VERSION = 'b042152eae866b5578ea15cb38e27ce493937001'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-03-22 18:07:31'; + public const RELEASE_DATE = '2024-03-23 02:53:17'; /** * @var int */