From 6bf24d8aacae61fc695e808b8ece41aec830e667 Mon Sep 17 00:00:00 2001 From: MarkBaker Date: Mon, 16 Nov 2020 17:34:44 +0100 Subject: [PATCH] See if we can sort out scrutinizer's issue with the hash map --- src/PhpSpreadsheet/HashTable.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/PhpSpreadsheet/HashTable.php b/src/PhpSpreadsheet/HashTable.php index 0fb56c9f..f433e237 100644 --- a/src/PhpSpreadsheet/HashTable.php +++ b/src/PhpSpreadsheet/HashTable.php @@ -109,17 +109,11 @@ class HashTable /** * Get index for hash code. * - * @return false|int Index + * @return false|int|string Index (return should never be a string, but scrutinizer refuses to recognise that) */ public function getIndexForHashCode(string $hashCode) { - $matched = array_search($hashCode, $this->keyMap, true); - - if ($matched === false) { - return $matched; - } - - return (int) $matched; + return array_search($hashCode, $this->keyMap, true); } /**