lib/Elastica/ResultSet/DefaultBuilder.php
private function buildResults(Response $response): array
    {
        $data = $response->getData();
        $results = [];

        if (!isset($data['hits']['hits'])) {
            return $results;
        }

        foreach ($data['hits']['hits'] as $hit) {
            $results[] = new Result($hit);
        }

        return $results;
    }
private function buildResults(Response $response): array
    {
        $data = $response->getData();
        $results = [];

        if (!isset($data['hits']['hits'])) {
            return $results;
        }

        foreach ($data['hits']['hits'] as $hit) {
            $results[] = new Result($hit);
        }

        return $results;
    }
private function buildResults ( Response $ response ) : array { $ data = $ response -> getData ( ) ; $ results = [ ] ; if ( ! isset ( $ data [ 'hits' ] [ 'hits' ] ) ) { return $ results ; } foreach ( $ data [ 'hits' ] [ 'hits' ] as $ hit ) { $ results [ ] = new Result ( $ hit ) ; } return $ results ; }
Builds individual result objects.

@param Response $response

@return Result[]
Builds individual result objects .