Add \ReturnTypeWillChange attribute to methods inherited from native interfaces

- Part of https://github.com/friendica/friendica/issues/12011#issuecomment-1321796513
pull/12249/head
Hypolite Petovan 2022-11-23 13:36:49 -05:00
rodzic 01558d6dda
commit 6b555f64da
3 zmienionych plików z 11 dodań i 6 usunięć

Wyświetl plik

@ -48,25 +48,27 @@ class BaseCollection extends \ArrayIterator
/**
* @inheritDoc
*/
public function offsetSet($offset, $value)
#[\ReturnTypeWillChange]
public function offsetSet($key, $value): void
{
if (is_null($offset)) {
if (is_null($key)) {
$this->totalCount++;
}
parent::offsetSet($offset, $value);
parent::offsetSet($key, $value);
}
/**
* @inheritDoc
*/
public function offsetUnset($offset)
#[\ReturnTypeWillChange]
public function offsetUnset($key): void
{
if ($this->offsetExists($offset)) {
if ($this->offsetExists($key)) {
$this->totalCount--;
}
parent::offsetUnset($offset);
parent::offsetUnset($key);
}
/**

Wyświetl plik

@ -57,6 +57,7 @@ class Database extends AbstractSessionHandler
return true;
}
#[\ReturnTypeWillChange]
public function read($id)
{
if (empty($id)) {
@ -136,6 +137,7 @@ class Database extends AbstractSessionHandler
}
}
#[\ReturnTypeWillChange]
public function gc($max_lifetime): bool
{
try {

Wyświetl plik

@ -200,6 +200,7 @@ class Email implements IEmail
/**
* @inheritDoc
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->toArray();