Skip to content

Commit

Permalink
Updated Rector to commit a775c65eeccc0c6ed106adbe836ab114f37c5da4
Browse files Browse the repository at this point in the history
rectorphp/rector-src@a775c65 [CodeQuality] Skip throw after foreach with return in loop on SimplifyForeachToCoalescingRector (#5714)
  • Loading branch information
TomasVotruba committed Mar 11, 2024
1 parent 3e8c192 commit 4be56b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,16 @@ public function refactor(Node $node) : ?Node
return null;
}
$nextStmt = $node->stmts[$key + 1] ?? null;
if (!$nextStmt instanceof Return_) {
continue;
}
$return = $this->processForeachNodeWithReturnInside($foreach, $foreachReturnOrAssign, $nextStmt);
if (!$return instanceof Return_) {
continue;
}
$node->stmts[$key] = $return;
// cleanup next return
if ($nextStmt instanceof Return_) {
unset($node->stmts[$key + 1]);
}
unset($node->stmts[$key + 1]);
$hasChanged = \true;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '01c460ee526f057b6a4d48835ac19536a857c347';
public const PACKAGE_VERSION = 'a775c65eeccc0c6ed106adbe836ab114f37c5da4';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-03-11 12:28:16';
public const RELEASE_DATE = '2024-03-11 18:16:44';
/**
* @var int
*/
Expand Down

0 comments on commit 4be56b3

Please sign in to comment.