diff --git a/rules/CodeQuality/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php b/rules/CodeQuality/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php index 172e0b02417a..b54f2e7dd806 100644 --- a/rules/CodeQuality/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php +++ b/rules/CodeQuality/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php @@ -45,6 +45,10 @@ final class OptionalParametersAfterRequiredRector extends AbstractScopeAwareRect * @var \Rector\CodingStyle\Reflection\VendorLocationDetector */ private $vendorLocationDetector; + /** + * @var string + */ + private const HAS_SWAPPED_PARAMS = 'has_swapped_params'; public function __construct(RequireOptionalParamResolver $requireOptionalParamResolver, ArgumentSorter $argumentSorter, ReflectionResolver $reflectionResolver, VendorLocationDetector $vendorLocationDetector) { $this->requireOptionalParamResolver = $requireOptionalParamResolver; @@ -98,6 +102,9 @@ private function refactorClassMethod(ClassMethod $classMethod, Scope $scope) : ? if ($classMethod->params === []) { return null; } + if ($classMethod->getAttribute(self::HAS_SWAPPED_PARAMS, \false) === \true) { + return null; + } $classMethodReflection = $this->reflectionResolver->resolveMethodReflectionFromClassMethod($classMethod); if (!$classMethodReflection instanceof MethodReflection) { return null; @@ -107,6 +114,7 @@ private function refactorClassMethod(ClassMethod $classMethod, Scope $scope) : ? return null; } $classMethod->params = $this->argumentSorter->sortArgsByExpectedParamOrder($classMethod->params, $expectedArgOrParamOrder); + $classMethod->setAttribute(self::HAS_SWAPPED_PARAMS, \true); return $classMethod; } private function refactorNew(New_ $new, Scope $scope) : ?New_ diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 3a745c4b6620..8f4249c77a68 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 = '5dfb6218ec53caa197456adb78baebaae0a4334a'; + public const PACKAGE_VERSION = '3648297e5b2bc393b41fa85eba1028d3735dbaa6'; /** * @api * @var string */ - public const RELEASE_DATE = '2023-07-12 05:59:29'; + public const RELEASE_DATE = '2023-07-11 23:45:14'; /** * @var int */ diff --git a/vendor/autoload.php b/vendor/autoload.php index 7679cc047974..61d099afa8b7 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -22,4 +22,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit42f175375f79a43b0c3e89536dfbe74d::getLoader(); +return ComposerAutoloaderInit8ba89176c86d2d04645b4b1044bc6857::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 773c84bff8fc..b32afb6adfc6 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit42f175375f79a43b0c3e89536dfbe74d +class ComposerAutoloaderInit8ba89176c86d2d04645b4b1044bc6857 { private static $loader; @@ -22,17 +22,17 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit42f175375f79a43b0c3e89536dfbe74d', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit8ba89176c86d2d04645b4b1044bc6857', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit42f175375f79a43b0c3e89536dfbe74d', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit8ba89176c86d2d04645b4b1044bc6857', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit42f175375f79a43b0c3e89536dfbe74d::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit8ba89176c86d2d04645b4b1044bc6857::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInit42f175375f79a43b0c3e89536dfbe74d::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInit8ba89176c86d2d04645b4b1044bc6857::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index b76fd6f0519a..d3721b2cc37a 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit42f175375f79a43b0c3e89536dfbe74d +class ComposerStaticInit8ba89176c86d2d04645b4b1044bc6857 { public static $files = array ( 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', @@ -3062,9 +3062,9 @@ class ComposerStaticInit42f175375f79a43b0c3e89536dfbe74d public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit42f175375f79a43b0c3e89536dfbe74d::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit42f175375f79a43b0c3e89536dfbe74d::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit42f175375f79a43b0c3e89536dfbe74d::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit8ba89176c86d2d04645b4b1044bc6857::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit8ba89176c86d2d04645b4b1044bc6857::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit8ba89176c86d2d04645b4b1044bc6857::$classMap; }, null, ClassLoader::class); }