-
-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Php 8.1 Dep] Update stringy vendor patches to update with #[\ReturnT…
…ypeWillChange] (#1370) * update stringy with vendor-patches * update stringy with vendor-patches
- Loading branch information
1 parent
922e91d
commit 49d6cc0
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- /dev/null | ||
+++ ../src/Stringy.php | ||
@@ -267,6 +267,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess | ||
* | ||
* @return int The number of characters in the string, given the encoding | ||
*/ | ||
+ #[\ReturnTypeWillChange] | ||
public function count() | ||
{ | ||
return $this->length(); | ||
@@ -450,6 +451,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess | ||
* | ||
* @return \ArrayIterator An iterator for the characters in the string | ||
*/ | ||
+ #[\ReturnTypeWillChange] | ||
public function getIterator() | ||
{ | ||
return new ArrayIterator($this->chars()); | ||
@@ -847,6 +849,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess | ||
* @param mixed $offset The index to check | ||
* @return boolean Whether or not the index exists | ||
*/ | ||
+ #[\ReturnTypeWillChange] | ||
public function offsetExists($offset) | ||
{ | ||
$length = $this->length(); | ||
@@ -870,6 +873,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess | ||
* @throws \OutOfBoundsException If the positive or negative offset does | ||
* not exist | ||
*/ | ||
+ #[\ReturnTypeWillChange] | ||
public function offsetGet($offset) | ||
{ | ||
$offset = (int) $offset; | ||
@@ -890,6 +894,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess | ||
* @param mixed $value Value to set | ||
* @throws \Exception When called | ||
*/ | ||
+ #[\ReturnTypeWillChange] | ||
public function offsetSet($offset, $value) | ||
{ | ||
// Stringy is immutable, cannot directly set char | ||
@@ -903,6 +908,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess | ||
* @param mixed $offset The index of the character | ||
* @throws \Exception When called | ||
*/ | ||
+ #[\ReturnTypeWillChange] | ||
public function offsetUnset($offset) |