init
This commit is contained in:
commit
72a26edcff
22092 changed files with 2101903 additions and 0 deletions
21
lib/PhpSpreadsheet/Reader/Xlsx/BaseParserClass.php
Normal file
21
lib/PhpSpreadsheet/Reader/Xlsx/BaseParserClass.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace PhpOffice\PhpSpreadsheet\Reader\Xlsx;
|
||||
|
||||
use Stringable;
|
||||
|
||||
class BaseParserClass
|
||||
{
|
||||
protected static function boolean(mixed $value): bool
|
||||
{
|
||||
if (is_object($value)) {
|
||||
$value = ($value instanceof Stringable) ? ((string) $value) : 'true';
|
||||
}
|
||||
|
||||
if (is_numeric($value)) {
|
||||
return (bool) $value;
|
||||
}
|
||||
|
||||
return $value === 'true' || $value === 'TRUE';
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue