Tag reference
@psalm-ignore-var
The @psalm-ignore-var tag excludes the @var annotation immediately
following it from being used by Psalm for type inference, telling the
analyzer to fall back to its own inferred type instead of trusting the
declared one.
Grammar
"@psalm-ignore-var" [ <Description> ]Examples
/** * @var Foo $foo * @psalm-ignore-var */$foo = $container->get('foo');Names by platform
- psalm
@psalm-ignore-var
Parsing a @psalm-ignore-var tag produces a PsalmIgnoreVarTag instance. Being a pure
marker, it adds nothing beyond the $name and optional $description
every Tag already carries.
final class PsalmIgnoreVarTag extends FlagTag {}