See if we can sort out scrutinizer's issue with the hash map
This commit is contained in:
parent
3ad919575d
commit
6bf24d8aac
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue