Skip to content

Commit

Permalink
Update static return types for Collections
Browse files Browse the repository at this point in the history
  • Loading branch information
valzargaming committed Jan 16, 2025
1 parent e52dddc commit b14a071
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Discord/Helpers/CollectionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,9 @@ public function clear(): void
* @param null|int $length
* @param bool $preserve_keys
*
* @return static
* @return CollectionInterface
*/
public function slice(int $offset, ?int $length, bool $preserve_keys = false): static
public function slice(int $offset, ?int $length, bool $preserve_keys = false)
{
$items = $this->items;

Expand All @@ -318,9 +318,9 @@ public function slice(int $offset, ?int $length, bool $preserve_keys = false): s
*
* @param callable|int|null $callback
*
* @return static
* @return CollectionInterface
*/
public function sort(callable|int|null $callback): static
public function sort(callable|int|null $callback)
{
$items = $this->items;

Expand All @@ -336,9 +336,9 @@ public function sort(callable|int|null $callback): static
*
* @param callable $callback
*
* @return static
* @return CollectionInterface
*/
public function map(callable $callback): static
public function map(callable $callback)
{
$keys = array_keys($this->items);
$values = array_map($callback, array_values($this->items));
Expand Down

0 comments on commit b14a071

Please sign in to comment.