mirror of
https://github.com/Karaka-Management/Resources.git
synced 2026-01-17 23:58:39 +00:00
29 lines
650 B
PHP
29 lines
650 B
PHP
<?php
|
|
|
|
namespace PhpOffice\PhpSpreadsheet\Calculation\Statistical;
|
|
|
|
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
|
|
|
abstract class VarianceBase
|
|
{
|
|
protected static function datatypeAdjustmentAllowStrings($value)
|
|
{
|
|
if (\is_bool($value)) {
|
|
return (int) $value;
|
|
} elseif (\is_string($value)) {
|
|
return 0;
|
|
}
|
|
|
|
return $value;
|
|
}
|
|
|
|
protected static function datatypeAdjustmentBooleans($value)
|
|
{
|
|
if (\is_bool($value) && (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE)) {
|
|
return (int) $value;
|
|
}
|
|
|
|
return $value;
|
|
}
|
|
}
|