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);