mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-10 10:06:30 +00:00
Fix issues
This commit is contained in:
@@ -15,16 +15,16 @@ class Info
|
||||
* @param mixed $typeText String specifying the type of information to be returned
|
||||
* @param ?Cell $cell Cell from which spreadsheet information is retrieved
|
||||
*
|
||||
* @return string The requested information about the current operating environment
|
||||
* @return string|int The requested information about the current operating environment
|
||||
*/
|
||||
public static function getInfo(mixed $typeText = '', ?Cell $cell = null): string
|
||||
public static function getInfo(mixed $typeText = '', ?Cell $cell = null): string|int
|
||||
{
|
||||
return match (is_string($typeText) ? strtolower($typeText) : $typeText) {
|
||||
'numfile' => $cell?->getWorksheetOrNull()?->getParent()?->getSheetCount() ?? 1,
|
||||
'osversion' => 'PHP ' . phpversion(),
|
||||
'recalc' => 'Automatic',
|
||||
'system' => 'PHP',
|
||||
default => ExcelError::VALUE(),
|
||||
'numfile' => $cell?->getWorksheetOrNull()?->getParent()?->getSheetCount() ?? 1,
|
||||
'osversion' => 'PHP ' . PHP_VERSION,
|
||||
'recalc' => 'Automatic',
|
||||
'system' => 'PHP',
|
||||
default => ExcelError::VALUE(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ return [
|
||||
],
|
||||
[
|
||||
'osversion',
|
||||
'PHP ' . phpversion(),
|
||||
'PHP ' . PHP_VERSION,
|
||||
],
|
||||
[
|
||||
'recalc',
|
||||
|
||||
Reference in New Issue
Block a user