From 0c2b95ea62f6c328042c71cffc3c28da70c5e474 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Wed, 10 Apr 2024 10:22:01 +0000 Subject: [PATCH] Updated Rector to commit de7b0526ad03b6e2ecc47d28eb8c8e0e5224152a https://github.com/rectorphp/rector-src/commit/de7b0526ad03b6e2ecc47d28eb8c8e0e5224152a [TypeDeclaration] Handle return by array shape type on AddArrowFunctionReturnTypeRector (#5815) --- src/Application/VersionResolver.php | 4 ++-- src/NodeTypeResolver/NodeTypeResolver.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 3d69f300af8..18df1d7a652 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 = '1d2d51e20ce11d0f603e42bd8869c1ab6d2a52cc'; + public const PACKAGE_VERSION = 'de7b0526ad03b6e2ecc47d28eb8c8e0e5224152a'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-04-10 03:35:14'; + public const RELEASE_DATE = '2024-04-10 17:19:25'; /** * @var int */ diff --git a/src/NodeTypeResolver/NodeTypeResolver.php b/src/NodeTypeResolver/NodeTypeResolver.php index 289ba44360a..1779f7875d4 100644 --- a/src/NodeTypeResolver/NodeTypeResolver.php +++ b/src/NodeTypeResolver/NodeTypeResolver.php @@ -332,11 +332,11 @@ final class NodeTypeResolver return $type; } $optionalKeys = $variableType->getOptionalKeys(); - foreach ($variableType->getKeyTypes() as $key => $type) { - if (!$type instanceof ConstantStringType) { + foreach ($variableType->getKeyTypes() as $key => $keyType) { + if (!$keyType instanceof ConstantStringType) { continue; } - if ($type->getValue() !== $arrayDimFetch->dim->value) { + if ($keyType->getValue() !== $arrayDimFetch->dim->value) { continue; } if (!\in_array($key, $optionalKeys, \true)) {