Метод | Описание | |
---|---|---|
__construct ( |
||
visit ( ast\Node $node ) : |
Default visitor for node kinds that do not have an overriding method | |
visitArray ( ast\Node $node ) : |
This happens for code like the following list($a) = [1, 2, 3]; | |
visitCall ( ast\Node $node ) : |
The following is an example of how this'd happen. | |
visitDim ( ast\Node $node ) : |
||
visitList ( ast\Node $node ) : |
||
visitMethodCall ( ast\Node $node ) : |
The following is an example of how this'd happen. | |
visitProp ( ast\Node $node ) : |
||
visitStaticProp ( ast\Node $node ) : |
||
visitVar ( ast\Node $node ) : |
Метод | Описание | |
---|---|---|
analyzeSuperglobalDim ( ast\Node $node, string $variable_name ) : |
Analyze an assignment where $variable_name is a superglobal, and return the new context. |
public __construct ( |
||
$code_base | The global code base we're operating within | |
$context | The context of the parser at the node for which we'd like to determine a type | |
$assignment_node | ast\Node | The AST node containing the assignment |
$right_type | The type of the element on the right side of the assignment | |
$is_dim_assignment | boolean | True if this assignment is to an array parameter such as in `$foo[3] = 42`. We need to know this in order to decide if we're replacing the union type or if we're adding a type to the union type. |
public visit ( ast\Node $node ) : |
||
$node | ast\Node | A node to parse |
Результат | A new or an unchanged context resulting from parsing the node |
public visitArray ( ast\Node $node ) : |
||
$node | ast\Node | A node to parse |
Результат | A new or an unchanged context resulting from parsing the node |
public visitCall ( ast\Node $node ) : |
||
$node | ast\Node | A node to parse |
Результат | A new or an unchanged context resulting from parsing the node |
public visitDim ( ast\Node $node ) : |
||
$node | ast\Node | A node to parse |
Результат | A new or an unchanged context resulting from parsing the node |
public visitList ( ast\Node $node ) : |
||
$node | ast\Node | A node to parse |
Результат | A new or an unchanged context resulting from parsing the node |
public visitMethodCall ( ast\Node $node ) : |
||
$node | ast\Node | A node to parse |
Результат | A new or an unchanged context resulting from parsing the node |
public visitProp ( ast\Node $node ) : |
||
$node | ast\Node | A node to parse |
Результат | A new or an unchanged context resulting from parsing the node |
public visitStaticProp ( ast\Node $node ) : |
||
$node | ast\Node | A node to parse |
Результат | A new or an unchanged context resulting from parsing the node |
public visitVar ( ast\Node $node ) : |
||
$node | ast\Node | A node to parse |
Результат | A new or an unchanged context resulting from parsing the node |