From c5ba3e12722da7c42e5061fe416b1dc624a9cd50 Mon Sep 17 00:00:00 2001
From: David Maus <dmaus@dmaus.name>
Date: Mon, 25 Nov 2019 18:51:08 +0100
Subject: [PATCH] Fix types

---
 src/HAB/Solr/Response/Json/RecordCollection.php | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/HAB/Solr/Response/Json/RecordCollection.php b/src/HAB/Solr/Response/Json/RecordCollection.php
index 2b89b20..7ca7cff 100644
--- a/src/HAB/Solr/Response/Json/RecordCollection.php
+++ b/src/HAB/Solr/Response/Json/RecordCollection.php
@@ -114,7 +114,7 @@ class RecordCollection implements Iterator
      */
     public function __construct(array $response)
     {
-        $this->response = array_replace_recursive(static::$template, $response);
+        $this->response = (array)array_replace_recursive(static::$template, $response);
         $this->offset = $this->response['response']['start'];
         foreach ($this->response['response']['docs'] as $record) {
             $this->add(new Record($record));
@@ -238,7 +238,7 @@ class RecordCollection implements Iterator
      */
     public function getSpellcheck()
     {
-        if (!$this->spellcheck) {
+        if ($this->spellcheck === null) {
             $params = isset($this->response['responseHeader']['params'])
                 ? $this->response['responseHeader']['params'] : array();
             $sq = isset($params['spellcheck.q'])
@@ -264,11 +264,11 @@ class RecordCollection implements Iterator
     /**
      * Return SOLR facet information.
      *
-     * @return array
+     * @return Facets
      */
     public function getFacets()
     {
-        if (!$this->facets) {
+        if ($this->facets === null) {
             $this->facets = new Facets($this->response['facet_counts']);
         }
         return $this->facets;
@@ -281,7 +281,7 @@ class RecordCollection implements Iterator
      */
     public function getGroups()
     {
-        if (is_null($this->groups)) {
+        if ($this->groups === null) {
             $this->groups = array();
             if (isset($this->response['grouped'])) {
                 foreach ($this->response['grouped'] as $field => $group) {
@@ -315,4 +315,4 @@ class RecordCollection implements Iterator
         return isset($this->response['highlighting'])
             ? $this->response['highlighting'] : array();
     }
-}
\ No newline at end of file
+}
-- 
GitLab