Skip to content

Commit

Permalink
Merge pull request #30 from designmynight/fix-return-type
Browse files Browse the repository at this point in the history
fix: return type may be a Generator
  • Loading branch information
Will Taylor-Jackson authored Feb 2, 2018
2 parents 5a1f588 + 184cd04 commit 00ff1b0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/DesignMyNight/Elasticsearch/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,12 @@ public function get($columns = ['*'])
return $this->shouldUseScroll() ? $results : collect($results);
}

protected function getResultsOnce(): array
/**
* Get results without re-fetching for subsequent calls.
*
* @return array|Generator
*/
protected function getResultsOnce()
{
if ($this->results === null) {
$this->results = $this->processor->processSelect($this, $this->runSelect());
Expand Down

0 comments on commit 00ff1b0

Please sign in to comment.