From 54e7a3a8950f29a9162b92ecf6d000ca67eee65c Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Tue, 28 Nov 2023 11:12:27 +0000 Subject: [PATCH] Updated Rector to commit 765b63696eb3bc240e92f10b00169b146c99463a https://github.com/rectorphp/rector-src/commit/765b63696eb3bc240e92f10b00169b146c99463a [TypeDeclaration][Performance] Check typed param already early on ParamTypeByMethodCallTypeRector (#5295) --- .../Rector/ClassMethod/ParamTypeByMethodCallTypeRector.php | 6 +++--- src/Application/VersionResolver.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByMethodCallTypeRector.php b/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByMethodCallTypeRector.php index 24235b7ca86..e040c888516 100644 --- a/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByMethodCallTypeRector.php +++ b/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByMethodCallTypeRector.php @@ -163,13 +163,13 @@ CODE_SAMPLE } private function shouldSkipParam(Param $param, ClassMethod $classMethod) : bool { - if (!$this->paramTypeAddGuard->isLegal($param, $classMethod)) { + // already has type, skip + if ($param->type !== null) { return \true; } if ($param->variadic) { return \true; } - // already has type, skip - return $param->type !== null; + return !$this->paramTypeAddGuard->isLegal($param, $classMethod); } } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index fcb66cfc045..6097ada3f63 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 = '118fbde3b1ccc3685c55cd2704bc971d2d49ef41'; + public const PACKAGE_VERSION = '765b63696eb3bc240e92f10b00169b146c99463a'; /** * @api * @var string */ - public const RELEASE_DATE = '2023-11-28 11:08:22'; + public const RELEASE_DATE = '2023-11-28 18:10:17'; /** * @var int */