From ba8a9c44c485a0eca3e169d4666132cb56302aba Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Fri, 6 Oct 2023 21:59:20 +0000 Subject: [PATCH] Updated Rector to commit b29a6f80c319c6819007a604cc20b788e3abe59c https://github.com/rectorphp/rector-src/commit/b29a6f80c319c6819007a604cc20b788e3abe59c [CodeQuality] Use its start token pos on Else_ on CompleteMissingIfElseBracketRector as no cond (#5136) --- .../Rector/If_/CompleteMissingIfElseBracketRector.php | 2 +- src/Application/VersionResolver.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rules/CodeQuality/Rector/If_/CompleteMissingIfElseBracketRector.php b/rules/CodeQuality/Rector/If_/CompleteMissingIfElseBracketRector.php index b4b0ad0d3d2..ca5f0d7ff6c 100644 --- a/rules/CodeQuality/Rector/If_/CompleteMissingIfElseBracketRector.php +++ b/rules/CodeQuality/Rector/If_/CompleteMissingIfElseBracketRector.php @@ -77,7 +77,7 @@ CODE_SAMPLE } $startTokenPos = $if->getStartTokenPos(); $i = $startStmt->getStartTokenPos() - 1; - $condEndTokenPos = $if instanceof Else_ ? 0 : $if->cond->getEndTokenPos(); + $condEndTokenPos = $if instanceof Else_ ? $startTokenPos : $if->cond->getEndTokenPos(); while (isset($oldTokens[$i])) { if ($i === $condEndTokenPos) { return \false; diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index cb5ef048d7a..7d9cd01129f 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 = '22bf404fbdc1fa1a01aa3075363b1a6d7414d171'; + public const PACKAGE_VERSION = 'b29a6f80c319c6819007a604cc20b788e3abe59c'; /** * @api * @var string */ - public const RELEASE_DATE = '2023-10-07 04:46:07'; + public const RELEASE_DATE = '2023-10-07 04:55:21'; /** * @var int */