mirror of
https://github.com/friendica/friendica
synced 2025-01-03 19:22:18 +00:00
Fix wrong use of static
This commit is contained in:
parent
4a9c7d2f30
commit
57c188d01d
1 changed files with 5 additions and 5 deletions
|
@ -89,7 +89,7 @@ class BaseCollection extends \ArrayIterator
|
|||
*/
|
||||
public function map(callable $callback): BaseCollection
|
||||
{
|
||||
return new static(array_map($callback, $this->getArrayCopy()), $this->getTotalCount());
|
||||
return new self(array_map($callback, $this->getArrayCopy()), $this->getTotalCount());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -102,7 +102,7 @@ class BaseCollection extends \ArrayIterator
|
|||
*/
|
||||
public function filter(callable $callback = null, int $flag = 0): BaseCollection
|
||||
{
|
||||
return new static(array_filter($this->getArrayCopy(), $callback, $flag));
|
||||
return new self(array_filter($this->getArrayCopy(), $callback, $flag));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -112,14 +112,14 @@ class BaseCollection extends \ArrayIterator
|
|||
*/
|
||||
public function reverse(): BaseCollection
|
||||
{
|
||||
return new static(array_reverse($this->getArrayCopy()), $this->getTotalCount());
|
||||
return new self(array_reverse($this->getArrayCopy()), $this->getTotalCount());
|
||||
}
|
||||
|
||||
/**
|
||||
* Split the collection in smaller collections no bigger than the provided length
|
||||
*
|
||||
* @param int $length
|
||||
* @return static[]
|
||||
* @return self[]
|
||||
*/
|
||||
public function chunk(int $length): array
|
||||
{
|
||||
|
@ -128,7 +128,7 @@ class BaseCollection extends \ArrayIterator
|
|||
}
|
||||
|
||||
return array_map(function ($array) {
|
||||
return new static($array);
|
||||
return new self($array);
|
||||
}, array_chunk($this->getArrayCopy(), $length));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue