Skip to content

Commit

Permalink
Updated Rector to commit 61ebcc53b5c50f244ce0f7dfb626ded8d371c0a5
Browse files Browse the repository at this point in the history
rectorphp/rector-src@61ebcc5 [DeadCode] Support multiple templates in RemoveUselessVarTagRector (#6402)
  • Loading branch information
TomasVotruba committed Oct 27, 2024
1 parent 8baae8f commit d06c6ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions rules/TypeDeclaration/PHPStan/ObjectTypeSpecifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use PhpParser\Node\Stmt\Use_;
use PhpParser\Node\Stmt\UseUse;
use PHPStan\Analyser\Scope;
use PHPStan\PhpDoc\Tag\TemplateTag;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\Generic\GenericObjectType;
Expand Down Expand Up @@ -89,13 +88,11 @@ public function narrowToFullyQualifiedOrAliasedObjectType(Node $node, ObjectType
// invalid type
return new NonExistingObjectType($className);
}
// only support single @template for now
if (\count($templateTags) !== 1) {
$currentTemplateTag = $templateTags[$className] ?? null;
if ($currentTemplateTag === null) {
// invalid type
return new NonExistingObjectType($className);
}
/** @var TemplateTag $currentTemplateTag */
$currentTemplateTag = \current($templateTags);
return TemplateTypeFactory::create($templateTypeScope, $currentTemplateTag->getName(), $currentTemplateTag->getBound(), $currentTemplateTag->getVariance());
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '61a787e62541281bd5f3678fb2819d645c8f0055';
public const PACKAGE_VERSION = '61ebcc53b5c50f244ce0f7dfb626ded8d371c0a5';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-10-26 22:09:03';
public const RELEASE_DATE = '2024-10-27 15:15:12';
/**
* @var int
*/
Expand Down

0 comments on commit d06c6ce

Please sign in to comment.