spl_fixedarray.stub.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /** @generate-class-entries */
  3. class SplFixedArray implements IteratorAggregate, ArrayAccess, Countable, JsonSerializable
  4. {
  5. public function __construct(int $size = 0) {}
  6. /** @tentative-return-type */
  7. public function __wakeup(): void {}
  8. /** @tentative-return-type */
  9. public function count(): int {}
  10. /** @tentative-return-type */
  11. public function toArray(): array {}
  12. /** @tentative-return-type */
  13. public static function fromArray(array $array, bool $preserveKeys = true): SplFixedArray {}
  14. /** @tentative-return-type */
  15. public function getSize(): int {}
  16. /** @return bool */
  17. public function setSize(int $size) {} // TODO make return type void
  18. /**
  19. * @param int $index
  20. * @tentative-return-type
  21. */
  22. public function offsetExists($index): bool {}
  23. /**
  24. * @param int $index
  25. * @tentative-return-type
  26. */
  27. public function offsetGet($index): mixed {}
  28. /**
  29. * @param int $index
  30. * @tentative-return-type
  31. */
  32. public function offsetSet($index, mixed $value): void {}
  33. /**
  34. * @param int $index
  35. * @tentative-return-type
  36. */
  37. public function offsetUnset($index): void {}
  38. public function getIterator(): Iterator {}
  39. public function jsonSerialize(): array {}
  40. }