@phpstan-type
The @phpstan-type tag declares a local alias for a complex type, so it can be referenced by name in later @param, @return, and @var tags. It is defined by the static analyzer PHPStan.
"@phpstan-type" <Name> [ "=" ] <Type>
Parsing a @phpstan-type tag produces a TypeAliasTag instance, carrying the parsed $alias name and its $type alongside the $name every Tag already provides.
final class TypeAliasTag extends Tag {}
The same TypeAliasTag is produced by @psalm-type and @phan-type, which restate the same concept for their respective tools.
See PHPStan's PHPDoc types.
08 July 2026