SwowStub.php 676 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace Swow;
  3. class Coroutine
  4. {
  5. public function resume(mixed ...$args): mixed
  6. {
  7. // Stub for PHPStorm
  8. return null;
  9. }
  10. public static function getCurrent(): static
  11. {
  12. // Stub for PHPStorm
  13. return new Coroutine;
  14. }
  15. public static function yield (mixed ...$args) : mixed
  16. {
  17. // Stub for PHPStorm
  18. return null;
  19. }
  20. public function getId() : int
  21. {
  22. // Stub for PHPStorm
  23. return 0;
  24. }
  25. public static function run(callable $callable , mixed ... $args): static
  26. {
  27. // Stub for PHPStorm
  28. return new Coroutine;
  29. }
  30. }