File: /var/www/ojs/lib/pkp/lib/stringy-php8.1.diff
diff -u -r -N src/Stringy.php src/Stringy.php
--- src/Stringy.php 2017-06-11 18:10:27.000000000 -0700
+++ src/Stringy.php 2022-10-18 08:23:36.106830223 -0700
@@ -267,6 +267,7 @@
*
* @return int The number of characters in the string, given the encoding
*/
+ #[\ReturnTypeWillChange]
public function count()
{
return $this->length();
@@ -450,6 +451,7 @@
*
* @return \ArrayIterator An iterator for the characters in the string
*/
+ #[\ReturnTypeWillChange]
public function getIterator()
{
return new ArrayIterator($this->chars());
@@ -847,6 +849,7 @@
* @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 @@
* @throws \OutOfBoundsException If the positive or negative offset does
* not exist
*/
+ #[\ReturnTypeWillChange]
public function offsetGet($offset)
{
$offset = (int) $offset;
@@ -890,6 +894,7 @@
* @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 @@
* @param mixed $offset The index of the character
* @throws \Exception When called
*/
+ #[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
// Don't allow directly modifying the string