diff --git a/rules/CodeQuality/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php b/rules/CodeQuality/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php index e0ea1e6f0f7..1d07395135a 100644 --- a/rules/CodeQuality/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php +++ b/rules/CodeQuality/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php @@ -13,6 +13,7 @@ use PhpParser\Node\Stmt\Function_; use PHPStan\Analyser\Scope; use PHPStan\Reflection\FunctionReflection; use PHPStan\Reflection\MethodReflection; +use PHPStan\Reflection\Native\NativeFunctionReflection; use Rector\CodingStyle\Reflection\VendorLocationDetector; use Rector\NodeTypeResolver\PHPStan\ParametersAcceptorSelectorVariantsWrapper; use Rector\Php80\NodeResolver\ArgumentSorter; @@ -178,6 +179,9 @@ CODE_SAMPLE */ private function resolveExpectedArgParamOrderIfDifferent($reflection, $node, Scope $scope) : ?array { + if ($reflection instanceof NativeFunctionReflection) { + return null; + } if ($reflection instanceof MethodReflection && $this->vendorLocationDetector->detectMethodReflection($reflection)) { return null; } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 042458285b6..e23820eaa0f 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 = '1374e15d742f4f36f0bef45db9f8920a589865b3'; + public const PACKAGE_VERSION = '9ce6af83b6996631fe2a13cca64d25142dc9fb15'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-04-20 17:59:14'; + public const RELEASE_DATE = '2024-04-20 19:22:19'; /** * @var int */