mirror of
https://github.com/Karaka-Management/Resources.git
synced 2026-01-25 18:58:41 +00:00
23 lines
431 B
PHP
23 lines
431 B
PHP
<?php
|
|
|
|
namespace PhpOffice\PhpSpreadsheet\Reader\Xlsx;
|
|
|
|
class BaseParserClass
|
|
{
|
|
/**
|
|
* @param mixed $value
|
|
*/
|
|
protected static function boolean($value): bool
|
|
{
|
|
if (\is_object($value)) {
|
|
$value = (string) $value; // @phpstan-ignore-line
|
|
}
|
|
|
|
if (\is_numeric($value)) {
|
|
return (bool) $value;
|
|
}
|
|
|
|
return $value === 'true' || $value === 'TRUE';
|
|
}
|
|
}
|