X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FBaseCollection.php;h=1aa13ae9611403df74bd3078f4b83bcd2989bfa2;hb=6668591afecb314a59105b06a1712643f1616636;hp=5b35653fdd661c86a5d79d16ee3585429c7a81d9;hpb=2ec3a97393959e42d450e074271d2d622d25701f;p=friendica.git diff --git a/src/BaseCollection.php b/src/BaseCollection.php index 5b35653fdd..1aa13ae961 100644 --- a/src/BaseCollection.php +++ b/src/BaseCollection.php @@ -1,6 +1,6 @@ getArrayCopy(), $callback, $flag)); } + + /** + * Reverse the orders of the elements in the collection + * + * @return $this + */ + public function reverse(): BaseCollection + { + return new static(array_reverse($this->getArrayCopy()), $this->getTotalCount()); + } }