Documentation ¶
Index ¶
- Variables
- func All(version *phpversion.PHPVersion, logger Logger) func() []ast.Visitor
- type AtSinceAtRemoved
- type ElementAvailableAttribute
- func (e *ElementAvailableAttribute) Root(n *ast.Root)
- func (e *ElementAvailableAttribute) StmtClass(n *ast.StmtClass)
- func (e *ElementAvailableAttribute) StmtInterface(n *ast.StmtInterface)
- func (e *ElementAvailableAttribute) StmtNamespace(n *ast.StmtNamespace)
- func (e *ElementAvailableAttribute) StmtTrait(n *ast.StmtTrait)
- func (e *ElementAvailableAttribute) StmtUse(n *ast.StmtUseList)
- func (e *ElementAvailableAttribute) StmtUseDeclaration(n *ast.StmtUse)
- type LanguageLevelTypeAware
- func (e *LanguageLevelTypeAware) Root(n *ast.Root)
- func (e *LanguageLevelTypeAware) StmtClass(n *ast.StmtClass)
- func (e *LanguageLevelTypeAware) StmtClassMethod(n *ast.StmtClassMethod)
- func (e *LanguageLevelTypeAware) StmtFunction(n *ast.StmtFunction)
- func (e *LanguageLevelTypeAware) StmtInterface(n *ast.StmtInterface)
- func (e *LanguageLevelTypeAware) StmtNamespace(n *ast.StmtNamespace)
- func (e *LanguageLevelTypeAware) StmtPropertyList(n *ast.StmtPropertyList)
- func (e *LanguageLevelTypeAware) StmtTrait(n *ast.StmtTrait)
- func (e *LanguageLevelTypeAware) StmtUse(n *ast.StmtUseList)
- func (e *LanguageLevelTypeAware) StmtUseDeclaration(n *ast.StmtUse)
- type Logger
- type Walker
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Fastest based on benchmarking. MaxConcurrency = runtime.NumCPU() * 2 NonStubs = map[string]struct{}{ filepath.Join(string(os.PathSeparator), ".github"): {}, filepath.Join(string(os.PathSeparator), ".idea"): {}, filepath.Join(string(os.PathSeparator), "FFI", ".phpstorm.meta.php"): {}, filepath.Join(string(os.PathSeparator), "meta"): {}, filepath.Join(string(os.PathSeparator), "Reflection", ".phpstorm.meta.php"): {}, filepath.Join(string(os.PathSeparator), "tests"): {}, filepath.Join(string(os.PathSeparator), ".php-cs-fixer.php"): {}, filepath.Join(string(os.PathSeparator), "PhpStormStubsMap.php"): {}, filepath.Join(string(os.PathSeparator), ".phpstorm.meta.php"): {}, filepath.Join(string(os.PathSeparator), "relay", "KeyType.php"): {}, } )
Functions ¶
func All ¶
func All(version *phpversion.PHPVersion, logger Logger) func() []ast.Visitor
logger is allowed to be nil.
Types ¶
type AtSinceAtRemoved ¶
AtSinceAtRemoved removes nodes that are @since > or @removed <= the given version in the PHP core stubs.
func NewAtSinceAtRemoved ¶
func NewAtSinceAtRemoved(version *phpversion.PHPVersion, logger Logger) *AtSinceAtRemoved
func (*AtSinceAtRemoved) Root ¶
func (r *AtSinceAtRemoved) Root(n *ast.Root)
func (*AtSinceAtRemoved) StmtClass ¶
func (r *AtSinceAtRemoved) StmtClass(n *ast.StmtClass)
func (*AtSinceAtRemoved) StmtInterface ¶
func (r *AtSinceAtRemoved) StmtInterface(n *ast.StmtInterface)
func (*AtSinceAtRemoved) StmtNamespace ¶
func (r *AtSinceAtRemoved) StmtNamespace(n *ast.StmtNamespace)
func (*AtSinceAtRemoved) StmtTrait ¶
func (r *AtSinceAtRemoved) StmtTrait(n *ast.StmtTrait)
type ElementAvailableAttribute ¶
ElementAvailableAttribute removes nodes with the PhpStormStubsElementAvailable attribute that does not match the given version.
func NewElementAvailableAttribute ¶
func NewElementAvailableAttribute( version *phpversion.PHPVersion, logger Logger, ) *ElementAvailableAttribute
func (*ElementAvailableAttribute) Root ¶
func (e *ElementAvailableAttribute) Root(n *ast.Root)
func (*ElementAvailableAttribute) StmtClass ¶
func (e *ElementAvailableAttribute) StmtClass(n *ast.StmtClass)
func (*ElementAvailableAttribute) StmtInterface ¶
func (e *ElementAvailableAttribute) StmtInterface(n *ast.StmtInterface)
func (*ElementAvailableAttribute) StmtNamespace ¶
func (e *ElementAvailableAttribute) StmtNamespace(n *ast.StmtNamespace)
func (*ElementAvailableAttribute) StmtTrait ¶
func (e *ElementAvailableAttribute) StmtTrait(n *ast.StmtTrait)
func (*ElementAvailableAttribute) StmtUse ¶
func (e *ElementAvailableAttribute) StmtUse(n *ast.StmtUseList)
func (*ElementAvailableAttribute) StmtUseDeclaration ¶
func (e *ElementAvailableAttribute) StmtUseDeclaration(n *ast.StmtUse)
type LanguageLevelTypeAware ¶
LanguageLevelTypeAware applies the types in the LanguageLevelTypeAware args.
func NewLanguageLevelTypeAware ¶
func NewLanguageLevelTypeAware( version *phpversion.PHPVersion, logger Logger, ) *LanguageLevelTypeAware
func (*LanguageLevelTypeAware) Root ¶
func (e *LanguageLevelTypeAware) Root(n *ast.Root)
func (*LanguageLevelTypeAware) StmtClass ¶
func (e *LanguageLevelTypeAware) StmtClass(n *ast.StmtClass)
func (*LanguageLevelTypeAware) StmtClassMethod ¶
func (e *LanguageLevelTypeAware) StmtClassMethod(n *ast.StmtClassMethod)
func (*LanguageLevelTypeAware) StmtFunction ¶
func (e *LanguageLevelTypeAware) StmtFunction(n *ast.StmtFunction)
func (*LanguageLevelTypeAware) StmtInterface ¶
func (e *LanguageLevelTypeAware) StmtInterface(n *ast.StmtInterface)
func (*LanguageLevelTypeAware) StmtNamespace ¶
func (e *LanguageLevelTypeAware) StmtNamespace(n *ast.StmtNamespace)
func (*LanguageLevelTypeAware) StmtPropertyList ¶
func (e *LanguageLevelTypeAware) StmtPropertyList(n *ast.StmtPropertyList)
func (*LanguageLevelTypeAware) StmtTrait ¶
func (e *LanguageLevelTypeAware) StmtTrait(n *ast.StmtTrait)
func (*LanguageLevelTypeAware) StmtUse ¶
func (e *LanguageLevelTypeAware) StmtUse(n *ast.StmtUseList)
func (*LanguageLevelTypeAware) StmtUseDeclaration ¶
func (e *LanguageLevelTypeAware) StmtUseDeclaration(n *ast.StmtUse)
type Walker ¶
type Walker struct { Transformers *sync.Pool Logger Logger Version *phpversion.PHPVersion Progress *atomic.Uint32 StubsFS fs.FS StubsDir string OutDir string }
func NewWalker ¶
func NewWalker( logger Logger, stubsDir string, outDir string, version *phpversion.PHPVersion, transformers func() []ast.Visitor, ) *Walker
func (*Walker) TransformFile ¶
Click to show internal directories.
Click to hide internal directories.