Skip to content

Commit d69241a

Browse files
committed
Updated Rector to commit 269af160e62cc18c17785cb045f266baef4d6a76
rectorphp/rector-src@269af16 [CodeQuality] Wrap assign on right side of binary op in parentheses in LogicalToBooleanRector (#8151)
1 parent 3d8ef14 commit d69241a

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

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 = 'ffa770e63686db2b8b8b7ba19ccb5520e7af98f5';
22+
public const PACKAGE_VERSION = '269af160e62cc18c17785cb045f266baef4d6a76';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2026-07-06 18:41:54';
27+
public const RELEASE_DATE = '2026-07-06 21:31:41';
2828
/**
2929
* @var int
3030
*/

src/PhpParser/Printer/BetterStandardPrinter.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,9 @@ private function wrapBinaryOpWithBrackets(Node $node): void
374374
if ($node->left instanceof Assign && $this->origTokens instanceof TokenStream && !$this->origTokens->haveParens($node->left->getStartTokenPos(), $node->left->getEndTokenPos())) {
375375
$node->left->setAttribute(AttributeKey::ORIGINAL_NODE, null);
376376
}
377+
if ($node->right instanceof Assign && $this->origTokens instanceof TokenStream && !$this->origTokens->haveParens($node->right->getStartTokenPos(), $node->right->getEndTokenPos())) {
378+
$node->right->setAttribute(AttributeKey::ORIGINAL_NODE, null);
379+
}
377380
if ($node->left instanceof BinaryOp && $node->left->getAttribute(AttributeKey::ORIGINAL_NODE) instanceof Node) {
378381
$node->left->setAttribute(AttributeKey::ORIGINAL_NODE, null);
379382
}

0 commit comments

Comments
 (0)