Skip to content

Commit

Permalink
Add return type to SearchResult::getIterator()
Browse files Browse the repository at this point in the history
  • Loading branch information
babenkoivan committed Feb 2, 2023
1 parent 2240748 commit e4bf0e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Decorators/SearchResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Illuminate\Support\Collection as BaseCollection;
use Illuminate\Support\Traits\ForwardsCalls;
use IteratorAggregate;
use Traversable;

/**
* @mixin SearchResponse
Expand Down Expand Up @@ -67,9 +68,9 @@ public function highlights(): BaseCollection
}

/**
* @return ArrayIterator<int, Hit>
* @return ArrayIterator|Traversable
*/
public function getIterator()
public function getIterator(): Traversable
{
return $this->hits()->getIterator();
}
Expand Down

0 comments on commit e4bf0e5

Please sign in to comment.