Updated Rector to commit bd59f6b9e32ad4fce96b3a0d12467719015d8282

bd59f6b9e3 [Printer] Remove AlwaysRememberedExpr check on BetterStandardPrinter (#6484)
This commit is contained in:
Tomas Votruba 2024-11-23 16:12:58 +00:00
parent a4b775b156
commit 57831bceaf
2 changed files with 2 additions and 6 deletions

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'b5b96c8af1570acb09faac2f22cb229c3905208f';
public const PACKAGE_VERSION = 'bd59f6b9e32ad4fce96b3a0d12467719015d8282';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-11-23 22:38:11';
public const RELEASE_DATE = '2024-11-23 23:10:35';
/**
* @var int
*/

View File

@ -24,7 +24,6 @@ use PhpParser\Node\Scalar\String_;
use PhpParser\Node\Stmt\Declare_;
use PhpParser\Node\Stmt\Nop;
use PhpParser\PrettyPrinter\Standard;
use PHPStan\Node\Expr\AlwaysRememberedExpr;
use Rector\Configuration\Option;
use Rector\Configuration\Parameter\SimpleParameterProvider;
use Rector\NodeTypeResolver\Node\AttributeKey;
@ -100,9 +99,6 @@ final class BetterStandardPrinter extends Standard
}
protected function p(Node $node, int $precedence = self::MAX_PRECEDENCE, int $lhsPrecedence = self::MAX_PRECEDENCE, bool $parentFormatPreserved = \false) : string
{
while ($node instanceof AlwaysRememberedExpr) {
$node = $node->getExpr();
}
$content = parent::p($node, $precedence, $lhsPrecedence, $parentFormatPreserved);
return $node->getAttribute(AttributeKey::WRAPPED_IN_PARENTHESES) === \true ? '(' . $content . ')' : $content;
}