FunctionLike.php 731 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php declare(strict_types=1);
  2. namespace PhpParser\Node;
  3. use PhpParser\Node;
  4. interface FunctionLike extends Node {
  5. /**
  6. * Whether to return by reference
  7. */
  8. public function returnsByRef(): bool;
  9. /**
  10. * List of parameters
  11. *
  12. * @return Param[]
  13. */
  14. public function getParams(): array;
  15. /**
  16. * Get the declared return type or null
  17. *
  18. * @return null|Identifier|Name|ComplexType
  19. */
  20. public function getReturnType();
  21. /**
  22. * The function body
  23. *
  24. * @return Stmt[]|null
  25. */
  26. public function getStmts(): ?array;
  27. /**
  28. * Get PHP attribute groups.
  29. *
  30. * @return AttributeGroup[]
  31. */
  32. public function getAttrGroups(): array;
  33. }