mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-08 15:14:27 +02:00
Add \ReturnTypeWillChange attribute to methods inherited from native interfaces
- Part of https://github.com/friendica/friendica/issues/12011#issuecomment-1321796513
This commit is contained in:
parent
01558d6dda
commit
6b555f64da
3 changed files with 11 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue