From f07ffa2d7673c0b76f8166b50a5fe099f50e8e83 Mon Sep 17 00:00:00 2001 From: Valithor Obsidion Date: Tue, 24 Dec 2024 17:02:06 -0500 Subject: [PATCH] Remove typing for filter method --- src/Discord/Helpers/CollectionTrait.php | 6 ++++-- src/Discord/Repository/AbstractRepositoryTrait.php | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Discord/Helpers/CollectionTrait.php b/src/Discord/Helpers/CollectionTrait.php index e5e9c32cc..3ca091a9c 100644 --- a/src/Discord/Helpers/CollectionTrait.php +++ b/src/Discord/Helpers/CollectionTrait.php @@ -251,9 +251,11 @@ public function has(...$keys): bool * * @param callable $callback * - * @return static + * @return CollectionInterface + * + * @todo This method will be typed to return a CollectionInterface in v11 */ - public function filter(callable $callback): static + public function filter(callable $callback) { $collection = new static([], $this->discrim, $this->class); diff --git a/src/Discord/Repository/AbstractRepositoryTrait.php b/src/Discord/Repository/AbstractRepositoryTrait.php index 015dfd6c4..d5521cc75 100644 --- a/src/Discord/Repository/AbstractRepositoryTrait.php +++ b/src/Discord/Repository/AbstractRepositoryTrait.php @@ -575,11 +575,11 @@ public function has(...$keys): bool * * @param callable $callback * - * @return Collection + * @return CollectionInterface * - * @todo This method will return a CollectionInterface in v11 + * @todo This method will be typed to return a CollectionInterface in v11 */ - public function filter(callable $callback): Collection + public function filter(callable $callback) { $collection = new Collection([], $this->discrim, $this->class);