Stricter type for returning false

This commit is contained in:
Adrien Crivelli
2023-09-07 17:01:18 +08:00
parent 1b05dfab8b
commit 58cfc10a00
2 changed files with 2 additions and 6 deletions
+1 -3
View File
@@ -106,10 +106,8 @@ class Legend
/**
* Get legend position as an Excel internal numeric value.
*
* @return false|int
*/
public function getPositionXL(): int|bool
public function getPositionXL(): false|int
{
// Scrutinizer thinks the following could return string. It is wrong.
return array_search($this->position, self::POSITION_XLREF);
+1 -3
View File
@@ -109,10 +109,8 @@ class HashTable
/**
* Get index for hash code.
*
* @return false|int Index
*/
public function getIndexForHashCode(string $hashCode): int|bool
public function getIndexForHashCode(string $hashCode): false|int
{
// Scrutinizer thinks the following could return string. It is wrong.
return array_search($hashCode, $this->keyMap, true);