Skip to content

Commit f8b90ee

Browse files
committed
Updated Rector to commit 679e314c916c0c61ef41ca1e40d39694c0ec10b6
rectorphp/rector-src@679e314 [Php71] Try to handle no variants on RemoveExtraParametersRector (#7803)
1 parent 274878f commit f8b90ee

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

rules/Php71/Rector/FuncCall/RemoveExtraParametersRector.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ private function resolveMaximumAllowedParameterCount($functionLikeReflection): i
141141
foreach ($functionLikeReflection->getVariants() as $parametersAcceptor) {
142142
$parameterCounts[] = count($parametersAcceptor->getParameters());
143143
}
144+
// empty variants -> use max value possibly has to prevent removing arguments incorrectly
145+
if ($parameterCounts === [0]) {
146+
return \PHP_INT_MAX;
147+
}
144148
return max($parameterCounts);
145149
}
146150
}

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 = '9548641518f579776d75d5f0a4a1c1ea2cc615a8';
22+
public const PACKAGE_VERSION = '679e314c916c0c61ef41ca1e40d39694c0ec10b6';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2026-01-13 15:02:58';
27+
public const RELEASE_DATE = '2026-01-13 15:08:44';
2828
/**
2929
* @var int
3030
*/

0 commit comments

Comments
 (0)