Documentation ¶
Index ¶
- Variables
- type BoolAccepts
- type CallableParameter
- type ConditionalReturnCondition
- type Doc
- type Node
- type NodeInheritDoc
- type NodeKind
- type NodeParam
- type NodeRange
- type NodeRemoved
- type NodeReturn
- type NodeSince
- type NodeThrows
- type NodeUnknown
- type NodeVar
- type StringConstraint
- type Type
- type TypeArray
- type TypeArrayKey
- type TypeArrayShape
- type TypeArrayShapeValue
- type TypeBool
- type TypeCallable
- type TypeClassLike
- type TypeConditionalReturn
- type TypeConstant
- type TypeFloat
- type TypeFloatLiteral
- type TypeGenericTemplate
- type TypeInt
- type TypeIntLiteral
- type TypeIntMask
- type TypeIntMaskOf
- type TypeIntersection
- type TypeIterable
- type TypeKeyOf
- type TypeKind
- type TypeMixed
- type TypeNever
- type TypeNull
- type TypeObject
- type TypePrecedence
- type TypeResource
- type TypeScalar
- type TypeString
- type TypeStringLiteral
- type TypeUnion
- type TypeUnknown
- type TypeValueOf
- type TypeVoid
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BoolAccepts ¶
type BoolAccepts uint
const ( BoolAcceptsFalse BoolAccepts = iota BoolAcceptsTrue BoolAcceptsAll )
type CallableParameter ¶
func (*CallableParameter) String ¶
func (c *CallableParameter) String() string
type ConditionalReturnCondition ¶
func (*ConditionalReturnCondition) String ¶
func (c *ConditionalReturnCondition) String() string
type Doc ¶
func ParseFullDoc ¶
Parse the doc string, keeping the leading documentation.
func (*Doc) String ¶
Turns the doc back into a valid PHPDoc string.
NOTE: this is not intended to closely represent the input, but to produce NOTE: an output that has all the information the source had, NOTE: formatting might be slightly different.
It does try to roughly return the doc with the same indentation level as the source.
type Node ¶
type NodeInheritDoc ¶
type NodeInheritDoc struct {
NodeRange
}
func (*NodeInheritDoc) Kind ¶
func (n *NodeInheritDoc) Kind() NodeKind
func (*NodeInheritDoc) String ¶
func (n *NodeInheritDoc) String() string
type NodeRemoved ¶
type NodeRemoved struct { NodeRange Version *phpversion.PHPVersion Description string }
func (*NodeRemoved) Kind ¶
func (n *NodeRemoved) Kind() NodeKind
func (*NodeRemoved) String ¶
func (n *NodeRemoved) String() string
type NodeReturn ¶
func (*NodeReturn) Kind ¶
func (n *NodeReturn) Kind() NodeKind
func (*NodeReturn) String ¶
func (n *NodeReturn) String() string
type NodeSince ¶
type NodeSince struct { NodeRange Version *phpversion.PHPVersion Description string }
type NodeThrows ¶
func (*NodeThrows) Kind ¶
func (n *NodeThrows) Kind() NodeKind
func (*NodeThrows) String ¶
func (n *NodeThrows) String() string
type NodeUnknown ¶
func (*NodeUnknown) Kind ¶
func (n *NodeUnknown) Kind() NodeKind
func (*NodeUnknown) String ¶
func (n *NodeUnknown) String() string
type StringConstraint ¶
type StringConstraint uint
const ( StringConstraintNone StringConstraint = iota StringConstraintClass StringConstraintCallable StringConstraintNumeric StringConstraintNonEmpty StringConstraintLiteral )
type Type ¶
type TypeArrayKey ¶
type TypeArrayKey struct{}
TypeArrayKey is a hashable value (usable as an array key).
func (*TypeArrayKey) Kind ¶
func (t *TypeArrayKey) Kind() TypeKind
func (*TypeArrayKey) String ¶
func (t *TypeArrayKey) String() string
type TypeArrayShape ¶
type TypeArrayShape struct {
Values []*TypeArrayShapeValue
}
func (*TypeArrayShape) Kind ¶
func (t *TypeArrayShape) Kind() TypeKind
func (*TypeArrayShape) String ¶
func (t *TypeArrayShape) String() string
type TypeArrayShapeValue ¶
type TypeArrayShapeValue struct { // Can be an int disguised as a string Key string Type Type Optional bool }
func (*TypeArrayShapeValue) Kind ¶
func (t *TypeArrayShapeValue) Kind() TypeKind
func (*TypeArrayShapeValue) String ¶
func (t *TypeArrayShapeValue) String() string
type TypeBool ¶
type TypeBool struct {
Accepts BoolAccepts
}
type TypeCallable ¶
type TypeCallable struct { Parameters []*CallableParameter Return Type }
func (*TypeCallable) Kind ¶
func (t *TypeCallable) Kind() TypeKind
func (*TypeCallable) String ¶
func (t *TypeCallable) String() string
type TypeClassLike ¶
func (*TypeClassLike) Identifier ¶
func (t *TypeClassLike) Identifier() string
func (*TypeClassLike) Kind ¶
func (t *TypeClassLike) Kind() TypeKind
func (*TypeClassLike) Namespace ¶
func (t *TypeClassLike) Namespace() string
func (*TypeClassLike) String ¶
func (t *TypeClassLike) String() string
type TypeConditionalReturn ¶
type TypeConditionalReturn struct { Condition *ConditionalReturnCondition IfTrue Type IfFalse Type }
func (*TypeConditionalReturn) Kind ¶
func (t *TypeConditionalReturn) Kind() TypeKind
func (*TypeConditionalReturn) String ¶
func (t *TypeConditionalReturn) String() string
type TypeConstant ¶
type TypeConstant struct { Class *TypeClassLike Const string }
func (*TypeConstant) Kind ¶
func (t *TypeConstant) Kind() TypeKind
func (*TypeConstant) String ¶
func (t *TypeConstant) String() string
type TypeFloatLiteral ¶
type TypeFloatLiteral struct {
Value float64
}
func (*TypeFloatLiteral) Kind ¶
func (t *TypeFloatLiteral) Kind() TypeKind
func (*TypeFloatLiteral) String ¶
func (t *TypeFloatLiteral) String() string
type TypeGenericTemplate ¶
type TypeGenericTemplate struct { Name string Of *TypeClassLike }
NOTE: this only matches something like: T of \Exception, not T, that would be a TypeClassLike.
func (*TypeGenericTemplate) Kind ¶
func (t *TypeGenericTemplate) Kind() TypeKind
func (*TypeGenericTemplate) String ¶
func (t *TypeGenericTemplate) String() string
type TypeInt ¶
type TypeIntLiteral ¶
type TypeIntLiteral struct {
Value int
}
func (*TypeIntLiteral) Kind ¶
func (t *TypeIntLiteral) Kind() TypeKind
func (*TypeIntLiteral) String ¶
func (t *TypeIntLiteral) String() string
type TypeIntMask ¶
type TypeIntMask struct {
Values []int
}
func (*TypeIntMask) Kind ¶
func (t *TypeIntMask) Kind() TypeKind
func (*TypeIntMask) String ¶
func (t *TypeIntMask) String() string
type TypeIntMaskOf ¶
type TypeIntMaskOf struct {
Type Type
}
func (*TypeIntMaskOf) Kind ¶
func (t *TypeIntMaskOf) Kind() TypeKind
func (*TypeIntMaskOf) String ¶
func (t *TypeIntMaskOf) String() string
type TypeIntersection ¶
func (*TypeIntersection) Kind ¶
func (t *TypeIntersection) Kind() TypeKind
func (*TypeIntersection) String ¶
func (t *TypeIntersection) String() string
type TypeIterable ¶
type TypeIterable struct { // Is nil when it was created like this: 'iterable<x>' KeyType Type // Is nil when it was created like this: 'iterable' ItemType Type }
func (*TypeIterable) Kind ¶
func (t *TypeIterable) Kind() TypeKind
func (*TypeIterable) String ¶
func (t *TypeIterable) String() string
type TypeKeyOf ¶
type TypeKeyOf struct { Class *TypeClassLike Const string }
type TypeKind ¶
type TypeKind uint
const ( KindMixed TypeKind = iota KindUnknownType KindNull KindClassLike KindArray KindIterable KindCallale KindBool KindFloat KindInt KindString KindObject KindNever KindScalar KindVoid KindArrayKey KindResource KindPrecedence KindUnion KindIntersection KindKeyOf KindValueOf KindArrayShape KindArrayShapeValue KindStringLiteral KindFloatLiteral KindIntLiteral KindConstant KindIntMask KindIntMaskOf KindConditionalReturn KindGenericTemplate )
type TypeObject ¶
type TypeObject struct{}
func (*TypeObject) Kind ¶
func (t *TypeObject) Kind() TypeKind
func (*TypeObject) String ¶
func (t *TypeObject) String() string
type TypePrecedence ¶
type TypePrecedence struct {
Type Type
}
func (*TypePrecedence) Kind ¶
func (t *TypePrecedence) Kind() TypeKind
func (*TypePrecedence) String ¶
func (t *TypePrecedence) String() string
type TypeResource ¶
type TypeResource struct{}
func (*TypeResource) Kind ¶
func (t *TypeResource) Kind() TypeKind
func (*TypeResource) String ¶
func (t *TypeResource) String() string
type TypeScalar ¶
type TypeScalar struct{}
Scalar is an int, float, bool or string.
func (*TypeScalar) Kind ¶
func (t *TypeScalar) Kind() TypeKind
func (*TypeScalar) String ¶
func (t *TypeScalar) String() string
type TypeString ¶
type TypeString struct { Constraint StringConstraint // Can only be set when Constraint is ConstraintClass. GenericOver *TypeClassLike }
func (*TypeString) Kind ¶
func (t *TypeString) Kind() TypeKind
func (*TypeString) String ¶
func (t *TypeString) String() string
type TypeStringLiteral ¶
type TypeStringLiteral struct {
Value string
}
func (*TypeStringLiteral) Kind ¶
func (t *TypeStringLiteral) Kind() TypeKind
func (*TypeStringLiteral) String ¶
func (t *TypeStringLiteral) String() string
type TypeUnknown ¶
type TypeUnknown struct {
Value string
}
func (*TypeUnknown) Kind ¶
func (t *TypeUnknown) Kind() TypeKind
func (*TypeUnknown) String ¶
func (t *TypeUnknown) String() string
type TypeValueOf ¶
type TypeValueOf struct { Class *TypeClassLike // If IsEnum is true, Const is an empty string. Const string IsEnum bool }
func (*TypeValueOf) Kind ¶
func (t *TypeValueOf) Kind() TypeKind
func (*TypeValueOf) String ¶
func (t *TypeValueOf) String() string
Click to show internal directories.
Click to hide internal directories.