FuncCall.php 854 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php declare(strict_types=1);
  2. namespace PhpParser\Node\Expr;
  3. use PhpParser\Node;
  4. use PhpParser\Node\Expr;
  5. class FuncCall extends Expr
  6. {
  7. /** @var Node\Name|Expr Function name */
  8. public $name;
  9. /** @var Node\Arg[] Arguments */
  10. public $args;
  11. /**
  12. * Constructs a function call node.
  13. *
  14. * @param Node\Name|Expr $name Function name
  15. * @param Node\Arg[] $args Arguments
  16. * @param array $attributes Additional attributes
  17. */
  18. public function __construct($name, array $args = [], array $attributes = []) {
  19. parent::__construct($attributes);
  20. $this->name = $name;
  21. $this->args = $args;
  22. }
  23. public function getSubNodeNames() : array {
  24. return ['name', 'args'];
  25. }
  26. public function getType() : string {
  27. return 'Expr_FuncCall';
  28. }
  29. }