mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-30 03:59:11 +00:00
Stricter type for returning false
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user