FuncCall.php 994 B

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