Updated Rector to commit 93e025900b640f8182b267812a08c364d42590ef

93e025900b [automated] Apply Coding Standard (#5782)
This commit is contained in:
Tomas Votruba 2024-03-31 00:30:04 +00:00
parent f2feb272ed
commit 0a7d532276
3 changed files with 9 additions and 9 deletions

View File

@ -5,9 +5,9 @@ namespace RectorPrefix202403;
use Rector\Config\RectorConfig; use Rector\Config\RectorConfig;
use Rector\Php82\Rector\Class_\ReadOnlyClassRector; use Rector\Php82\Rector\Class_\ReadOnlyClassRector;
use Rector\Php82\Rector\Encapsed\VariableInStringInterpolationFixerRector;
use Rector\Php82\Rector\FuncCall\Utf8DecodeEncodeToMbConvertEncodingRector; use Rector\Php82\Rector\FuncCall\Utf8DecodeEncodeToMbConvertEncodingRector;
use Rector\Php82\Rector\New_\FilesystemIteratorSkipDotsRector; use Rector\Php82\Rector\New_\FilesystemIteratorSkipDotsRector;
use Rector\Php82\Rector\Encapsed\VariableInStringInterpolationFixerRector;
return static function (RectorConfig $rectorConfig) : void { return static function (RectorConfig $rectorConfig) : void {
$rectorConfig->rules([ReadOnlyClassRector::class, Utf8DecodeEncodeToMbConvertEncodingRector::class, FilesystemIteratorSkipDotsRector::class, VariableInStringInterpolationFixerRector::class]); $rectorConfig->rules([ReadOnlyClassRector::class, Utf8DecodeEncodeToMbConvertEncodingRector::class, FilesystemIteratorSkipDotsRector::class, VariableInStringInterpolationFixerRector::class]);
}; };

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api * @api
* @var string * @var string
*/ */
public const PACKAGE_VERSION = 'aa706a152c2cb0ece154edab3bc89bad8c2f7208'; public const PACKAGE_VERSION = '93e025900b640f8182b267812a08c364d42590ef';
/** /**
* @api * @api
* @var string * @var string
*/ */
public const RELEASE_DATE = '2024-03-29 22:36:43'; public const RELEASE_DATE = '2024-03-31 00:27:47';
/** /**
* @var int * @var int
*/ */

View File

@ -357,11 +357,6 @@ final class BetterStandardPrinter extends Standard
} }
return parent::pScalar_LNumber($lNumber); 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 protected function pExpr_MethodCall(MethodCall $methodCall) : string
{ {
if (SimpleParameterProvider::provideBoolParameter(Option::NEW_LINE_ON_FLUENT_CALL) === \false) { 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); $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); 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) : ''); 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 * Must be a method to be able to react to changed parameter in tests
*/ */