PHP Class DuplicateArrayKeyVisitor

When __invoke on this class is called with a node, a method will be dispatched based on the kind of the given node. Visitors such as this are useful for defining lots of different checks on a node based on its kind.
Inheritance: extends Phan\AST\AnalysisVisitor
显示文件 Open project: etsy/phan

Public Methods

Method Description
__construct ( CodeBase $code_base, Context $context, Plugin $plugin )
visit ( ast\Node $node ) : void Default visitor that does nothing
visitArray ( ast\Node $node ) : void

Private Methods

Method Description
normalizeKey ( integer | string | float $key ) : string Converts a key to the value it would be if used as an array key.

Method Details

__construct() public method

public __construct ( CodeBase $code_base, Context $context, Plugin $plugin )
$code_base Phan\CodeBase
$context Phan\Language\Context
$plugin Phan\Plugin

visit() public method

Default visitor that does nothing
public visit ( ast\Node $node ) : void
$node ast\Node A node to analyze
return void

visitArray() public method

public visitArray ( ast\Node $node ) : void
$node ast\Node A node to analyze
return void