Skip to content

Commit 03d7ff0

Browse files
committed
refactor: fit php81 features
Signed-off-by: Jack Cherng <jfcherng@gmail.com>
1 parent 0f81ed3 commit 03d7ff0

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

src/MbString.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* @author Jack Cherng <jfcherng@gmail.com>
1717
*/
18-
class MbString extends \ArrayObject
18+
class MbString extends \ArrayObject implements \Stringable
1919
{
2020
/**
2121
* UTF-32 string without endian bytes.
@@ -291,26 +291,22 @@ public function substr_replace_i(string $replacement, int $start = 0, ?int $leng
291291
// ArrayObject //
292292
/////////////////
293293

294-
#[\ReturnTypeWillChange]
295-
public function offsetSet($idx, $char): void
294+
public function offsetSet(mixed $idx, mixed $char): void
296295
{
297296
$this->setAt($idx, $char);
298297
}
299298

300-
#[\ReturnTypeWillChange]
301-
public function offsetGet($idx): string
299+
public function offsetGet(mixed $idx): string
302300
{
303301
return $this->getAt($idx);
304302
}
305303

306-
#[\ReturnTypeWillChange]
307-
public function offsetExists($idx): bool
304+
public function offsetExists(mixed $idx): bool
308305
{
309306
return \is_int($idx) ? $this->strlen() > $idx : false;
310307
}
311308

312-
#[\ReturnTypeWillChange]
313-
public function append($str): void
309+
public function append(mixed $str): void
314310
{
315311
$this->str .= $this->inputConv($str);
316312
}

0 commit comments

Comments
 (0)