Skip to content

Commit 3b383b9

Browse files
committed
Updated Rector to commit 92104b02a3d0405bc9ef89406ac1552149775428
rectorphp/rector-src@92104b0 [CodeQuality] Hnadle with negation binary op previous if on CombineIfRector (#7945)
1 parent 1b4529b commit 3b383b9

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

rules/CodeQuality/Rector/If_/CombineIfRector.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use PhpParser\Node;
77
use PhpParser\Node\Expr\BinaryOp;
88
use PhpParser\Node\Expr\BinaryOp\BooleanAnd;
9+
use PhpParser\Node\Expr\BooleanNot;
910
use PhpParser\Node\Stmt\Else_;
1011
use PhpParser\Node\Stmt\If_;
1112
use PHPStan\PhpDocParser\Ast\PhpDoc\VarTagValueNode;
@@ -93,6 +94,9 @@ public function refactor(Node $node): ?Node
9394
if ($subIf->cond instanceof BinaryOp && !$subIf->cond->left instanceof BinaryOp) {
9495
$subIf->cond->left->setAttribute(AttributeKey::ORIGINAL_NODE, null);
9596
}
97+
if ($node->cond instanceof BooleanNot && $node->cond->expr instanceof BinaryOp) {
98+
$node->cond->expr->setAttribute(AttributeKey::ORIGINAL_NODE, null);
99+
}
96100
$node->cond = new BooleanAnd($node->cond, $subIf->cond);
97101
$node->stmts = $subIf->stmts;
98102
$this->commentsMerger->keepComments($node, [$subIf]);

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 = '68156b9da3691ed306f3c2be0eebd8582f14520d';
22+
public const PACKAGE_VERSION = '92104b02a3d0405bc9ef89406ac1552149775428';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2026-03-29 00:56:46';
27+
public const RELEASE_DATE = '2026-03-30 09:59:03';
2828
/**
2929
* @var int
3030
*/

0 commit comments

Comments
 (0)