Phan\Analysis\AssignmentVisitor::__construct PHP Method

__construct() public method

public __construct ( CodeBase $code_base, Context $context, ast\Node $assignment_node, UnionType $right_type, boolean $is_dim_assignment = false )
$code_base Phan\CodeBase The global code base we're operating within
$context Phan\Language\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 Phan\Language\UnionType 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 function __construct(CodeBase $code_base, Context $context, Node $assignment_node, UnionType $right_type, bool $is_dim_assignment = false)
    {
        parent::__construct($code_base, $context);
        $this->assignment_node = $assignment_node;
        $this->right_type = $right_type;
        $this->is_dim_assignment = $is_dim_assignment;
    }