Documentation ¶
Index ¶
- func BinaryOpString(n ir.Node) string
- func FindPHPFiles(root string) ([]string, error)
- func FindVarNode(n ir.Node) ir.Node
- func InCoalesceOrIsset(path irutil.NodePath) bool
- func InVendor(path string) bool
- func IsCapitalized(s string) bool
- func IsPHPKeyword(word string) bool
- func IsQuote(r rune) bool
- func IsSpecialClassName(n ir.Node) bool
- func NameNodeEquals(n ir.Node, s string) bool
- func NameNodeToString(n ir.Node) string
- func VarToString(v ir.Node) string
- type CommentParser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinaryOpString ¶ added in v0.5.0
func FindPHPFiles ¶ added in v0.5.2
FindPHPFiles traverses the file system starting with the passed folder and finding all files with a .php extension.
func FindVarNode ¶ added in v0.5.0
FindVarNode returns expression variable node root. If expression doesn't start from a variable, returns nil.
func InCoalesceOrIsset ¶ added in v0.5.0
func IsCapitalized ¶ added in v0.5.0
IsCapitalized reports whether s starts with an upper case letter.
func IsPHPKeyword ¶ added in v0.5.0
func IsSpecialClassName ¶
IsSpecialClassName checks if the passed node is a special class name.
func NameNodeEquals ¶
NameNodeEquals checks whether n node name value is identical to s.
func NameNodeToString ¶
NameNodeToString converts nodes of *name.Name, and *node.Identifier to string. This function is a helper function to aid printing function names, not for actual code analysis.
func VarToString ¶ added in v0.5.0
Types ¶
type CommentParser ¶ added in v0.5.2
type CommentParser struct {
// contains filtered or unexported fields
}
func NewCommentParser ¶ added in v0.5.2
func NewCommentParser(comment string, line int) *CommentParser
func (*CommentParser) ParseExpectation ¶ added in v0.5.2
func (c *CommentParser) ParseExpectation() (wants []string, err error)
ParseExpectation parses a string describing expected errors like
want `error description 1` [and` error description 2` and `error 3` ...]