See if we can sort out scrutinizer's issue with the hash map

This commit is contained in:
MarkBaker 2020-11-16 17:34:44 +01:00
parent 3ad919575d
commit 6bf24d8aac
1 changed files with 2 additions and 8 deletions

View File

@ -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);
}
/**