N°4517 - PHP 8.1: Fix return types to match ArrayAccess interface

This commit is contained in:
Molkobain
2022-05-16 09:08:12 +02:00
committed by acognet
parent 7ee5184afc
commit ff12dd99b5
2 changed files with 13 additions and 50 deletions

View File

@@ -33,17 +33,17 @@ class OQLParser_yyToken implements ArrayAccess
return $this->string;
}
function offsetExists($offset)
function offsetExists($offset): bool
{
return isset($this->metadata[$offset]);
}
function offsetGet($offset)
function offsetGet($offset): mixed
{
return $this->metadata[$offset];
}
function offsetSet($offset, $value)
function offsetSet($offset, $value): void
{
if ($offset === null) {
if (isset($value[0])) {
@@ -66,7 +66,7 @@ class OQLParser_yyToken implements ArrayAccess
}
}
function offsetUnset($offset)
function offsetUnset($offset): void
{
unset($this->metadata[$offset]);
}