Skip to content

Commit 7660d57

Browse files
committed
Updated Rector to commit 8ade0b9e46aff3e6f755a9561579cdc0c9eb9b0e
rectorphp/rector-src@8ade0b9 [EarlyReturn] Clena up equal node check on IfAndAnalyzer::isIfStmtExprUsedInNextReturn() (#5710)
1 parent 4026ff1 commit 7660d57

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

rules/EarlyReturn/NodeAnalyzer/IfAndAnalyzer.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,7 @@ public function isIfStmtExprUsedInNextReturn(If_ $if, Return_ $return) : bool
4343
}
4444
$ifExprs = $this->betterNodeFinder->findInstanceOf($if->stmts, Expr::class);
4545
return (bool) $this->betterNodeFinder->findFirst($return->expr, function (Node $node) use($ifExprs) : bool {
46-
foreach ($ifExprs as $ifExpr) {
47-
if ($this->nodeComparator->areNodesEqual($node, $ifExpr)) {
48-
return \true;
49-
}
50-
}
51-
return \false;
46+
return $this->nodeComparator->isNodeEqual($node, $ifExprs);
5247
});
5348
}
5449
}

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = '2adeacc410de9304137574d2e80cf97c9f67dfa5';
22+
public const PACKAGE_VERSION = '8ade0b9e46aff3e6f755a9561579cdc0c9eb9b0e';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2024-03-11 09:10:24';
27+
public const RELEASE_DATE = '2024-03-11 09:21:31';
2828
/**
2929
* @var int
3030
*/

0 commit comments

Comments
 (0)