phpdoctypes

package
v0.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Param

type Param struct {
	Optional bool
	Typ      types.Map
}

type ParamsMap

type ParamsMap map[string]Param

type ParseResult

type ParseResult struct {
	ReturnType  types.Map
	ParamTypes  ParamsMap
	Deprecation meta.DeprecationInfo
	Inherit     bool
	Internal    bool

	Shapes   types.ShapesMap
	Closures types.ClosureMap
}

func Parse

func Parse(doc phpdoc.Comment, actualParams []ir.Node, normalizer types.Normalizer) (result ParseResult)

type RealPHPDocTypes

type RealPHPDocTypes struct {
	Types    []types.Type
	Shapes   types.ShapesMap
	Closures types.ClosureMap
	Warning  string
}

func ToRealType

func ToRealType(classFQNProvider func(string) (string, bool), kphp bool, typ phpdoc.Type) *RealPHPDocTypes

ToRealType extracts types out of the PHPDoc type string.

No normalization is performed, but some PHPDoc-specific types are simplified to be compatible with our type system.

type TypeConverter

type TypeConverter struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL