diff --git a/rules/DeadCode/Rector/Assign/RemoveUnusedVariableAssignRector.php b/rules/DeadCode/Rector/Assign/RemoveUnusedVariableAssignRector.php index 730d41fa6ef..14901b192b1 100644 --- a/rules/DeadCode/Rector/Assign/RemoveUnusedVariableAssignRector.php +++ b/rules/DeadCode/Rector/Assign/RemoveUnusedVariableAssignRector.php @@ -112,7 +112,9 @@ CODE_SAMPLE if ($this->hasCallLikeInAssignExpr($assign, $scope)) { // clean safely $cleanAssignedExpr = $this->cleanCastedExpr($assign->expr); - $node->stmts[$stmtPosition] = new Expression($cleanAssignedExpr); + $newExpression = new Expression($cleanAssignedExpr); + $this->mirrorComments($newExpression, $currentStmt); + $node->stmts[$stmtPosition] = $newExpression; } else { unset($node->stmts[$stmtPosition]); } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 397f105add7..366ad2cbe2d 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 = '3e505e5d39a709a67f2400dc647a48a697b0baf1'; + public const PACKAGE_VERSION = 'f2c8967abf004558bf92c86840d57eb7f0221f9c'; /** * @api * @var string */ - public const RELEASE_DATE = '2023-10-23 21:36:58'; + public const RELEASE_DATE = '2023-10-24 13:17:32'; /** * @var int */