protected function getResultArray(SearchRequest $searchRequest, $suggestions, $documents, $didASecondSearch) : array
    {
        return ['suggestions' => $suggestions, 'suggestion' => $searchRequest->getRawUserQuery(), 'documents' => $documents, 'didSecondSearch' => $didASecondSearch];
    }
protected function getResultArray(SearchRequest $searchRequest, $suggestions, $documents, $didASecondSearch) : array
    {
        return ['suggestions' => $suggestions, 'suggestion' => $searchRequest->getRawUserQuery(), 'documents' => $documents, 'didSecondSearch' => $didASecondSearch];
    }
protected function getResultArray ( SearchRequest $ searchRequest , $ suggestions , $ documents , $ didASecondSearch ) : array { return [ 'suggestions' => $ suggestions , 'suggestion' => $ searchRequest -> getRawUserQuery ( ) , 'documents' => $ documents , 'didSecondSearch' => $ didASecondSearch ] ; }
Creates an result array with the required fields.

@param SearchRequest $searchRequest
@param array $suggestions
@param array $documents
@param boolean $didASecondSearch
@return array
Creates an result array with the required fields .