Skip to content

Commit

Permalink
Updated Rector to commit 8f5ac731d7ea25fb4b55ed36c2d5a5451acea43c
Browse files Browse the repository at this point in the history
rectorphp/rector-src@8f5ac73 [Printer] Reduce call on BetterStandardPrinter (#6713)
  • Loading branch information
TomasVotruba committed Feb 2, 2025
1 parent 233d369 commit 2d7a042
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
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 = '49e323a7e24658e84f5d60fcfde83c4e9c652183';
public const PACKAGE_VERSION = '8f5ac731d7ea25fb4b55ed36c2d5a5451acea43c';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2025-02-02 00:33:37';
public const RELEASE_DATE = '2025-02-02 09:11:39';
/**
* @var int
*/
Expand Down
16 changes: 8 additions & 8 deletions src/PhpParser/Printer/BetterStandardPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,19 +309,19 @@ protected function pScalar_Int(Int_ $int) : string
}
protected function pExpr_MethodCall(MethodCall $methodCall) : string
{
if (!$methodCall->var instanceof CallLike) {
return parent::pExpr_MethodCall($methodCall);
}
if (SimpleParameterProvider::provideBoolParameter(Option::NEW_LINE_ON_FLUENT_CALL) === \false) {
return parent::pExpr_MethodCall($methodCall);
}
if ($methodCall->var instanceof CallLike) {
foreach ($methodCall->args as $arg) {
if (!$arg instanceof Arg) {
continue;
}
$arg->value->setAttribute(AttributeKey::ORIGINAL_NODE, null);
foreach ($methodCall->args as $arg) {
if (!$arg instanceof Arg) {
continue;
}
return $this->pDereferenceLhs($methodCall->var) . "\n" . $this->resolveIndentSpaces() . '->' . $this->pObjectProperty($methodCall->name) . '(' . $this->pMaybeMultiline($methodCall->args) . ')';
$arg->value->setAttribute(AttributeKey::ORIGINAL_NODE, null);
}
return parent::pExpr_MethodCall($methodCall);
return $this->pDereferenceLhs($methodCall->var) . "\n" . $this->resolveIndentSpaces() . '->' . $this->pObjectProperty($methodCall->name) . '(' . $this->pMaybeMultiline($methodCall->args) . ')';
}
/**
* Keep attributes on newlines
Expand Down

0 comments on commit 2d7a042

Please sign in to comment.