pub enum PhpDocTag<'src> {
Show 29 variants
Param {
type_str: Option<&'src str>,
name: Option<&'src str>,
description: Option<Cow<'src, str>>,
},
Return {
type_str: Option<&'src str>,
description: Option<Cow<'src, str>>,
},
Var {
type_str: Option<&'src str>,
name: Option<&'src str>,
description: Option<Cow<'src, str>>,
},
Throws {
type_str: Option<&'src str>,
description: Option<Cow<'src, str>>,
},
Deprecated {
description: Option<Cow<'src, str>>,
},
Template {
name: &'src str,
bound: Option<&'src str>,
},
Extends {
type_str: &'src str,
},
Implements {
type_str: &'src str,
},
Method {
signature: &'src str,
},
Property {
type_str: Option<&'src str>,
name: Option<&'src str>,
description: Option<Cow<'src, str>>,
},
PropertyRead {
type_str: Option<&'src str>,
name: Option<&'src str>,
description: Option<Cow<'src, str>>,
},
PropertyWrite {
type_str: Option<&'src str>,
name: Option<&'src str>,
description: Option<Cow<'src, str>>,
},
See {
reference: &'src str,
},
Link {
url: &'src str,
},
Since {
version: &'src str,
},
Author {
name: &'src str,
},
Internal,
InheritDoc,
Assert {
type_str: Option<&'src str>,
name: Option<&'src str>,
},
TypeAlias {
name: Option<&'src str>,
type_str: Option<&'src str>,
},
ImportType {
body: &'src str,
},
Suppress {
rules: &'src str,
},
Pure,
Readonly,
Immutable,
Mixin {
class: &'src str,
},
TemplateCovariant {
name: &'src str,
bound: Option<&'src str>,
},
TemplateContravariant {
name: &'src str,
bound: Option<&'src str>,
},
Generic {
tag: &'src str,
body: Option<Cow<'src, str>>,
},
}Expand description
A single PHPDoc tag (e.g. @param int $x The value).
Variants§
Param
@param [type] $name [description]
Return
@return [type] [description]
Var
@var [type] [$name] [description]
Throws
@throws [type] [description]
Deprecated
@deprecated [description]
Template
@template T [of bound]
Extends
@extends [type]
Implements
@implements [type]
Method
@method [static] [return_type] name(params) [description]
Property
@property [type] $name [description]
PropertyRead
@property-read [type] $name [description]
PropertyWrite
@property-write [type] $name [description]
See
@see [reference] [description]
Link
@link [url] [description]
Since
@since [version] [description]
Author
@author name [<email>]
Internal
@internal
InheritDoc
@inheritdoc / {@inheritdoc}
Assert
@psalm-assert, @phpstan-assert — assert that a parameter has a type after the call.
TypeAlias
@psalm-type, @phpstan-type — local type alias (@type Foo = int|string).
ImportType
@psalm-import-type, @phpstan-import-type — import a type alias from another class.
Suppress
@psalm-suppress, @phpstan-ignore-next-line, @phpstan-ignore — suppress diagnostics.
Pure
@psalm-pure, @psalm-immutable, @psalm-readonly — purity/immutability markers.
Readonly
@psalm-readonly, @readonly — marks a property as read-only.
Immutable
@psalm-immutable — marks a class as immutable.
Mixin
@mixin [class] — indicates the class delegates calls to another.
TemplateCovariant
@template-covariant T [of bound]
TemplateContravariant
@template-contravariant T [of bound]
Generic
Any tag not specifically recognized: @tagname [body]