Skip to content

Commit d06c6ce

Browse files
committed
Updated Rector to commit 61ebcc53b5c50f244ce0f7dfb626ded8d371c0a5
rectorphp/rector-src@61ebcc5 [DeadCode] Support multiple templates in RemoveUselessVarTagRector (#6402)
1 parent 8baae8f commit d06c6ce

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

rules/TypeDeclaration/PHPStan/ObjectTypeSpecifier.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use PhpParser\Node\Stmt\Use_;
1111
use PhpParser\Node\Stmt\UseUse;
1212
use PHPStan\Analyser\Scope;
13-
use PHPStan\PhpDoc\Tag\TemplateTag;
1413
use PHPStan\Reflection\ClassReflection;
1514
use PHPStan\Reflection\ReflectionProvider;
1615
use PHPStan\Type\Generic\GenericObjectType;
@@ -89,13 +88,11 @@ public function narrowToFullyQualifiedOrAliasedObjectType(Node $node, ObjectType
8988
// invalid type
9089
return new NonExistingObjectType($className);
9190
}
92-
// only support single @template for now
93-
if (\count($templateTags) !== 1) {
91+
$currentTemplateTag = $templateTags[$className] ?? null;
92+
if ($currentTemplateTag === null) {
9493
// invalid type
9594
return new NonExistingObjectType($className);
9695
}
97-
/** @var TemplateTag $currentTemplateTag */
98-
$currentTemplateTag = \current($templateTags);
9996
return TemplateTypeFactory::create($templateTypeScope, $currentTemplateTag->getName(), $currentTemplateTag->getBound(), $currentTemplateTag->getVariance());
10097
}
10198
}

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 = '61a787e62541281bd5f3678fb2819d645c8f0055';
22+
public const PACKAGE_VERSION = '61ebcc53b5c50f244ce0f7dfb626ded8d371c0a5';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2024-10-26 22:09:03';
27+
public const RELEASE_DATE = '2024-10-27 15:15:12';
2828
/**
2929
* @var int
3030
*/

0 commit comments

Comments
 (0)