public static function create(ExpressionNode $array, ExpressionNode $key) {
    $node = new static();
    /** @var Node $array */
    $node->addChild($array, 'array');
    $node->addChild(Token::openBracket());
    /** @var Node $key */
    $node->addChild($key, 'key');
    $node->addChild(Token::closeBracket());
    return $node;
  }
public static function create(ExpressionNode $array, ExpressionNode $key) {
    $node = new static();
    /** @var Node $array */
    $node->addChild($array, 'array');
    $node->addChild(Token::openBracket());
    /** @var Node $key */
    $node->addChild($key, 'key');
    $node->addChild(Token::closeBracket());
    return $node;
  }
public static function create ( ExpressionNode $ array , ExpressionNode $ key ) { $ node = new static ( ) ; /** @var Node $array */ $ node -> addChild ( $ array , 'array' ) ; $ node -> addChild ( Token :: openBracket ( ) ) ; /** @var Node $key */ $ node -> addChild ( $ key , 'key' ) ; $ node -> addChild ( Token :: closeBracket ( ) ) ; return $ node ; }
Creates a new array lookup.

@param \Pharborist\ExpressionNode $array
The expression representing the array (usually a VariableNode).
@param \Pharborist\ExpressionNode $key
The expression representing the key (usually a string).

@return static
Creates a new array lookup .