mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-09 09:36:25 +00:00
See if we can sort out scrutinizer's issue with the hash map
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user