|
| 1 | +--- /dev/null |
| 2 | ++++ ../src/Stringy.php |
| 3 | +@@ -267,6 +267,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess |
| 4 | + * |
| 5 | + * @return int The number of characters in the string, given the encoding |
| 6 | + */ |
| 7 | ++ #[\ReturnTypeWillChange] |
| 8 | + public function count() |
| 9 | + { |
| 10 | + return $this->length(); |
| 11 | +@@ -450,6 +451,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess |
| 12 | + * |
| 13 | + * @return \ArrayIterator An iterator for the characters in the string |
| 14 | + */ |
| 15 | ++ #[\ReturnTypeWillChange] |
| 16 | + public function getIterator() |
| 17 | + { |
| 18 | + return new ArrayIterator($this->chars()); |
| 19 | +@@ -847,6 +849,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess |
| 20 | + * @param mixed $offset The index to check |
| 21 | + * @return boolean Whether or not the index exists |
| 22 | + */ |
| 23 | ++ #[\ReturnTypeWillChange] |
| 24 | + public function offsetExists($offset) |
| 25 | + { |
| 26 | + $length = $this->length(); |
| 27 | +@@ -870,6 +873,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess |
| 28 | + * @throws \OutOfBoundsException If the positive or negative offset does |
| 29 | + * not exist |
| 30 | + */ |
| 31 | ++ #[\ReturnTypeWillChange] |
| 32 | + public function offsetGet($offset) |
| 33 | + { |
| 34 | + $offset = (int) $offset; |
| 35 | +@@ -890,6 +894,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess |
| 36 | + * @param mixed $value Value to set |
| 37 | + * @throws \Exception When called |
| 38 | + */ |
| 39 | ++ #[\ReturnTypeWillChange] |
| 40 | + public function offsetSet($offset, $value) |
| 41 | + { |
| 42 | + // Stringy is immutable, cannot directly set char |
| 43 | +@@ -903,6 +908,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess |
| 44 | + * @param mixed $offset The index of the character |
| 45 | + * @throws \Exception When called |
| 46 | + */ |
| 47 | ++ #[\ReturnTypeWillChange] |
| 48 | + public function offsetUnset($offset) |
0 commit comments