@psalm-type
The @psalm-type tag declares a local alias for a complex type, which can then be reused across the codebase. It is defined by the static analyzer Psalm.
"@psalm-type" <Name> [ "=" ] <Type>
Parsing a @psalm-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 @phpstan-type and @phan-type, which restate the same concept for their respective tools.
See Psalm's supported annotations.
08 July 2026