Skip to content

Commit 2d7a042

Browse files
committed
Updated Rector to commit 8f5ac731d7ea25fb4b55ed36c2d5a5451acea43c
rectorphp/rector-src@8f5ac73 [Printer] Reduce call on BetterStandardPrinter (#6713)
1 parent 233d369 commit 2d7a042

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

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 = '49e323a7e24658e84f5d60fcfde83c4e9c652183';
22+
public const PACKAGE_VERSION = '8f5ac731d7ea25fb4b55ed36c2d5a5451acea43c';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2025-02-02 00:33:37';
27+
public const RELEASE_DATE = '2025-02-02 09:11:39';
2828
/**
2929
* @var int
3030
*/

src/PhpParser/Printer/BetterStandardPrinter.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -309,19 +309,19 @@ protected function pScalar_Int(Int_ $int) : string
309309
}
310310
protected function pExpr_MethodCall(MethodCall $methodCall) : string
311311
{
312+
if (!$methodCall->var instanceof CallLike) {
313+
return parent::pExpr_MethodCall($methodCall);
314+
}
312315
if (SimpleParameterProvider::provideBoolParameter(Option::NEW_LINE_ON_FLUENT_CALL) === \false) {
313316
return parent::pExpr_MethodCall($methodCall);
314317
}
315-
if ($methodCall->var instanceof CallLike) {
316-
foreach ($methodCall->args as $arg) {
317-
if (!$arg instanceof Arg) {
318-
continue;
319-
}
320-
$arg->value->setAttribute(AttributeKey::ORIGINAL_NODE, null);
318+
foreach ($methodCall->args as $arg) {
319+
if (!$arg instanceof Arg) {
320+
continue;
321321
}
322-
return $this->pDereferenceLhs($methodCall->var) . "\n" . $this->resolveIndentSpaces() . '->' . $this->pObjectProperty($methodCall->name) . '(' . $this->pMaybeMultiline($methodCall->args) . ')';
322+
$arg->value->setAttribute(AttributeKey::ORIGINAL_NODE, null);
323323
}
324-
return parent::pExpr_MethodCall($methodCall);
324+
return $this->pDereferenceLhs($methodCall->var) . "\n" . $this->resolveIndentSpaces() . '->' . $this->pObjectProperty($methodCall->name) . '(' . $this->pMaybeMultiline($methodCall->args) . ')';
325325
}
326326
/**
327327
* Keep attributes on newlines

0 commit comments

Comments
 (0)