We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ad9195 commit 6bf24d8Copy full SHA for 6bf24d8
src/PhpSpreadsheet/HashTable.php
@@ -109,17 +109,11 @@ public function count()
109
/**
110
* Get index for hash code.
111
*
112
- * @return false|int Index
+ * @return false|int|string Index (return should never be a string, but scrutinizer refuses to recognise that)
113
*/
114
public function getIndexForHashCode(string $hashCode)
115
{
116
- $matched = array_search($hashCode, $this->keyMap, true);
117
-
118
- if ($matched === false) {
119
- return $matched;
120
- }
121
122
- return (int) $matched;
+ return array_search($hashCode, $this->keyMap, true);
123
}
124
125
0 commit comments