diff --git a/config/set/php82.php b/config/set/php82.php index 17aadb33746..c1af65365dc 100644 --- a/config/set/php82.php +++ b/config/set/php82.php @@ -5,9 +5,9 @@ namespace RectorPrefix202403; use Rector\Config\RectorConfig; use Rector\Php82\Rector\Class_\ReadOnlyClassRector; +use Rector\Php82\Rector\Encapsed\VariableInStringInterpolationFixerRector; use Rector\Php82\Rector\FuncCall\Utf8DecodeEncodeToMbConvertEncodingRector; use Rector\Php82\Rector\New_\FilesystemIteratorSkipDotsRector; -use Rector\Php82\Rector\Encapsed\VariableInStringInterpolationFixerRector; return static function (RectorConfig $rectorConfig) : void { $rectorConfig->rules([ReadOnlyClassRector::class, Utf8DecodeEncodeToMbConvertEncodingRector::class, FilesystemIteratorSkipDotsRector::class, VariableInStringInterpolationFixerRector::class]); }; diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 853d446ab55..683e9ad8d00 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = 'aa706a152c2cb0ece154edab3bc89bad8c2f7208'; + public const PACKAGE_VERSION = '93e025900b640f8182b267812a08c364d42590ef'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-03-29 22:36:43'; + public const RELEASE_DATE = '2024-03-31 00:27:47'; /** * @var int */ diff --git a/src/PhpParser/Printer/BetterStandardPrinter.php b/src/PhpParser/Printer/BetterStandardPrinter.php index 40ee379223d..5a1039e41a0 100644 --- a/src/PhpParser/Printer/BetterStandardPrinter.php +++ b/src/PhpParser/Printer/BetterStandardPrinter.php @@ -357,11 +357,6 @@ final class BetterStandardPrinter extends Standard } return parent::pScalar_LNumber($lNumber); } - private function resolveIndentSpaces() : string - { - $indentSize = SimpleParameterProvider::provideIntParameter(Option::INDENT_SIZE); - return \str_repeat($this->getIndentCharacter(), $this->indentLevel) . \str_repeat($this->getIndentCharacter(), $indentSize); - } protected function pExpr_MethodCall(MethodCall $methodCall) : string { if (SimpleParameterProvider::provideBoolParameter(Option::NEW_LINE_ON_FLUENT_CALL) === \false) { @@ -374,7 +369,7 @@ final class BetterStandardPrinter extends Standard } $arg->value->setAttribute(AttributeKey::ORIGINAL_NODE, null); } - return $this->pDereferenceLhs($methodCall->var) . "\n" . $this->resolveIndentSpaces() . "->" . $this->pObjectProperty($methodCall->name) . '(' . $this->pMaybeMultiline($methodCall->args) . ')'; + return $this->pDereferenceLhs($methodCall->var) . "\n" . $this->resolveIndentSpaces() . '->' . $this->pObjectProperty($methodCall->name) . '(' . $this->pMaybeMultiline($methodCall->args) . ')'; } return parent::pExpr_MethodCall($methodCall); } @@ -385,6 +380,11 @@ final class BetterStandardPrinter extends Standard { return $this->pAttrGroups($param->attrGroups) . $this->pModifiers($param->flags) . ($param->type instanceof Node ? $this->p($param->type) . ' ' : '') . ($param->byRef ? '&' : '') . ($param->variadic ? '...' : '') . $this->p($param->var) . ($param->default instanceof Expr ? ' = ' . $this->p($param->default) : ''); } + private function resolveIndentSpaces() : string + { + $indentSize = SimpleParameterProvider::provideIntParameter(Option::INDENT_SIZE); + return \str_repeat($this->getIndentCharacter(), $this->indentLevel) . \str_repeat($this->getIndentCharacter(), $indentSize); + } /** * Must be a method to be able to react to changed parameter in tests */