Skip to content

Commit

Permalink
Updated Rector to commit 8ade0b9e46aff3e6f755a9561579cdc0c9eb9b0e
Browse files Browse the repository at this point in the history
rectorphp/rector-src@8ade0b9 [EarlyReturn] Clena up equal node check on IfAndAnalyzer::isIfStmtExprUsedInNextReturn() (#5710)
  • Loading branch information
TomasVotruba committed Mar 11, 2024
1 parent 4026ff1 commit 7660d57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 1 addition & 6 deletions rules/EarlyReturn/NodeAnalyzer/IfAndAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,7 @@ public function isIfStmtExprUsedInNextReturn(If_ $if, Return_ $return) : bool
}
$ifExprs = $this->betterNodeFinder->findInstanceOf($if->stmts, Expr::class);
return (bool) $this->betterNodeFinder->findFirst($return->expr, function (Node $node) use($ifExprs) : bool {
foreach ($ifExprs as $ifExpr) {
if ($this->nodeComparator->areNodesEqual($node, $ifExpr)) {
return \true;
}
}
return \false;
return $this->nodeComparator->isNodeEqual($node, $ifExprs);
});
}
}
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 = '2adeacc410de9304137574d2e80cf97c9f67dfa5';
public const PACKAGE_VERSION = '8ade0b9e46aff3e6f755a9561579cdc0c9eb9b0e';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-03-11 09:10:24';
public const RELEASE_DATE = '2024-03-11 09:21:31';
/**
* @var int
*/
Expand Down

0 comments on commit 7660d57

Please sign in to comment.