PHP Class Phan\Debug

Show file Open project: etsy/phan Class Usage Examples

Public Methods

Method Description
astFlagDescription ( integer $flag ) : string
backtrace ( integer $levels ) : string
mark ( ) Print a lil' something to the console to see if a thing is called
nodeName ( $node ) : string
nodeToString ( string | ast\Node | null $node, $name = null, integer $indent ) : string
print ( string $message, integer $indent ) Print a thing with the given indent level
printNode ( string | ast\Node | null $node ) : null
printNodeName ( $node, $indent ) Print the name of a node to the terminal

Method Details

astFlagDescription() public static method

public static astFlagDescription ( integer $flag ) : string
$flag integer
return string Get a string representation of AST node flags such as 'ASSIGN_DIV|TYPE_ARRAY'

backtrace() public static method

public static backtrace ( integer $levels ) : string
$levels integer
return string Pretty-printer for debug_backtrace

mark() public static method

Print a lil' something to the console to see if a thing is called
public static mark ( )

nodeName() public static method

public static nodeName ( $node ) : string
return string The name of the node

nodeToString() public static method

public static nodeToString ( string | ast\Node | null $node, $name = null, integer $indent ) : string
$node string | ast\Node | null An AST node
$indent integer The indentation level for the string
return string A string representation of an AST node

print() public static method

Print a thing with the given indent level
public static print ( string $message, integer $indent )
$message string
$indent integer

printNode() public static method

public static printNode ( string | ast\Node | null $node ) : null
$node string | ast\Node | null An AST node Print an AST node
return null

printNodeName() public static method

Print the name of a node to the terminal
public static printNodeName ( $node, $indent )