# tablepress/3.4/libraries/vendor/PhpSpreadsheet/Calculation/Statistical/VarianceBase.php

TablePress – Tables in WordPress made easy, version 3.4. 37 lines.

- Page: https://pluginprobe.com/plugins/tablepress/3.4/code/libraries/vendor/PhpSpreadsheet/Calculation/Statistical/VarianceBase.php
- Raw: https://pluginprobe.com/plugins/tablepress/3.4/raw/libraries/vendor/PhpSpreadsheet/Calculation/Statistical/VarianceBase.php
- Modified: 2026-09-30T03:50:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/tablepress/3.4/code/libraries/vendor/PhpSpreadsheet/Calculation/Statistical/VarianceBase.php#L10-L20`.

```php
<?php

namespace TablePress\PhpOffice\PhpSpreadsheet\Calculation\Statistical;

use TablePress\PhpOffice\PhpSpreadsheet\Calculation\Functions;

abstract class VarianceBase
{
	/**
				 * @param int|float|string|bool $value
				 * @return int|float
				 */
				protected static function datatypeAdjustmentAllowStrings($value)
	{
		if (is_bool($value)) {
			return (int) $value;
		} elseif (is_string($value)) {
			return 0;
		}

		return $value;
	}

	/**
				 * @param mixed $value
				 * @return mixed
				 */
				protected static function datatypeAdjustmentBooleans($value)
	{
		if (is_bool($value) && (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE)) {
			return (int) $value;
		}

		return $value;
	}
}

```
