From 64561153dde96264e669de23f87f4d7f51557bca Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 11 Oct 2026 00:27:30 +0200 Subject: [PATCH 1/2] [TypeDeclaration] Skip parent reflection guards when no untyped param in StrictArrayParamDimFetchRector --- .../ClassMethod/StrictArrayParamDimFetchRector.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rules/TypeDeclaration/Rector/ClassMethod/StrictArrayParamDimFetchRector.php b/rules/TypeDeclaration/Rector/ClassMethod/StrictArrayParamDimFetchRector.php index 8573a0374f2..696e72cc064 100644 --- a/rules/TypeDeclaration/Rector/ClassMethod/StrictArrayParamDimFetchRector.php +++ b/rules/TypeDeclaration/Rector/ClassMethod/StrictArrayParamDimFetchRector.php @@ -93,6 +93,15 @@ public function getNodeTypes(): array */ public function refactor(Node $node): ?Node { + // cheap bail - nothing to add, skip costly parent reflection guards below + $hasUntypedParam = array_any( + $node->getParams(), + static fn (Param $param): bool => ! $param->type instanceof Node && ! $param->variadic + ); + if (! $hasUntypedParam) { + return null; + } + $hasChanged = false; if ($node instanceof ClassMethod && $this->parentClassMethodTypeOverrideGuard->hasParentClassMethod($node)) { return null; From 374a0a1f13c2dd92b5cb5d0767763a9494ce9006 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 10 Oct 2026 22:28:27 +0000 Subject: [PATCH 2/2] [ci-review] Rector Rectify --- .../Rector/Property/RemoveUnusedPrivatePropertyRector.php | 4 +--- src/Configuration/Option.php | 1 - .../Experimental/ExperimentalParallelFileProcessor.php | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/rules/DeadCode/Rector/Property/RemoveUnusedPrivatePropertyRector.php b/rules/DeadCode/Rector/Property/RemoveUnusedPrivatePropertyRector.php index 8b8dc8d65ef..69bd21eb30a 100644 --- a/rules/DeadCode/Rector/Property/RemoveUnusedPrivatePropertyRector.php +++ b/rules/DeadCode/Rector/Property/RemoveUnusedPrivatePropertyRector.php @@ -69,9 +69,7 @@ public function getNodeTypes(): array public function refactor(Node $node): ?Node { // skip if has no private property - $hasAnyPrivateProperty = array_any($node->getProperties(), function (Property $property): bool { - return $property->isPrivate(); - }); + $hasAnyPrivateProperty = array_any($node->getProperties(), fn(Property $property): bool => $property->isPrivate()); if (! $hasAnyPrivateProperty) { return null; diff --git a/src/Configuration/Option.php b/src/Configuration/Option.php index 72031cceff5..34e5672107a 100644 --- a/src/Configuration/Option.php +++ b/src/Configuration/Option.php @@ -187,7 +187,6 @@ final class Option /** * @experimental Opt-in to the LPT bucket scheduler * @see \Rector\Parallel\Experimental\LptScheduleFactory - * @var string */ public const string LPT = 'lpt'; diff --git a/src/Parallel/Experimental/ExperimentalParallelFileProcessor.php b/src/Parallel/Experimental/ExperimentalParallelFileProcessor.php index acd0efdb3a6..1352ba42f80 100644 --- a/src/Parallel/Experimental/ExperimentalParallelFileProcessor.php +++ b/src/Parallel/Experimental/ExperimentalParallelFileProcessor.php @@ -67,7 +67,7 @@ public function process( ): ProcessResult { // reversed, so that array_pop() hands out the biggest files first $jobsPerWorker = array_map( - static fn (array $jobs): array => array_reverse($jobs), + array_reverse(...), $bucketSchedule->getJobsPerWorker() );