diff --git a/src/PhpSpreadsheet/CalcEngine/Logger.php b/src/PhpSpreadsheet/CalcEngine/Logger.php index cde401a5..9bc97179 100644 --- a/src/PhpSpreadsheet/CalcEngine/Logger.php +++ b/src/PhpSpreadsheet/CalcEngine/Logger.php @@ -112,11 +112,11 @@ class Logger /** * Write an entry to the calculation engine debug log. */ - public function writeDebugLog() + public function writeDebugLog(...$args) { // Only write the debug log if logging is enabled if ($this->writeDebugLog) { - $message = implode(func_get_args()); + $message = implode($args); $cellReference = implode(' -> ', $this->cellStack->showStack()); if ($this->echoDebugLog) { echo $cellReference, diff --git a/src/PhpSpreadsheet/Calculation.php b/src/PhpSpreadsheet/Calculation.php index bc994987..51edf37c 100644 --- a/src/PhpSpreadsheet/Calculation.php +++ b/src/PhpSpreadsheet/Calculation.php @@ -3051,9 +3051,9 @@ class Calculation return $formula; } - private static function mkMatrix() + private static function mkMatrix(...$args) { - return func_get_args(); + return $args; } // Binary Operators diff --git a/src/PhpSpreadsheet/Calculation/DateTime.php b/src/PhpSpreadsheet/Calculation/DateTime.php index 11e20a1c..782b0828 100644 --- a/src/PhpSpreadsheet/Calculation/DateTime.php +++ b/src/PhpSpreadsheet/Calculation/DateTime.php @@ -951,15 +951,13 @@ class DateTime * * @return int Interval between the dates */ - public static function NETWORKDAYS($startDate, $endDate) + public static function NETWORKDAYS($startDate, $endDate, ...$dateArgs) { // Retrieve the mandatory start and end date that are referenced in the function definition $startDate = Functions::flattenSingleValue($startDate); $endDate = Functions::flattenSingleValue($endDate); - // Flush the mandatory start and end date that are referenced in the function definition, and get the optional days - $dateArgs = Functions::flattenArray(func_get_args()); - array_shift($dateArgs); - array_shift($dateArgs); + // Get the optional days + $dateArgs = Functions::flattenArray($dateArgs); // Validate the start and end dates if (is_string($startDate = $sDate = self::getDateValue($startDate))) { @@ -1035,15 +1033,13 @@ class DateTime * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, * depending on the value of the ReturnDateType flag */ - public static function WORKDAY($startDate, $endDays) + public static function WORKDAY($startDate, $endDays, ...$dateArgs) { // Retrieve the mandatory start date and days that are referenced in the function definition $startDate = Functions::flattenSingleValue($startDate); $endDays = Functions::flattenSingleValue($endDays); - // Flush the mandatory start date and days that are referenced in the function definition, and get the optional days - $dateArgs = Functions::flattenArray(func_get_args()); - array_shift($dateArgs); - array_shift($dateArgs); + // Get the optional days + $dateArgs = Functions::flattenArray($dateArgs); if ((is_string($startDate = self::getDateValue($startDate))) || (!is_numeric($endDays))) { return Functions::VALUE(); diff --git a/src/PhpSpreadsheet/Calculation/Engineering.php b/src/PhpSpreadsheet/Calculation/Engineering.php index d74a39a8..6fe07b39 100644 --- a/src/PhpSpreadsheet/Calculation/Engineering.php +++ b/src/PhpSpreadsheet/Calculation/Engineering.php @@ -2291,18 +2291,18 @@ class Engineering * Excel Function: * IMSUM(complexNumber[,complexNumber[,...]]) * - * @param string $complexNumber,... Series of complex numbers to add + * @param string $complexNumbers Series of complex numbers to add * * @return string */ - public static function IMSUM() + public static function IMSUM(...$complexNumbers) { // Return value $returnValue = self::parseComplex('0'); $activeSuffix = ''; // Loop through the arguments - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($complexNumbers); foreach ($aArgs as $arg) { $parsedComplex = self::parseComplex($arg); @@ -2331,18 +2331,18 @@ class Engineering * Excel Function: * IMPRODUCT(complexNumber[,complexNumber[,...]]) * - * @param string $complexNumber,... Series of complex numbers to multiply + * @param string $complexNumbers Series of complex numbers to multiply * * @return string */ - public static function IMPRODUCT() + public static function IMPRODUCT(...$complexNumbers) { // Return value $returnValue = self::parseComplex('1'); $activeSuffix = ''; // Loop through the arguments - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($complexNumbers); foreach ($aArgs as $arg) { $parsedComplex = self::parseComplex($arg); diff --git a/src/PhpSpreadsheet/Calculation/Financial.php b/src/PhpSpreadsheet/Calculation/Financial.php index 35c44533..4c80a684 100644 --- a/src/PhpSpreadsheet/Calculation/Financial.php +++ b/src/PhpSpreadsheet/Calculation/Financial.php @@ -1480,13 +1480,13 @@ class Financial * * PV is the loan amount or present value of the payments */ - public static function ISPMT() + public static function ISPMT(...$args) { // Return value $returnValue = 0; // Get the parameters - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); $interestRate = array_shift($aArgs); $period = array_shift($aArgs); $numberPeriods = array_shift($aArgs); @@ -1627,13 +1627,13 @@ class Financial * * @return float */ - public static function NPV() + public static function NPV(...$args) { // Return value $returnValue = 0; // Loop through arguments - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); // Calculate $rate = array_shift($aArgs); diff --git a/src/PhpSpreadsheet/Calculation/Logical.php b/src/PhpSpreadsheet/Calculation/Logical.php index 14907f26..25bacafc 100644 --- a/src/PhpSpreadsheet/Calculation/Logical.php +++ b/src/PhpSpreadsheet/Calculation/Logical.php @@ -78,17 +78,17 @@ class Logical * * @category Logical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return string|bool the logical AND of the arguments */ - public static function logicalAnd() + public static function logicalAnd(...$args) { // Return value $returnValue = true; // Loop through the arguments - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); $argCount = -1; foreach ($aArgs as $argCount => $arg) { // Is it a boolean value? @@ -135,17 +135,17 @@ class Logical * * @category Logical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return string|bool the logical OR of the arguments */ - public static function logicalOr() + public static function logicalOr(...$args) { // Return value $returnValue = false; // Loop through the arguments - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); $argCount = -1; foreach ($aArgs as $argCount => $arg) { // Is it a boolean value? diff --git a/src/PhpSpreadsheet/Calculation/LookupRef.php b/src/PhpSpreadsheet/Calculation/LookupRef.php index c0d6b42b..7373f832 100644 --- a/src/PhpSpreadsheet/Calculation/LookupRef.php +++ b/src/PhpSpreadsheet/Calculation/LookupRef.php @@ -270,9 +270,6 @@ class LookupRef */ public static function HYPERLINK($linkURL = '', $displayName = null, \PhpOffice\PhpSpreadsheet\Cell $pCell = null) { - $args = func_get_args(); - $pCell = array_pop($args); - $linkURL = (is_null($linkURL)) ? '' : Functions::flattenSingleValue($linkURL); $displayName = (is_null($displayName)) ? '' : Functions::flattenSingleValue($displayName); @@ -377,10 +374,11 @@ class LookupRef * @param mixed $columns * @param null|mixed $height * @param null|mixed $width + * @param \PhpOffice\PhpSpreadsheet\Cell $pCell * * @return string A reference to a cell or range of cells */ - public static function OFFSET($cellAddress = null, $rows = 0, $columns = 0, $height = null, $width = null) + public static function OFFSET($cellAddress = null, $rows = 0, $columns = 0, $height = null, $width = null, \PhpOffice\PhpSpreadsheet\Cell $pCell = null) { $rows = Functions::flattenSingleValue($rows); $columns = Functions::flattenSingleValue($columns); @@ -390,8 +388,6 @@ class LookupRef return 0; } - $args = func_get_args(); - $pCell = array_pop($args); if (!is_object($pCell)) { return Functions::REF(); } @@ -468,9 +464,8 @@ class LookupRef * * @return mixed The selected value */ - public static function CHOOSE() + public static function CHOOSE(...$chooseArgs) { - $chooseArgs = func_get_args(); $chosenEntry = Functions::flattenArray(array_shift($chooseArgs)); $entryCount = count($chooseArgs) - 1; diff --git a/src/PhpSpreadsheet/Calculation/MathTrig.php b/src/PhpSpreadsheet/Calculation/MathTrig.php index deb6d0f6..6ea7ba66 100644 --- a/src/PhpSpreadsheet/Calculation/MathTrig.php +++ b/src/PhpSpreadsheet/Calculation/MathTrig.php @@ -343,16 +343,16 @@ class MathTrig * * @category Mathematical and Trigonometric Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return int Greatest Common Divisor */ - public static function GCD() + public static function GCD(...$args) { $returnValue = 1; $allValuesFactors = []; // Loop through arguments - foreach (Functions::flattenArray(func_get_args()) as $value) { + foreach (Functions::flattenArray($args) as $value) { if (!is_numeric($value)) { return Functions::VALUE(); } elseif ($value == 0) { @@ -452,16 +452,16 @@ class MathTrig * * @category Mathematical and Trigonometric Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return int Lowest Common Multiplier */ - public static function LCM() + public static function LCM(...$args) { $returnValue = 1; $allPoweredFactors = []; // Loop through arguments - foreach (Functions::flattenArray(func_get_args()) as $value) { + foreach (Functions::flattenArray($args) as $value) { if (!is_numeric($value)) { return Functions::VALUE(); } @@ -755,12 +755,12 @@ class MathTrig * * @return float */ - public static function MULTINOMIAL() + public static function MULTINOMIAL(...$args) { $summer = 0; $divisor = 1; // Loop through arguments - foreach (Functions::flattenArray(func_get_args()) as $arg) { + foreach (Functions::flattenArray($args) as $arg) { // Is it a numeric value? if (is_numeric($arg)) { if ($arg < 1) { @@ -855,17 +855,17 @@ class MathTrig * * @category Mathematical and Trigonometric Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function PRODUCT() + public static function PRODUCT(...$args) { // Return value $returnValue = null; // Loop through arguments - foreach (Functions::flattenArray(func_get_args()) as $arg) { + foreach (Functions::flattenArray($args) as $arg) { // Is it a numeric value? if ((is_numeric($arg)) && (!is_string($arg))) { if (is_null($returnValue)) { @@ -895,17 +895,17 @@ class MathTrig * * @category Mathematical and Trigonometric Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function QUOTIENT() + public static function QUOTIENT(...$args) { // Return value $returnValue = null; // Loop through arguments - foreach (Functions::flattenArray(func_get_args()) as $arg) { + foreach (Functions::flattenArray($args) as $arg) { // Is it a numeric value? if ((is_numeric($arg)) && (!is_string($arg))) { if (is_null($returnValue)) { @@ -1042,12 +1042,12 @@ class MathTrig * * @return float */ - public static function SERIESSUM() + public static function SERIESSUM(...$args) { $returnValue = 0; // Loop through arguments - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); $x = array_shift($aArgs); $n = array_shift($aArgs); @@ -1134,9 +1134,9 @@ class MathTrig * * @return float */ - public static function SUBTOTAL() + public static function SUBTOTAL(...$args) { - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); // Calculate $subtotal = array_shift($aArgs); @@ -1181,16 +1181,16 @@ class MathTrig * * @category Mathematical and Trigonometric Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function SUM() + public static function SUM(...$args) { $returnValue = 0; // Loop through the arguments - foreach (Functions::flattenArray(func_get_args()) as $arg) { + foreach (Functions::flattenArray($args) as $arg) { // Is it a numeric value? if ((is_numeric($arg)) && (!is_string($arg))) { $returnValue += $arg; @@ -1210,7 +1210,7 @@ class MathTrig * * @category Mathematical and Trigonometric Functions * - * @param mixed $arg,... Data values + * @param mixed $aArgs Data values * @param string $condition the criteria that defines which cells will be summed * @param mixed $aArgs * @param mixed $sumArgs @@ -1254,14 +1254,14 @@ class MathTrig * * @category Mathematical and Trigonometric Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * @param string $condition the criteria that defines which cells will be summed * * @return float */ - public static function SUMIFS() + public static function SUMIFS(...$args) { - $arrayList = func_get_args(); + $arrayList = $args; // Return value $returnValue = 0; @@ -1302,13 +1302,13 @@ class MathTrig * * @category Mathematical and Trigonometric Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function SUMPRODUCT() + public static function SUMPRODUCT(...$args) { - $arrayList = func_get_args(); + $arrayList = $args; $wrkArray = Functions::flattenArray(array_shift($arrayList)); $wrkCellCount = count($wrkArray); @@ -1347,16 +1347,16 @@ class MathTrig * * @category Mathematical and Trigonometric Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function SUMSQ() + public static function SUMSQ(...$args) { $returnValue = 0; // Loop through arguments - foreach (Functions::flattenArray(func_get_args()) as $arg) { + foreach (Functions::flattenArray($args) as $arg) { // Is it a numeric value? if ((is_numeric($arg)) && (!is_string($arg))) { $returnValue += ($arg * $arg); diff --git a/src/PhpSpreadsheet/Calculation/Statistical.php b/src/PhpSpreadsheet/Calculation/Statistical.php index 3d28a952..2f743e70 100644 --- a/src/PhpSpreadsheet/Calculation/Statistical.php +++ b/src/PhpSpreadsheet/Calculation/Statistical.php @@ -722,13 +722,13 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function AVEDEV() + public static function AVEDEV(...$args) { - $aArgs = Functions::flattenArrayIndexed(func_get_args()); + $aArgs = Functions::flattenArrayIndexed($args); // Return value $returnValue = null; @@ -773,16 +773,16 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function AVERAGE() + public static function AVERAGE(...$args) { $returnValue = $aCount = 0; // Loop through arguments - foreach (Functions::flattenArrayIndexed(func_get_args()) as $k => $arg) { + foreach (Functions::flattenArrayIndexed($args) as $k => $arg) { if ((is_bool($arg)) && ((!Functions::isCellValue($k)) || (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))) { $arg = (int) $arg; @@ -816,17 +816,17 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function AVERAGEA() + public static function AVERAGEA(...$args) { $returnValue = null; $aCount = 0; // Loop through arguments - foreach (Functions::flattenArrayIndexed(func_get_args()) as $k => $arg) { + foreach (Functions::flattenArrayIndexed($args) as $k => $arg) { if ((is_bool($arg)) && (!Functions::isMatrixValue($k))) { } else { @@ -863,10 +863,9 @@ class Statistical * * @category Mathematical and Trigonometric Functions * - * @param mixed $arg,... Data values + * @param mixed $aArgs Data values * @param string $condition the criteria that defines which cells will be checked * @param mixed[] $averageArgs Data values - * @param mixed $aArgs * * @return float */ @@ -1210,16 +1209,16 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return int */ - public static function COUNT() + public static function COUNT(...$args) { $returnValue = 0; // Loop through arguments - $aArgs = Functions::flattenArrayIndexed(func_get_args()); + $aArgs = Functions::flattenArrayIndexed($args); foreach ($aArgs as $k => $arg) { if ((is_bool($arg)) && ((!Functions::isCellValue($k)) || (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))) { @@ -1244,16 +1243,16 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return int */ - public static function COUNTA() + public static function COUNTA(...$args) { $returnValue = 0; // Loop through arguments - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); foreach ($aArgs as $arg) { // Is it a numeric, boolean or string value? if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) { @@ -1274,16 +1273,16 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return int */ - public static function COUNTBLANK() + public static function COUNTBLANK(...$args) { $returnValue = 0; // Loop through arguments - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); foreach ($aArgs as $arg) { // Is it a blank cell? if ((is_null($arg)) || ((is_string($arg)) && ($arg == ''))) { @@ -1304,9 +1303,8 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $aArgs Data values * @param string $condition the criteria that defines which cells will be counted - * @param mixed $aArgs * * @return int */ @@ -1495,13 +1493,13 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function DEVSQ() + public static function DEVSQ(...$args) { - $aArgs = Functions::flattenArrayIndexed(func_get_args()); + $aArgs = Functions::flattenArrayIndexed($args); // Return value $returnValue = null; @@ -1789,13 +1787,13 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function GEOMEAN() + public static function GEOMEAN(...$args) { - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); $aMean = MathTrig::PRODUCT($aArgs); if (is_numeric($aMean) && ($aMean > 0)) { @@ -1855,17 +1853,17 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function HARMEAN() + public static function HARMEAN(...$args) { // Return value $returnValue = Functions::NA(); // Loop through arguments - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); if (self::MIN($aArgs) < 0) { return Functions::NAN(); } @@ -1975,9 +1973,9 @@ class Statistical * * @return float */ - public static function KURT() + public static function KURT(...$args) { - $aArgs = Functions::flattenArrayIndexed(func_get_args()); + $aArgs = Functions::flattenArrayIndexed($args); $mean = self::AVERAGE($aArgs); $stdDev = self::STDEV($aArgs); @@ -2016,14 +2014,14 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * @param int $entry Position (ordered from the largest) in the array or range of data to return * * @return float */ - public static function LARGE() + public static function LARGE(...$args) { - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); // Calculate $entry = floor(array_pop($aArgs)); @@ -2253,16 +2251,16 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function MAX() + public static function MAX(...$args) { $returnValue = null; // Loop through arguments - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); foreach ($aArgs as $arg) { // Is it a numeric value? if ((is_numeric($arg)) && (!is_string($arg))) { @@ -2289,16 +2287,16 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function MAXA() + public static function MAXA(...$args) { $returnValue = null; // Loop through arguments - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); foreach ($aArgs as $arg) { // Is it a numeric value? if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) { @@ -2330,9 +2328,8 @@ class Statistical * * @category Mathematical and Trigonometric Functions * - * @param mixed $arg,... Data values + * @param mixed $aArgs Data values * @param string $condition the criteria that defines which cells will be checked - * @param mixed $aArgs * @param mixed $sumArgs * * @return float @@ -2373,17 +2370,17 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function MEDIAN() + public static function MEDIAN(...$args) { $returnValue = Functions::NAN(); $mArgs = []; // Loop through arguments - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); foreach ($aArgs as $arg) { // Is it a numeric value? if ((is_numeric($arg)) && (!is_string($arg))) { @@ -2417,16 +2414,16 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function MIN() + public static function MIN(...$args) { $returnValue = null; // Loop through arguments - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); foreach ($aArgs as $arg) { // Is it a numeric value? if ((is_numeric($arg)) && (!is_string($arg))) { @@ -2453,16 +2450,16 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function MINA() + public static function MINA(...$args) { $returnValue = null; // Loop through arguments - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); foreach ($aArgs as $arg) { // Is it a numeric value? if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) { @@ -2494,9 +2491,8 @@ class Statistical * * @category Mathematical and Trigonometric Functions * - * @param mixed $arg,... Data values + * @param mixed $aArgs Data values * @param string $condition the criteria that defines which cells will be checked - * @param mixed $aArgs * @param mixed $sumArgs * * @return float @@ -2574,16 +2570,16 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function MODE() + public static function MODE(...$args) { $returnValue = Functions::NA(); // Loop through arguments - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); $mArgs = []; foreach ($aArgs as $arg) { @@ -2748,14 +2744,14 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * @param float $entry Percentile value in the range 0..1, inclusive. * * @return float */ - public static function PERCENTILE() + public static function PERCENTILE(...$args) { - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); // Calculate $entry = array_pop($aArgs); @@ -2920,14 +2916,14 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * @param int $entry Quartile value in the range 1..3, inclusive. * * @return float */ - public static function QUARTILE() + public static function QUARTILE(...$args) { - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); // Calculate $entry = floor(array_pop($aArgs)); @@ -3026,9 +3022,9 @@ class Statistical * * @return float */ - public static function SKEW() + public static function SKEW(...$args) { - $aArgs = Functions::flattenArrayIndexed(func_get_args()); + $aArgs = Functions::flattenArrayIndexed($args); $mean = self::AVERAGE($aArgs); $stdDev = self::STDEV($aArgs); @@ -3095,14 +3091,14 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * @param int $entry Position (ordered from the smallest) in the array or range of data to return * * @return float */ - public static function SMALL() + public static function SMALL(...$args) { - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); // Calculate $entry = array_pop($aArgs); @@ -3167,13 +3163,13 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function STDEV() + public static function STDEV(...$args) { - $aArgs = Functions::flattenArrayIndexed(func_get_args()); + $aArgs = Functions::flattenArrayIndexed($args); // Return value $returnValue = null; @@ -3216,13 +3212,13 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function STDEVA() + public static function STDEVA(...$args) { - $aArgs = Functions::flattenArrayIndexed(func_get_args()); + $aArgs = Functions::flattenArrayIndexed($args); $returnValue = null; @@ -3268,13 +3264,13 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function STDEVP() + public static function STDEVP(...$args) { - $aArgs = Functions::flattenArrayIndexed(func_get_args()); + $aArgs = Functions::flattenArrayIndexed($args); $returnValue = null; @@ -3315,13 +3311,13 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function STDEVPA() + public static function STDEVPA(...$args) { - $aArgs = Functions::flattenArrayIndexed(func_get_args()); + $aArgs = Functions::flattenArrayIndexed($args); $returnValue = null; @@ -3559,14 +3555,14 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * @param float $discard Percentage to discard * * @return float */ - public static function TRIMMEAN() + public static function TRIMMEAN(...$args) { - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); // Calculate $percent = array_pop($aArgs); @@ -3605,18 +3601,18 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function VARFunc() + public static function VARFunc(...$args) { $returnValue = Functions::DIV0(); $summerA = $summerB = 0; // Loop through arguments - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); $aCount = 0; foreach ($aArgs as $arg) { if (is_bool($arg)) { @@ -3649,18 +3645,18 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function VARA() + public static function VARA(...$args) { $returnValue = Functions::DIV0(); $summerA = $summerB = 0; // Loop through arguments - $aArgs = Functions::flattenArrayIndexed(func_get_args()); + $aArgs = Functions::flattenArrayIndexed($args); $aCount = 0; foreach ($aArgs as $k => $arg) { if ((is_string($arg)) && @@ -3702,11 +3698,11 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function VARP() + public static function VARP(...$args) { // Return value $returnValue = Functions::DIV0(); @@ -3714,7 +3710,7 @@ class Statistical $summerA = $summerB = 0; // Loop through arguments - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); $aCount = 0; foreach ($aArgs as $arg) { if (is_bool($arg)) { @@ -3747,18 +3743,18 @@ class Statistical * * @category Statistical Functions * - * @param mixed $arg,... Data values + * @param mixed $args Data values * * @return float */ - public static function VARPA() + public static function VARPA(...$args) { $returnValue = Functions::DIV0(); $summerA = $summerB = 0; // Loop through arguments - $aArgs = Functions::flattenArrayIndexed(func_get_args()); + $aArgs = Functions::flattenArrayIndexed($args); $aCount = 0; foreach ($aArgs as $k => $arg) { if ((is_string($arg)) && diff --git a/src/PhpSpreadsheet/Calculation/TextData.php b/src/PhpSpreadsheet/Calculation/TextData.php index b02de87c..62df7e3e 100644 --- a/src/PhpSpreadsheet/Calculation/TextData.php +++ b/src/PhpSpreadsheet/Calculation/TextData.php @@ -143,12 +143,12 @@ class TextData * * @return string */ - public static function CONCATENATE() + public static function CONCATENATE(...$args) { $returnValue = ''; // Loop through arguments - $aArgs = Functions::flattenArray(func_get_args()); + $aArgs = Functions::flattenArray($args); foreach ($aArgs as $arg) { if (is_bool($arg)) { if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { diff --git a/src/PhpSpreadsheet/Shared/JAMA/Matrix.php b/src/PhpSpreadsheet/Shared/JAMA/Matrix.php index 436abdfb..c1e096dc 100644 --- a/src/PhpSpreadsheet/Shared/JAMA/Matrix.php +++ b/src/PhpSpreadsheet/Shared/JAMA/Matrix.php @@ -47,10 +47,9 @@ class Matrix * * As PHP has no support for polymorphic constructors, we use tricks to make our own sort of polymorphism using func_num_args, func_get_arg, and gettype. In essence, we're just implementing a simple RTTI filter and calling the appropriate constructor. */ - public function __construct() + public function __construct(...$args) { - if (func_num_args() > 0) { - $args = func_get_args(); + if (count($args) > 0) { $match = implode(',', array_map('gettype', $args)); switch ($match) { @@ -156,10 +155,9 @@ class Matrix * * @return Matrix Submatrix */ - public function getMatrix() + public function getMatrix(...$args) { - if (func_num_args() > 0) { - $args = func_get_args(); + if (count($args) > 0) { $match = implode(',', array_map('gettype', $args)); switch ($match) { @@ -462,10 +460,9 @@ class Matrix * * @return Matrix Sum */ - public function plus() + public function plus(...$args) { - if (func_num_args() > 0) { - $args = func_get_args(); + if (count($args) > 0) { $match = implode(',', array_map('gettype', $args)); switch ($match) { @@ -504,10 +501,9 @@ class Matrix * * @return Matrix Sum */ - public function plusEquals() + public function plusEquals(...$args) { - if (func_num_args() > 0) { - $args = func_get_args(); + if (count($args) > 0) { $match = implode(',', array_map('gettype', $args)); switch ($match) { @@ -560,10 +556,9 @@ class Matrix * * @return Matrix Sum */ - public function minus() + public function minus(...$args) { - if (func_num_args() > 0) { - $args = func_get_args(); + if (count($args) > 0) { $match = implode(',', array_map('gettype', $args)); switch ($match) { @@ -602,10 +597,9 @@ class Matrix * * @return Matrix Sum */ - public function minusEquals() + public function minusEquals(...$args) { - if (func_num_args() > 0) { - $args = func_get_args(); + if (count($args) > 0) { $match = implode(',', array_map('gettype', $args)); switch ($match) { @@ -659,10 +653,9 @@ class Matrix * * @return Matrix Matrix Cij */ - public function arrayTimes() + public function arrayTimes(...$args) { - if (func_num_args() > 0) { - $args = func_get_args(); + if (count($args) > 0) { $match = implode(',', array_map('gettype', $args)); switch ($match) { @@ -702,10 +695,9 @@ class Matrix * * @return Matrix Matrix Aij */ - public function arrayTimesEquals() + public function arrayTimesEquals(...$args) { - if (func_num_args() > 0) { - $args = func_get_args(); + if (count($args) > 0) { $match = implode(',', array_map('gettype', $args)); switch ($match) { @@ -759,10 +751,9 @@ class Matrix * * @return Matrix Division result */ - public function arrayRightDivide() + public function arrayRightDivide(...$args) { - if (func_num_args() > 0) { - $args = func_get_args(); + if (count($args) > 0) { $match = implode(',', array_map('gettype', $args)); switch ($match) { @@ -821,10 +812,9 @@ class Matrix * * @return Matrix Matrix Aij */ - public function arrayRightDivideEquals() + public function arrayRightDivideEquals(...$args) { - if (func_num_args() > 0) { - $args = func_get_args(); + if (count($args) > 0) { $match = implode(',', array_map('gettype', $args)); switch ($match) { @@ -864,10 +854,9 @@ class Matrix * * @return Matrix Division result */ - public function arrayLeftDivide() + public function arrayLeftDivide(...$args) { - if (func_num_args() > 0) { - $args = func_get_args(); + if (count($args) > 0) { $match = implode(',', array_map('gettype', $args)); switch ($match) { @@ -907,10 +896,9 @@ class Matrix * * @return Matrix Matrix Aij */ - public function arrayLeftDivideEquals() + public function arrayLeftDivideEquals(...$args) { - if (func_num_args() > 0) { - $args = func_get_args(); + if (count($args) > 0) { $match = implode(',', array_map('gettype', $args)); switch ($match) { @@ -949,10 +937,9 @@ class Matrix * * @return Matrix Product */ - public function times() + public function times(...$args) { - if (func_num_args() > 0) { - $args = func_get_args(); + if (count() > 0) { $match = implode(',', array_map('gettype', $args)); switch ($match) { @@ -1042,10 +1029,9 @@ class Matrix * * @return Matrix Sum */ - public function power() + public function power(...$args) { - if (func_num_args() > 0) { - $args = func_get_args(); + if (count() > 0) { $match = implode(',', array_map('gettype', $args)); switch ($match) { @@ -1098,10 +1084,9 @@ class Matrix * * @return Matrix Sum */ - public function concat() + public function concat(...$args) { - if (func_num_args() > 0) { - $args = func_get_args(); + if (count($args) > 0) { $match = implode(',', array_map('gettype', $args)); switch ($match) { diff --git a/src/PhpSpreadsheet/Shared/JAMA/utils/Maths.php b/src/PhpSpreadsheet/Shared/JAMA/utils/Maths.php index e976d346..5771edba 100644 --- a/src/PhpSpreadsheet/Shared/JAMA/utils/Maths.php +++ b/src/PhpSpreadsheet/Shared/JAMA/utils/Maths.php @@ -25,21 +25,4 @@ function hypo($a, $b) } return $r; -} // function hypo() - -/* - * Mike Bommarito's version. - * Compute n-dimensional hyotheneuse. - * -function hypot() { - $s = 0; - foreach (func_get_args() as $d) { - if (is_numeric($d)) { - $s += pow($d, 2); - } else { - throw new \PhpOffice\PhpSpreadsheet\Calculation\Exception(JAMAError(ARGUMENT_TYPE_EXCEPTION)); - } - } - return sqrt($s); } -*/ diff --git a/tests/PhpSpreadsheetTests/Calculation/DateTimeTest.php b/tests/PhpSpreadsheetTests/Calculation/DateTimeTest.php index 1a41c902..d8458045 100644 --- a/tests/PhpSpreadsheetTests/Calculation/DateTimeTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/DateTimeTest.php @@ -18,12 +18,12 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDATE + * + * @param mixed $expectedResult */ - public function testDATE() + public function testDATE($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([DateTime::class, 'DATE'], $args); + $result = DateTime::DATE(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -71,12 +71,12 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDATEVALUE + * + * @param mixed $expectedResult */ - public function testDATEVALUE() + public function testDATEVALUE($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([DateTime::class, 'DATEVALUE'], $args); + $result = DateTime::DATEVALUE(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -108,12 +108,12 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerYEAR + * + * @param mixed $expectedResult */ - public function testYEAR() + public function testYEAR($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([DateTime::class, 'YEAR'], $args); + $result = DateTime::YEAR(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -124,12 +124,12 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerMONTH + * + * @param mixed $expectedResult */ - public function testMONTH() + public function testMONTH($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([DateTime::class, 'MONTHOFYEAR'], $args); + $result = DateTime::MONTHOFYEAR(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -140,12 +140,12 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerWEEKNUM + * + * @param mixed $expectedResult */ - public function testWEEKNUM() + public function testWEEKNUM($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([DateTime::class, 'WEEKNUM'], $args); + $result = DateTime::WEEKNUM(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -156,12 +156,12 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerWEEKDAY + * + * @param mixed $expectedResult */ - public function testWEEKDAY() + public function testWEEKDAY($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([DateTime::class, 'WEEKDAY'], $args); + $result = DateTime::WEEKDAY(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -172,12 +172,12 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDAY + * + * @param mixed $expectedResult */ - public function testDAY() + public function testDAY($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([DateTime::class, 'DAYOFMONTH'], $args); + $result = DateTime::DAYOFMONTH(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -188,12 +188,12 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerTIME + * + * @param mixed $expectedResult */ - public function testTIME() + public function testTIME($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([DateTime::class, 'TIME'], $args); + $result = DateTime::TIME(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -225,12 +225,12 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerTIMEVALUE + * + * @param mixed $expectedResult */ - public function testTIMEVALUE() + public function testTIMEVALUE($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([DateTime::class, 'TIMEVALUE'], $args); + $result = DateTime::TIMEVALUE(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -262,12 +262,12 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerHOUR + * + * @param mixed $expectedResult */ - public function testHOUR() + public function testHOUR($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([DateTime::class, 'HOUROFDAY'], $args); + $result = DateTime::HOUROFDAY(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -278,12 +278,12 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerMINUTE + * + * @param mixed $expectedResult */ - public function testMINUTE() + public function testMINUTE($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([DateTime::class, 'MINUTE'], $args); + $result = DateTime::MINUTE(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -294,12 +294,12 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerSECOND + * + * @param mixed $expectedResult */ - public function testSECOND() + public function testSECOND($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([DateTime::class, 'SECOND'], $args); + $result = DateTime::SECOND(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -310,12 +310,12 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerNETWORKDAYS + * + * @param mixed $expectedResult */ - public function testNETWORKDAYS() + public function testNETWORKDAYS($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([DateTime::class, 'NETWORKDAYS'], $args); + $result = DateTime::NETWORKDAYS(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -326,12 +326,12 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerWORKDAY + * + * @param mixed $expectedResult */ - public function testWORKDAY() + public function testWORKDAY($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([DateTime::class, 'WORKDAY'], $args); + $result = DateTime::WORKDAY(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -342,12 +342,12 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerEDATE + * + * @param mixed $expectedResult */ - public function testEDATE() + public function testEDATE($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([DateTime::class, 'EDATE'], $args); + $result = DateTime::EDATE(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -379,12 +379,12 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerEOMONTH + * + * @param mixed $expectedResult */ - public function testEOMONTH() + public function testEOMONTH($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([DateTime::class, 'EOMONTH'], $args); + $result = DateTime::EOMONTH(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -416,12 +416,12 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDATEDIF + * + * @param mixed $expectedResult */ - public function testDATEDIF() + public function testDATEDIF($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([DateTime::class, 'DATEDIF'], $args); + $result = DateTime::DATEDIF(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -432,12 +432,12 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDAYS360 + * + * @param mixed $expectedResult */ - public function testDAYS360() + public function testDAYS360($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([DateTime::class, 'DAYS360'], $args); + $result = DateTime::DAYS360(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -448,12 +448,12 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerYEARFRAC + * + * @param mixed $expectedResult */ - public function testYEARFRAC() + public function testYEARFRAC($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([DateTime::class, 'YEARFRAC'], $args); + $result = DateTime::YEARFRAC(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } diff --git a/tests/PhpSpreadsheetTests/Calculation/EngineeringTest.php b/tests/PhpSpreadsheetTests/Calculation/EngineeringTest.php index e4ef63b9..89d1e5f1 100644 --- a/tests/PhpSpreadsheetTests/Calculation/EngineeringTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/EngineeringTest.php @@ -25,12 +25,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerBESSELI + * + * @param mixed $expectedResult */ - public function testBESSELI() + public function testBESSELI($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'BESSELI'], $args); + $result = Engineering::BESSELI(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -41,12 +41,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerBESSELJ + * + * @param mixed $expectedResult */ - public function testBESSELJ() + public function testBESSELJ($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'BESSELJ'], $args); + $result = Engineering::BESSELJ(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -57,12 +57,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerBESSELK + * + * @param mixed $expectedResult */ - public function testBESSELK() + public function testBESSELK($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'BESSELK'], $args); + $result = Engineering::BESSELK(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -73,12 +73,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerBESSELY + * + * @param mixed $expectedResult */ - public function testBESSELY() + public function testBESSELY($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'BESSELY'], $args); + $result = Engineering::BESSELY(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -89,12 +89,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerCOMPLEX + * + * @param mixed $expectedResult */ - public function testCOMPLEX() + public function testCOMPLEX($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'COMPLEX'], $args); + $result = Engineering::COMPLEX(...$args); $this->assertEquals($expectedResult, $result); } @@ -105,12 +105,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIMAGINARY + * + * @param mixed $expectedResult */ - public function testIMAGINARY() + public function testIMAGINARY($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'IMAGINARY'], $args); + $result = Engineering::IMAGINARY(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -121,12 +121,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIMREAL + * + * @param mixed $expectedResult */ - public function testIMREAL() + public function testIMREAL($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'IMREAL'], $args); + $result = Engineering::IMREAL(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -137,12 +137,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIMABS + * + * @param mixed $expectedResult */ - public function testIMABS() + public function testIMABS($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'IMABS'], $args); + $result = Engineering::IMABS(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -154,12 +154,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIMARGUMENT * @group fail19 + * + * @param mixed $expectedResult */ - public function testIMARGUMENT() + public function testIMARGUMENT($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'IMARGUMENT'], $args); + $result = Engineering::IMARGUMENT(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -170,12 +170,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIMCONJUGATE + * + * @param mixed $expectedResult */ - public function testIMCONJUGATE() + public function testIMCONJUGATE($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'IMCONJUGATE'], $args); + $result = Engineering::IMCONJUGATE(...$args); $this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); } @@ -186,12 +186,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIMCOS + * + * @param mixed $expectedResult */ - public function testIMCOS() + public function testIMCOS($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'IMCOS'], $args); + $result = Engineering::IMCOS(...$args); $this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); } @@ -203,14 +203,14 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIMDIV * @group fail19 + * + * @param mixed $expectedResult */ - public function testIMDIV() + public function testIMDIV($expectedResult, ...$args) { $this->markTestIncomplete('TODO: This test should be fixed'); - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'IMDIV'], $args); + $result = Engineering::IMDIV(...$args); $this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); } @@ -221,12 +221,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIMEXP + * + * @param mixed $expectedResult */ - public function testIMEXP() + public function testIMEXP($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'IMEXP'], $args); + $result = Engineering::IMEXP(...$args); $this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); } @@ -237,12 +237,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIMLN + * + * @param mixed $expectedResult */ - public function testIMLN() + public function testIMLN($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'IMLN'], $args); + $result = Engineering::IMLN(...$args); $this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); } @@ -253,12 +253,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIMLOG2 + * + * @param mixed $expectedResult */ - public function testIMLOG2() + public function testIMLOG2($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'IMLOG2'], $args); + $result = Engineering::IMLOG2(...$args); $this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); } @@ -269,12 +269,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIMLOG10 + * + * @param mixed $expectedResult */ - public function testIMLOG10() + public function testIMLOG10($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'IMLOG10'], $args); + $result = Engineering::IMLOG10(...$args); $this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); } @@ -286,14 +286,14 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIMPOWER * @group fail19 + * + * @param mixed $expectedResult */ - public function testIMPOWER() + public function testIMPOWER($expectedResult, ...$args) { $this->markTestIncomplete('TODO: This test should be fixed'); - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'IMPOWER'], $args); + $result = Engineering::IMPOWER(...$args); $this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); } @@ -304,12 +304,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIMPRODUCT + * + * @param mixed $expectedResult */ - public function testIMPRODUCT() + public function testIMPRODUCT($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'IMPRODUCT'], $args); + $result = Engineering::IMPRODUCT(...$args); $this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); } @@ -320,12 +320,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIMSIN + * + * @param mixed $expectedResult */ - public function testIMSIN() + public function testIMSIN($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'IMSIN'], $args); + $result = Engineering::IMSIN(...$args); $this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); } @@ -336,12 +336,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIMSQRT + * + * @param mixed $expectedResult */ - public function testIMSQRT() + public function testIMSQRT($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'IMSQRT'], $args); + $result = Engineering::IMSQRT(...$args); $this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); } @@ -353,14 +353,14 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIMSUB * @group fail19 + * + * @param mixed $expectedResult */ - public function testIMSUB() + public function testIMSUB($expectedResult, ...$args) { $this->markTestIncomplete('TODO: This test should be fixed'); - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'IMSUB'], $args); + $result = Engineering::IMSUB(...$args); $this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); } @@ -372,12 +372,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIMSUM * @group fail19 + * + * @param mixed $expectedResult */ - public function testIMSUM() + public function testIMSUM($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'IMSUM'], $args); + $result = Engineering::IMSUM(...$args); $this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); } @@ -388,12 +388,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerERF + * + * @param mixed $expectedResult */ - public function testERF() + public function testERF($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'ERF'], $args); + $result = Engineering::ERF(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -404,12 +404,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerERFC + * + * @param mixed $expectedResult */ - public function testERFC() + public function testERFC($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'ERFC'], $args); + $result = Engineering::ERFC(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -420,12 +420,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerBIN2DEC + * + * @param mixed $expectedResult */ - public function testBIN2DEC() + public function testBIN2DEC($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'BINTODEC'], $args); + $result = Engineering::BINTODEC(...$args); $this->assertEquals($expectedResult, $result); } @@ -436,12 +436,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerBIN2HEX + * + * @param mixed $expectedResult */ - public function testBIN2HEX() + public function testBIN2HEX($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'BINTOHEX'], $args); + $result = Engineering::BINTOHEX(...$args); $this->assertEquals($expectedResult, $result); } @@ -452,12 +452,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerBIN2OCT + * + * @param mixed $expectedResult */ - public function testBIN2OCT() + public function testBIN2OCT($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'BINTOOCT'], $args); + $result = Engineering::BINTOOCT(...$args); $this->assertEquals($expectedResult, $result); } @@ -468,12 +468,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDEC2BIN + * + * @param mixed $expectedResult */ - public function testDEC2BIN() + public function testDEC2BIN($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'DECTOBIN'], $args); + $result = Engineering::DECTOBIN(...$args); $this->assertEquals($expectedResult, $result, null); } @@ -484,12 +484,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDEC2HEX + * + * @param mixed $expectedResult */ - public function testDEC2HEX() + public function testDEC2HEX($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'DECTOHEX'], $args); + $result = Engineering::DECTOHEX(...$args); $this->assertEquals($expectedResult, $result, null); } @@ -500,12 +500,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDEC2OCT + * + * @param mixed $expectedResult */ - public function testDEC2OCT() + public function testDEC2OCT($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'DECTOOCT'], $args); + $result = Engineering::DECTOOCT(...$args); $this->assertEquals($expectedResult, $result, null); } @@ -516,12 +516,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerHEX2BIN + * + * @param mixed $expectedResult */ - public function testHEX2BIN() + public function testHEX2BIN($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'HEXTOBIN'], $args); + $result = Engineering::HEXTOBIN(...$args); $this->assertEquals($expectedResult, $result, null); } @@ -532,12 +532,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerHEX2DEC + * + * @param mixed $expectedResult */ - public function testHEX2DEC() + public function testHEX2DEC($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'HEXTODEC'], $args); + $result = Engineering::HEXTODEC(...$args); $this->assertEquals($expectedResult, $result, null); } @@ -548,12 +548,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerHEX2OCT + * + * @param mixed $expectedResult */ - public function testHEX2OCT() + public function testHEX2OCT($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'HEXTOOCT'], $args); + $result = Engineering::HEXTOOCT(...$args); $this->assertEquals($expectedResult, $result, null); } @@ -564,12 +564,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerOCT2BIN + * + * @param mixed $expectedResult */ - public function testOCT2BIN() + public function testOCT2BIN($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'OCTTOBIN'], $args); + $result = Engineering::OCTTOBIN(...$args); $this->assertEquals($expectedResult, $result, null); } @@ -580,12 +580,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerOCT2DEC + * + * @param mixed $expectedResult */ - public function testOCT2DEC() + public function testOCT2DEC($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'OCTTODEC'], $args); + $result = Engineering::OCTTODEC(...$args); $this->assertEquals($expectedResult, $result, null); } @@ -596,12 +596,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerOCT2HEX + * + * @param mixed $expectedResult */ - public function testOCT2HEX() + public function testOCT2HEX($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'OCTTOHEX'], $args); + $result = Engineering::OCTTOHEX(...$args); $this->assertEquals($expectedResult, $result, null); } @@ -612,12 +612,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDELTA + * + * @param mixed $expectedResult */ - public function testDELTA() + public function testDELTA($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'DELTA'], $args); + $result = Engineering::DELTA(...$args); $this->assertEquals($expectedResult, $result, null); } @@ -628,12 +628,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerGESTEP + * + * @param mixed $expectedResult */ - public function testGESTEP() + public function testGESTEP($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'GESTEP'], $args); + $result = Engineering::GESTEP(...$args); $this->assertEquals($expectedResult, $result, null); } @@ -668,12 +668,12 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerCONVERTUOM + * + * @param mixed $expectedResult */ - public function testCONVERTUOM() + public function testCONVERTUOM($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Engineering::class, 'CONVERTUOM'], $args); + $result = Engineering::CONVERTUOM(...$args); $this->assertEquals($expectedResult, $result, null); } diff --git a/tests/PhpSpreadsheetTests/Calculation/FinancialTest.php b/tests/PhpSpreadsheetTests/Calculation/FinancialTest.php index 3390b1e1..b61ef6ae 100644 --- a/tests/PhpSpreadsheetTests/Calculation/FinancialTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/FinancialTest.php @@ -15,12 +15,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerACCRINT * @group fail19 + * + * @param mixed $expectedResult */ - public function testACCRINT() + public function testACCRINT($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'ACCRINT'], $args); + $result = Financial::ACCRINT(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -31,12 +31,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerACCRINTM + * + * @param mixed $expectedResult */ - public function testACCRINTM() + public function testACCRINTM($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'ACCRINTM'], $args); + $result = Financial::ACCRINTM(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -47,12 +47,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerAMORDEGRC + * + * @param mixed $expectedResult */ - public function testAMORDEGRC() + public function testAMORDEGRC($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'AMORDEGRC'], $args); + $result = Financial::AMORDEGRC(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -63,12 +63,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerAMORLINC + * + * @param mixed $expectedResult */ - public function testAMORLINC() + public function testAMORLINC($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'AMORLINC'], $args); + $result = Financial::AMORLINC(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -79,12 +79,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerCOUPDAYBS + * + * @param mixed $expectedResult */ - public function testCOUPDAYBS() + public function testCOUPDAYBS($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'COUPDAYBS'], $args); + $result = Financial::COUPDAYBS(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -95,12 +95,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerCOUPDAYS + * + * @param mixed $expectedResult */ - public function testCOUPDAYS() + public function testCOUPDAYS($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'COUPDAYS'], $args); + $result = Financial::COUPDAYS(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -111,12 +111,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerCOUPDAYSNC + * + * @param mixed $expectedResult */ - public function testCOUPDAYSNC() + public function testCOUPDAYSNC($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'COUPDAYSNC'], $args); + $result = Financial::COUPDAYSNC(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -127,12 +127,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerCOUPNCD + * + * @param mixed $expectedResult */ - public function testCOUPNCD() + public function testCOUPNCD($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'COUPNCD'], $args); + $result = Financial::COUPNCD(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -143,12 +143,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerCOUPNUM + * + * @param mixed $expectedResult */ - public function testCOUPNUM() + public function testCOUPNUM($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'COUPNUM'], $args); + $result = Financial::COUPNUM(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -159,12 +159,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerCOUPPCD + * + * @param mixed $expectedResult */ - public function testCOUPPCD() + public function testCOUPPCD($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'COUPPCD'], $args); + $result = Financial::COUPPCD(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -175,12 +175,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerCUMIPMT + * + * @param mixed $expectedResult */ - public function testCUMIPMT() + public function testCUMIPMT($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'CUMIPMT'], $args); + $result = Financial::CUMIPMT(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -191,12 +191,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerCUMPRINC + * + * @param mixed $expectedResult */ - public function testCUMPRINC() + public function testCUMPRINC($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'CUMPRINC'], $args); + $result = Financial::CUMPRINC(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -207,12 +207,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDB + * + * @param mixed $expectedResult */ - public function testDB() + public function testDB($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'DB'], $args); + $result = Financial::DB(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -223,12 +223,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDDB + * + * @param mixed $expectedResult */ - public function testDDB() + public function testDDB($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'DDB'], $args); + $result = Financial::DDB(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -239,12 +239,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDISC + * + * @param mixed $expectedResult */ - public function testDISC() + public function testDISC($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'DISC'], $args); + $result = Financial::DISC(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -255,12 +255,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDOLLARDE + * + * @param mixed $expectedResult */ - public function testDOLLARDE() + public function testDOLLARDE($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'DOLLARDE'], $args); + $result = Financial::DOLLARDE(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -271,12 +271,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDOLLARFR + * + * @param mixed $expectedResult */ - public function testDOLLARFR() + public function testDOLLARFR($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'DOLLARFR'], $args); + $result = Financial::DOLLARFR(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -287,12 +287,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerEFFECT + * + * @param mixed $expectedResult */ - public function testEFFECT() + public function testEFFECT($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'EFFECT'], $args); + $result = Financial::EFFECT(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -303,12 +303,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerFV + * + * @param mixed $expectedResult */ - public function testFV() + public function testFV($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'FV'], $args); + $result = Financial::FV(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -319,12 +319,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerFVSCHEDULE + * + * @param mixed $expectedResult */ - public function testFVSCHEDULE() + public function testFVSCHEDULE($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'FVSCHEDULE'], $args); + $result = Financial::FVSCHEDULE(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -335,12 +335,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerINTRATE + * + * @param mixed $expectedResult */ - public function testINTRATE() + public function testINTRATE($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'INTRATE'], $args); + $result = Financial::INTRATE(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -351,12 +351,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIPMT + * + * @param mixed $expectedResult */ - public function testIPMT() + public function testIPMT($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'IPMT'], $args); + $result = Financial::IPMT(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -367,12 +367,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIRR + * + * @param mixed $expectedResult */ - public function testIRR() + public function testIRR($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'IRR'], $args); + $result = Financial::IRR(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -383,12 +383,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerISPMT + * + * @param mixed $expectedResult */ - public function testISPMT() + public function testISPMT($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'ISPMT'], $args); + $result = Financial::ISPMT(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -399,12 +399,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerMIRR + * + * @param mixed $expectedResult */ - public function testMIRR() + public function testMIRR($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'MIRR'], $args); + $result = Financial::MIRR(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -415,12 +415,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerNOMINAL + * + * @param mixed $expectedResult */ - public function testNOMINAL() + public function testNOMINAL($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'NOMINAL'], $args); + $result = Financial::NOMINAL(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -431,12 +431,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerNPER + * + * @param mixed $expectedResult */ - public function testNPER() + public function testNPER($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'NPER'], $args); + $result = Financial::NPER(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -447,12 +447,12 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerNPV + * + * @param mixed $expectedResult */ - public function testNPV() + public function testNPV($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'NPV'], $args); + $result = Financial::NPV(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -464,14 +464,14 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerPRICE * @group fail19 + * + * @param mixed $expectedResult */ - public function testPRICE() + public function testPRICE($expectedResult, ...$args) { $this->markTestIncomplete('TODO: This test should be fixed'); - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'PRICE'], $args); + $result = Financial::PRICE(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -483,14 +483,14 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerRATE * @group fail19 + * + * @param mixed $expectedResult */ - public function testRATE() + public function testRATE($expectedResult, ...$args) { $this->markTestIncomplete('TODO: This test should be fixed'); - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'RATE'], $args); + $result = Financial::RATE(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -502,14 +502,14 @@ class FinancialTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerXIRR * @group fail19 + * + * @param mixed $expectedResult */ - public function testXIRR() + public function testXIRR($expectedResult, ...$args) { $this->markTestIncomplete('TODO: This test should be fixed'); - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Financial::class, 'XIRR'], $args); + $result = Financial::XIRR(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } diff --git a/tests/PhpSpreadsheetTests/Calculation/FunctionsTest.php b/tests/PhpSpreadsheetTests/Calculation/FunctionsTest.php index 960c9d0e..2f6aaa06 100644 --- a/tests/PhpSpreadsheetTests/Calculation/FunctionsTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/FunctionsTest.php @@ -61,12 +61,12 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIsBlank + * + * @param mixed $expectedResult */ - public function testIsBlank() + public function testIsBlank($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Functions::class, 'isBlank'], $args); + $result = Functions::isBlank(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -77,12 +77,12 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIsErr + * + * @param mixed $expectedResult */ - public function testIsErr() + public function testIsErr($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Functions::class, 'isErr'], $args); + $result = Functions::isErr(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -93,12 +93,12 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIsError + * + * @param mixed $expectedResult */ - public function testIsError() + public function testIsError($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Functions::class, 'isError'], $args); + $result = Functions::isError(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -109,12 +109,12 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerErrorType + * + * @param mixed $expectedResult */ - public function testErrorType() + public function testErrorType($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Functions::class, 'errorType'], $args); + $result = Functions::errorType(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -125,12 +125,12 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIsLogical + * + * @param mixed $expectedResult */ - public function testIsLogical() + public function testIsLogical($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Functions::class, 'isLogical'], $args); + $result = Functions::isLogical(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -141,12 +141,12 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIsNa + * + * @param mixed $expectedResult */ - public function testIsNa() + public function testIsNa($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Functions::class, 'isNa'], $args); + $result = Functions::isNa(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -157,12 +157,12 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIsNumber + * + * @param mixed $expectedResult */ - public function testIsNumber() + public function testIsNumber($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Functions::class, 'isNumber'], $args); + $result = Functions::isNumber(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -173,12 +173,12 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIsText + * + * @param mixed $expectedResult */ - public function testIsText() + public function testIsText($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Functions::class, 'isText'], $args); + $result = Functions::isText(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -189,12 +189,12 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIsNonText + * + * @param mixed $expectedResult */ - public function testIsNonText() + public function testIsNonText($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Functions::class, 'isNonText'], $args); + $result = Functions::isNonText(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -205,12 +205,12 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIsEven + * + * @param mixed $expectedResult */ - public function testIsEven() + public function testIsEven($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Functions::class, 'isEven'], $args); + $result = Functions::isEven(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -221,12 +221,12 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIsOdd + * + * @param mixed $expectedResult */ - public function testIsOdd() + public function testIsOdd($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Functions::class, 'isOdd'], $args); + $result = Functions::isOdd(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -237,12 +237,12 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerTYPE + * + * @param mixed $expectedResult */ - public function testTYPE() + public function testTYPE($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Functions::class, 'TYPE'], $args); + $result = Functions::TYPE(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -253,12 +253,12 @@ class FunctionsTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerN + * + * @param mixed $expectedResult */ - public function testN() + public function testN($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Functions::class, 'n'], $args); + $result = Functions::n(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } diff --git a/tests/PhpSpreadsheetTests/Calculation/LogicalTest.php b/tests/PhpSpreadsheetTests/Calculation/LogicalTest.php index 64481ebe..ab9cf4fd 100644 --- a/tests/PhpSpreadsheetTests/Calculation/LogicalTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/LogicalTest.php @@ -26,12 +26,12 @@ class LogicalTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerAND + * + * @param mixed $expectedResult */ - public function testAND() + public function testAND($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Logical::class, 'logicalAnd'], $args); + $result = Logical::logicalAnd(...$args); $this->assertEquals($expectedResult, $result); } @@ -42,12 +42,12 @@ class LogicalTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerOR + * + * @param mixed $expectedResult */ - public function testOR() + public function testOR($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Logical::class, 'logicalOr'], $args); + $result = Logical::logicalOr(...$args); $this->assertEquals($expectedResult, $result); } @@ -58,12 +58,12 @@ class LogicalTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerNOT + * + * @param mixed $expectedResult */ - public function testNOT() + public function testNOT($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Logical::class, 'NOT'], $args); + $result = Logical::NOT(...$args); $this->assertEquals($expectedResult, $result); } @@ -74,12 +74,12 @@ class LogicalTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIF + * + * @param mixed $expectedResult */ - public function testIF() + public function testIF($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Logical::class, 'statementIf'], $args); + $result = Logical::statementIf(...$args); $this->assertEquals($expectedResult, $result); } @@ -90,12 +90,12 @@ class LogicalTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIFERROR + * + * @param mixed $expectedResult */ - public function testIFERROR() + public function testIFERROR($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Logical::class, 'IFERROR'], $args); + $result = Logical::IFERROR(...$args); $this->assertEquals($expectedResult, $result); } diff --git a/tests/PhpSpreadsheetTests/Calculation/LookupRefTest.php b/tests/PhpSpreadsheetTests/Calculation/LookupRefTest.php index 09487797..c7e82139 100644 --- a/tests/PhpSpreadsheetTests/Calculation/LookupRefTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/LookupRefTest.php @@ -18,12 +18,12 @@ class LookupRefTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerHLOOKUP * @group fail19 + * + * @param mixed $expectedResult */ - public function testHLOOKUP() + public function testHLOOKUP($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([LookupRef::class, 'HLOOKUP'], $args); + $result = LookupRef::HLOOKUP(...$args); $this->assertEquals($expectedResult, $result); } @@ -35,12 +35,12 @@ class LookupRefTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerVLOOKUP * @group fail19 + * + * @param mixed $expectedResult */ - public function testVLOOKUP() + public function testVLOOKUP($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([LookupRef::class, 'VLOOKUP'], $args); + $result = LookupRef::VLOOKUP(...$args); $this->assertEquals($expectedResult, $result); } diff --git a/tests/PhpSpreadsheetTests/Calculation/MathTrigTest.php b/tests/PhpSpreadsheetTests/Calculation/MathTrigTest.php index 429b7d0c..518250fa 100644 --- a/tests/PhpSpreadsheetTests/Calculation/MathTrigTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/MathTrigTest.php @@ -15,12 +15,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerATAN2 + * + * @param mixed $expectedResult */ - public function testATAN2() + public function testATAN2($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'ATAN2'], $args); + $result = MathTrig::ATAN2(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -31,12 +31,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerCEILING + * + * @param mixed $expectedResult */ - public function testCEILING() + public function testCEILING($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'CEILING'], $args); + $result = MathTrig::CEILING(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -47,12 +47,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerCOMBIN + * + * @param mixed $expectedResult */ - public function testCOMBIN() + public function testCOMBIN($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'COMBIN'], $args); + $result = MathTrig::COMBIN(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -63,12 +63,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerEVEN + * + * @param mixed $expectedResult */ - public function testEVEN() + public function testEVEN($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'EVEN'], $args); + $result = MathTrig::EVEN(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -79,12 +79,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerODD + * + * @param mixed $expectedResult */ - public function testODD() + public function testODD($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'ODD'], $args); + $result = MathTrig::ODD(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -95,12 +95,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerFACT + * + * @param mixed $expectedResult */ - public function testFACT() + public function testFACT($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'FACT'], $args); + $result = MathTrig::FACT(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -111,12 +111,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerFACTDOUBLE + * + * @param mixed $expectedResult */ - public function testFACTDOUBLE() + public function testFACTDOUBLE($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'FACTDOUBLE'], $args); + $result = MathTrig::FACTDOUBLE(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -127,12 +127,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerFLOOR + * + * @param mixed $expectedResult */ - public function testFLOOR() + public function testFLOOR($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'FLOOR'], $args); + $result = MathTrig::FLOOR(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -143,12 +143,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerGCD + * + * @param mixed $expectedResult */ - public function testGCD() + public function testGCD($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'GCD'], $args); + $result = MathTrig::GCD(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -159,12 +159,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerLCM + * + * @param mixed $expectedResult */ - public function testLCM() + public function testLCM($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'LCM'], $args); + $result = MathTrig::LCM(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -175,12 +175,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerINT + * + * @param mixed $expectedResult */ - public function testINT() + public function testINT($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'INT'], $args); + $result = MathTrig::INT(...$args); $this->assertEquals($expectedResult, $result); } @@ -191,12 +191,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerSIGN + * + * @param mixed $expectedResult */ - public function testSIGN() + public function testSIGN($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'SIGN'], $args); + $result = MathTrig::SIGN(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -207,12 +207,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerPOWER + * + * @param mixed $expectedResult */ - public function testPOWER() + public function testPOWER($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'POWER'], $args); + $result = MathTrig::POWER(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -223,12 +223,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerLOG + * + * @param mixed $expectedResult */ - public function testLOG() + public function testLOG($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'logBase'], $args); + $result = MathTrig::logBase(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -239,12 +239,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerMOD + * + * @param mixed $expectedResult */ - public function testMOD() + public function testMOD($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'MOD'], $args); + $result = MathTrig::MOD(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -255,12 +255,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerMDETERM + * + * @param mixed $expectedResult */ - public function testMDETERM() + public function testMDETERM($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'MDETERM'], $args); + $result = MathTrig::MDETERM(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -272,14 +272,14 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerMINVERSE * @group fail19 + * + * @param mixed $expectedResult */ - public function testMINVERSE() + public function testMINVERSE($expectedResult, ...$args) { $this->markTestIncomplete('TODO: This test should be fixed'); - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'MINVERSE'], $args); + $result = MathTrig::MINVERSE(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -291,14 +291,14 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerMMULT * @group fail19 + * + * @param mixed $expectedResult */ - public function testMMULT() + public function testMMULT($expectedResult, ...$args) { $this->markTestIncomplete('TODO: This test should be fixed'); - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'MMULT'], $args); + $result = MathTrig::MMULT(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -309,12 +309,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerMULTINOMIAL + * + * @param mixed $expectedResult */ - public function testMULTINOMIAL() + public function testMULTINOMIAL($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'MULTINOMIAL'], $args); + $result = MathTrig::MULTINOMIAL(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -325,13 +325,13 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerMROUND + * + * @param mixed $expectedResult */ - public function testMROUND() + public function testMROUND($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); Calculation::setArrayReturnType(Calculation::RETURN_ARRAY_AS_VALUE); - $result = call_user_func_array([MathTrig::class, 'MROUND'], $args); + $result = MathTrig::MROUND(...$args); Calculation::setArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -343,12 +343,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerPRODUCT + * + * @param mixed $expectedResult */ - public function testPRODUCT() + public function testPRODUCT($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'PRODUCT'], $args); + $result = MathTrig::PRODUCT(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -359,12 +359,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerQUOTIENT + * + * @param mixed $expectedResult */ - public function testQUOTIENT() + public function testQUOTIENT($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'QUOTIENT'], $args); + $result = MathTrig::QUOTIENT(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -375,12 +375,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerROUNDUP + * + * @param mixed $expectedResult */ - public function testROUNDUP() + public function testROUNDUP($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'ROUNDUP'], $args); + $result = MathTrig::ROUNDUP(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -391,12 +391,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerROUNDDOWN + * + * @param mixed $expectedResult */ - public function testROUNDDOWN() + public function testROUNDDOWN($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'ROUNDDOWN'], $args); + $result = MathTrig::ROUNDDOWN(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -407,12 +407,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerSERIESSUM + * + * @param mixed $expectedResult */ - public function testSERIESSUM() + public function testSERIESSUM($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'SERIESSUM'], $args); + $result = MathTrig::SERIESSUM(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -423,12 +423,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerSUMSQ + * + * @param mixed $expectedResult */ - public function testSUMSQ() + public function testSUMSQ($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'SUMSQ'], $args); + $result = MathTrig::SUMSQ(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -439,12 +439,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerTRUNC + * + * @param mixed $expectedResult */ - public function testTRUNC() + public function testTRUNC($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'TRUNC'], $args); + $result = MathTrig::TRUNC(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -455,12 +455,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerROMAN + * + * @param mixed $expectedResult */ - public function testROMAN() + public function testROMAN($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'ROMAN'], $args); + $result = MathTrig::ROMAN(...$args); $this->assertEquals($expectedResult, $result); } @@ -471,12 +471,12 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerSQRTPI + * + * @param mixed $expectedResult */ - public function testSQRTPI() + public function testSQRTPI($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'SQRTPI'], $args); + $result = MathTrig::SQRTPI(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -487,75 +487,17 @@ class MathTrigTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerSUMIF + * + * @param mixed $expectedResult */ - public function testSUMIF() + public function testSUMIF($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([MathTrig::class, 'SUMIF'], $args); + $result = MathTrig::SUMIF(...$args); $this->assertEquals($expectedResult, $result, null, 1E-12); } public function providerSUMIF() { - return [ - [ - [ - [1], - [5], - [10], - ], - '>=5', - 15, - ], - [ - [ - ['text'], - [2], - ], - '=text', - [ - [10], - [100], - ], - 10, - ], - [ - [ - ['"text with quotes"'], - [2], - ], - '="text with quotes"', - [ - [10], - [100], - ], - 10, - ], - [ - [ - ['"text with quotes"'], - [''], - ], - '>"', // Compare to the single characater " (double quote) - [ - [10], - [100], - ], - 10, - ], - [ - [ - [''], - ['anything'], - ], - '>"', // Compare to the single characater " (double quote) - [ - [10], - [100], - ], - 100, - ], - ]; + return require 'data/Calculation/MathTrig/SUMIF.php'; } } diff --git a/tests/PhpSpreadsheetTests/Calculation/TextDataTest.php b/tests/PhpSpreadsheetTests/Calculation/TextDataTest.php index 1cdc32f6..e4c06b2d 100644 --- a/tests/PhpSpreadsheetTests/Calculation/TextDataTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/TextDataTest.php @@ -15,12 +15,12 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerCHAR + * + * @param mixed $expectedResult */ - public function testCHAR() + public function testCHAR($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'CHARACTER'], $args); + $result = TextData::CHARACTER(...$args); $this->assertEquals($expectedResult, $result); } @@ -31,12 +31,12 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerCODE + * + * @param mixed $expectedResult */ - public function testCODE() + public function testCODE($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'ASCIICODE'], $args); + $result = TextData::ASCIICODE(...$args); $this->assertEquals($expectedResult, $result); } @@ -47,12 +47,12 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerCONCATENATE + * + * @param mixed $expectedResult */ - public function testCONCATENATE() + public function testCONCATENATE($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'CONCATENATE'], $args); + $result = TextData::CONCATENATE(...$args); $this->assertEquals($expectedResult, $result); } @@ -63,12 +63,12 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerLEFT + * + * @param mixed $expectedResult */ - public function testLEFT() + public function testLEFT($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'LEFT'], $args); + $result = TextData::LEFT(...$args); $this->assertEquals($expectedResult, $result); } @@ -79,12 +79,12 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerMID + * + * @param mixed $expectedResult */ - public function testMID() + public function testMID($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'MID'], $args); + $result = TextData::MID(...$args); $this->assertEquals($expectedResult, $result); } @@ -95,12 +95,12 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerRIGHT + * + * @param mixed $expectedResult */ - public function testRIGHT() + public function testRIGHT($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'RIGHT'], $args); + $result = TextData::RIGHT(...$args); $this->assertEquals($expectedResult, $result); } @@ -111,12 +111,12 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerLOWER + * + * @param mixed $expectedResult */ - public function testLOWER() + public function testLOWER($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'LOWERCASE'], $args); + $result = TextData::LOWERCASE(...$args); $this->assertEquals($expectedResult, $result); } @@ -127,12 +127,12 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerUPPER + * + * @param mixed $expectedResult */ - public function testUPPER() + public function testUPPER($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'UPPERCASE'], $args); + $result = TextData::UPPERCASE(...$args); $this->assertEquals($expectedResult, $result); } @@ -143,12 +143,12 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerPROPER + * + * @param mixed $expectedResult */ - public function testPROPER() + public function testPROPER($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'PROPERCASE'], $args); + $result = TextData::PROPERCASE(...$args); $this->assertEquals($expectedResult, $result); } @@ -159,12 +159,12 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerLEN + * + * @param mixed $expectedResult */ - public function testLEN() + public function testLEN($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'STRINGLENGTH'], $args); + $result = TextData::STRINGLENGTH(...$args); $this->assertEquals($expectedResult, $result); } @@ -175,12 +175,12 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerSEARCH + * + * @param mixed $expectedResult */ - public function testSEARCH() + public function testSEARCH($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'SEARCHINSENSITIVE'], $args); + $result = TextData::SEARCHINSENSITIVE(...$args); $this->assertEquals($expectedResult, $result); } @@ -191,12 +191,12 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerFIND + * + * @param mixed $expectedResult */ - public function testFIND() + public function testFIND($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'SEARCHSENSITIVE'], $args); + $result = TextData::SEARCHSENSITIVE(...$args); $this->assertEquals($expectedResult, $result); } @@ -207,12 +207,12 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerREPLACE + * + * @param mixed $expectedResult */ - public function testREPLACE() + public function testREPLACE($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'REPLACE'], $args); + $result = TextData::REPLACE(...$args); $this->assertEquals($expectedResult, $result); } @@ -223,12 +223,12 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerSUBSTITUTE + * + * @param mixed $expectedResult */ - public function testSUBSTITUTE() + public function testSUBSTITUTE($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'SUBSTITUTE'], $args); + $result = TextData::SUBSTITUTE(...$args); $this->assertEquals($expectedResult, $result); } @@ -239,12 +239,12 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerTRIM + * + * @param mixed $expectedResult */ - public function testTRIM() + public function testTRIM($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'TRIMSPACES'], $args); + $result = TextData::TRIMSPACES(...$args); $this->assertEquals($expectedResult, $result); } @@ -255,12 +255,12 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerCLEAN + * + * @param mixed $expectedResult */ - public function testCLEAN() + public function testCLEAN($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'TRIMNONPRINTABLE'], $args); + $result = TextData::TRIMNONPRINTABLE(...$args); $this->assertEquals($expectedResult, $result); } @@ -271,12 +271,12 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDOLLAR + * + * @param mixed $expectedResult */ - public function testDOLLAR() + public function testDOLLAR($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'DOLLAR'], $args); + $result = TextData::DOLLAR(...$args); $this->assertEquals($expectedResult, $result); } @@ -287,12 +287,12 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerFIXED + * + * @param mixed $expectedResult */ - public function testFIXED() + public function testFIXED($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'FIXEDFORMAT'], $args); + $result = TextData::FIXEDFORMAT(...$args); $this->assertEquals($expectedResult, $result); } @@ -303,12 +303,12 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerT + * + * @param mixed $expectedResult */ - public function testT() + public function testT($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'RETURNSTRING'], $args); + $result = TextData::RETURNSTRING(...$args); $this->assertEquals($expectedResult, $result); } @@ -319,17 +319,17 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerTEXT + * + * @param mixed $expectedResult */ - public function testTEXT() + public function testTEXT($expectedResult, ...$args) { // Enforce decimal and thousands separator values to UK/US, and currency code to USD StringHelper::setDecimalSeparator('.'); StringHelper::setThousandsSeparator(','); StringHelper::setCurrencyCode('$'); - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'TEXTFORMAT'], $args); + $result = TextData::TEXTFORMAT(...$args); $this->assertEquals($expectedResult, $result); } @@ -340,16 +340,16 @@ class TextDataTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerVALUE + * + * @param mixed $expectedResult */ - public function testVALUE() + public function testVALUE($expectedResult, ...$args) { StringHelper::setDecimalSeparator('.'); StringHelper::setThousandsSeparator(' '); StringHelper::setCurrencyCode('$'); - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([TextData::class, 'VALUE'], $args); + $result = TextData::VALUE(...$args); $this->assertEquals($expectedResult, $result, null, 1E-8); } diff --git a/tests/PhpSpreadsheetTests/Cell/DefaultValueBinderTest.php b/tests/PhpSpreadsheetTests/Cell/DefaultValueBinderTest.php index 48c4bfcb..95cf6861 100644 --- a/tests/PhpSpreadsheetTests/Cell/DefaultValueBinderTest.php +++ b/tests/PhpSpreadsheetTests/Cell/DefaultValueBinderTest.php @@ -64,11 +64,12 @@ class DefaultValueBinderTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDataTypeForValue + * + * @param mixed $expectedResult */ - public function testDataTypeForValue() + public function testDataTypeForValue($expectedResult, ...$args) { - list($args, $expectedResult) = func_get_args(); - $result = call_user_func_array([DefaultValueBinder::class, 'dataTypeForValue'], $args); + $result = DefaultValueBinder::dataTypeForValue(...$args); $this->assertEquals($expectedResult, $result); } diff --git a/tests/PhpSpreadsheetTests/CellTest.php b/tests/PhpSpreadsheetTests/CellTest.php index 937d5dff..d6961621 100644 --- a/tests/PhpSpreadsheetTests/CellTest.php +++ b/tests/PhpSpreadsheetTests/CellTest.php @@ -9,12 +9,12 @@ class CellTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider providerColumnString + * + * @param mixed $expectedResult */ - public function testColumnIndexFromString() + public function testColumnIndexFromString($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Cell::class, 'columnIndexFromString'], $args); + $result = Cell::columnIndexFromString(...$args); $this->assertEquals($expectedResult, $result); } @@ -53,12 +53,12 @@ class CellTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerColumnIndex + * + * @param mixed $expectedResult */ - public function testStringFromColumnIndex() + public function testStringFromColumnIndex($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Cell::class, 'stringFromColumnIndex'], $args); + $result = Cell::stringFromColumnIndex(...$args); $this->assertEquals($expectedResult, $result); } @@ -69,12 +69,12 @@ class CellTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerCoordinates + * + * @param mixed $expectedResult */ - public function testCoordinateFromString() + public function testCoordinateFromString($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Cell::class, 'coordinateFromString'], $args); + $result = Cell::coordinateFromString(...$args); $this->assertEquals($expectedResult, $result); } @@ -127,12 +127,12 @@ class CellTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerAbsoluteCoordinates + * + * @param mixed $expectedResult */ - public function testAbsoluteCoordinateFromString() + public function testAbsoluteCoordinateFromString($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Cell::class, 'absoluteCoordinate'], $args); + $result = Cell::absoluteCoordinate(...$args); $this->assertEquals($expectedResult, $result); } @@ -157,12 +157,12 @@ class CellTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerAbsoluteReferences + * + * @param mixed $expectedResult */ - public function testAbsoluteReferenceFromString() + public function testAbsoluteReferenceFromString($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Cell::class, 'absoluteReference'], $args); + $result = Cell::absoluteReference(...$args); $this->assertEquals($expectedResult, $result); } @@ -187,12 +187,12 @@ class CellTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerSplitRange + * + * @param mixed $expectedResult */ - public function testSplitRange() + public function testSplitRange($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Cell::class, 'splitRange'], $args); + $result = Cell::splitRange(...$args); foreach ($result as $key => $split) { if (!is_array($expectedResult[$key])) { $this->assertEquals($expectedResult[$key], $split[0]); @@ -209,12 +209,12 @@ class CellTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerBuildRange + * + * @param mixed $expectedResult */ - public function testBuildRange() + public function testBuildRange($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Cell::class, 'buildRange'], $args); + $result = Cell::buildRange(...$args); $this->assertEquals($expectedResult, $result); } @@ -239,12 +239,12 @@ class CellTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerRangeBoundaries + * + * @param mixed $expectedResult */ - public function testRangeBoundaries() + public function testRangeBoundaries($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Cell::class, 'rangeBoundaries'], $args); + $result = Cell::rangeBoundaries(...$args); $this->assertEquals($expectedResult, $result); } @@ -255,12 +255,12 @@ class CellTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerRangeDimension + * + * @param mixed $expectedResult */ - public function testRangeDimension() + public function testRangeDimension($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Cell::class, 'rangeDimension'], $args); + $result = Cell::rangeDimension(...$args); $this->assertEquals($expectedResult, $result); } @@ -271,12 +271,12 @@ class CellTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerGetRangeBoundaries + * + * @param mixed $expectedResult */ - public function testGetRangeBoundaries() + public function testGetRangeBoundaries($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Cell::class, 'getRangeBoundaries'], $args); + $result = Cell::getRangeBoundaries(...$args); $this->assertEquals($expectedResult, $result); } @@ -287,12 +287,12 @@ class CellTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerExtractAllCellReferencesInRange + * + * @param mixed $expectedResult */ - public function testExtractAllCellReferencesInRange() + public function testExtractAllCellReferencesInRange($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Cell::class, 'extractAllCellReferencesInRange'], $args); + $result = Cell::extractAllCellReferencesInRange(...$args); $this->assertEquals($expectedResult, $result); } diff --git a/tests/PhpSpreadsheetTests/SettingsTest.php b/tests/PhpSpreadsheetTests/SettingsTest.php index 902f1788..51ff8f1b 100644 --- a/tests/PhpSpreadsheetTests/SettingsTest.php +++ b/tests/PhpSpreadsheetTests/SettingsTest.php @@ -16,7 +16,7 @@ class SettingsTest extends \PHPUnit_Framework_TestCase public function testSetXMLSettings() { - call_user_func_array([\PhpOffice\PhpSpreadsheet\Settings::class, 'setLibXmlLoaderOptions'], [LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID]); + \PhpOffice\PhpSpreadsheet\Settings::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID); $result = \PhpOffice\PhpSpreadsheet\Settings::getLibXmlLoaderOptions(); $this->assertTrue((bool) ((LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID) & $result)); } diff --git a/tests/PhpSpreadsheetTests/Shared/CodePageTest.php b/tests/PhpSpreadsheetTests/Shared/CodePageTest.php index 7598e655..337b8ed4 100644 --- a/tests/PhpSpreadsheetTests/Shared/CodePageTest.php +++ b/tests/PhpSpreadsheetTests/Shared/CodePageTest.php @@ -9,12 +9,12 @@ class CodePageTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider providerCodePage + * + * @param mixed $expectedResult */ - public function testCodePageNumberToName() + public function testCodePageNumberToName($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([CodePage::class, 'numberToName'], $args); + $result = CodePage::numberToName(...$args); $this->assertEquals($expectedResult, $result); } diff --git a/tests/PhpSpreadsheetTests/Shared/DateTest.php b/tests/PhpSpreadsheetTests/Shared/DateTest.php index 9630460d..0439cf60 100644 --- a/tests/PhpSpreadsheetTests/Shared/DateTest.php +++ b/tests/PhpSpreadsheetTests/Shared/DateTest.php @@ -28,14 +28,14 @@ class DateTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDateTimeExcelToTimestamp1900 + * + * @param mixed $expectedResult */ - public function testDateTimeExcelToTimestamp1900() + public function testDateTimeExcelToTimestamp1900($expectedResult, ...$args) { Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Date::class, 'excelToTimestamp'], $args); + $result = Date::excelToTimestamp(...$args); $this->assertEquals($expectedResult, $result); } @@ -46,14 +46,14 @@ class DateTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDateTimeTimestampToExcel1900 + * + * @param mixed $expectedResult */ - public function testDateTimeTimestampToExcel1900() + public function testDateTimeTimestampToExcel1900($expectedResult, ...$args) { Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Date::class, 'timestampToExcel'], $args); + $result = Date::timestampToExcel(...$args); $this->assertEquals($expectedResult, $result, null, 1E-5); } @@ -64,14 +64,14 @@ class DateTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDateTimeDateTimeToExcel + * + * @param mixed $expectedResult */ - public function testDateTimeDateTimeToExcel() + public function testDateTimeDateTimeToExcel($expectedResult, ...$args) { Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Date::class, 'dateTimeToExcel'], $args); + $result = Date::dateTimeToExcel(...$args); $this->assertEquals($expectedResult, $result, null, 1E-5); } @@ -82,14 +82,14 @@ class DateTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDateTimeFormattedPHPToExcel1900 + * + * @param mixed $expectedResult */ - public function testDateTimeFormattedPHPToExcel1900() + public function testDateTimeFormattedPHPToExcel1900($expectedResult, ...$args) { Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Date::class, 'formattedPHPToExcel'], $args); + $result = Date::formattedPHPToExcel(...$args); $this->assertEquals($expectedResult, $result, null, 1E-5); } @@ -100,14 +100,14 @@ class DateTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDateTimeExcelToTimestamp1904 + * + * @param mixed $expectedResult */ - public function testDateTimeExcelToTimestamp1904() + public function testDateTimeExcelToTimestamp1904($expectedResult, ...$args) { Date::setExcelCalendar(Date::CALENDAR_MAC_1904); - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Date::class, 'excelToTimestamp'], $args); + $result = Date::excelToTimestamp(...$args); $this->assertEquals($expectedResult, $result); } @@ -118,14 +118,14 @@ class DateTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDateTimeTimestampToExcel1904 + * + * @param mixed $expectedResult */ - public function testDateTimeTimestampToExcel1904() + public function testDateTimeTimestampToExcel1904($expectedResult, ...$args) { Date::setExcelCalendar(Date::CALENDAR_MAC_1904); - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Date::class, 'timestampToExcel'], $args); + $result = Date::timestampToExcel(...$args); $this->assertEquals($expectedResult, $result, null, 1E-5); } @@ -136,12 +136,12 @@ class DateTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerIsDateTimeFormatCode + * + * @param mixed $expectedResult */ - public function testIsDateTimeFormatCode() + public function testIsDateTimeFormatCode($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Date::class, 'isDateTimeFormatCode'], $args); + $result = Date::isDateTimeFormatCode(...$args); $this->assertEquals($expectedResult, $result); } @@ -152,14 +152,14 @@ class DateTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerDateTimeExcelToTimestamp1900Timezone + * + * @param mixed $expectedResult */ - public function testDateTimeExcelToTimestamp1900Timezone() + public function testDateTimeExcelToTimestamp1900Timezone($expectedResult, ...$args) { Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Date::class, 'excelToTimestamp'], $args); + $result = Date::excelToTimestamp(...$args); $this->assertEquals($expectedResult, $result); } diff --git a/tests/PhpSpreadsheetTests/Shared/FontTest.php b/tests/PhpSpreadsheetTests/Shared/FontTest.php index 161bc15a..c104cb14 100644 --- a/tests/PhpSpreadsheetTests/Shared/FontTest.php +++ b/tests/PhpSpreadsheetTests/Shared/FontTest.php @@ -37,12 +37,12 @@ class FontTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerFontSizeToPixels + * + * @param mixed $expectedResult */ - public function testFontSizeToPixels() + public function testFontSizeToPixels($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Font::class, 'fontSizeToPixels'], $args); + $result = Font::fontSizeToPixels(...$args); $this->assertEquals($expectedResult, $result); } @@ -53,12 +53,12 @@ class FontTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerInchSizeToPixels + * + * @param mixed $expectedResult */ - public function testInchSizeToPixels() + public function testInchSizeToPixels($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Font::class, 'inchSizeToPixels'], $args); + $result = Font::inchSizeToPixels(...$args); $this->assertEquals($expectedResult, $result); } @@ -69,12 +69,12 @@ class FontTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerCentimeterSizeToPixels + * + * @param mixed $expectedResult */ - public function testCentimeterSizeToPixels() + public function testCentimeterSizeToPixels($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Font::class, 'centimeterSizeToPixels'], $args); + $result = Font::centimeterSizeToPixels(...$args); $this->assertEquals($expectedResult, $result); } diff --git a/tests/PhpSpreadsheetTests/Shared/PasswordHasherTest.php b/tests/PhpSpreadsheetTests/Shared/PasswordHasherTest.php index 899cb8bf..444883cb 100644 --- a/tests/PhpSpreadsheetTests/Shared/PasswordHasherTest.php +++ b/tests/PhpSpreadsheetTests/Shared/PasswordHasherTest.php @@ -9,12 +9,12 @@ class PasswordHasherTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerHashPassword * @group fail19 + * + * @param mixed $expectedResult */ - public function testHashPassword() + public function testHashPassword($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([PasswordHasher::class, 'hashPassword'], $args); + $result = PasswordHasher::hashPassword(...$args); $this->assertEquals($expectedResult, $result); } diff --git a/tests/PhpSpreadsheetTests/Style/ColorTest.php b/tests/PhpSpreadsheetTests/Style/ColorTest.php index ff95983c..8dca92f1 100644 --- a/tests/PhpSpreadsheetTests/Style/ColorTest.php +++ b/tests/PhpSpreadsheetTests/Style/ColorTest.php @@ -8,12 +8,12 @@ class ColorTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider providerColorGetRed + * + * @param mixed $expectedResult */ - public function testGetRed() + public function testGetRed($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Color::class, 'getRed'], $args); + $result = Color::getRed(...$args); $this->assertEquals($expectedResult, $result); } @@ -24,12 +24,12 @@ class ColorTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerColorGetGreen + * + * @param mixed $expectedResult */ - public function testGetGreen() + public function testGetGreen($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Color::class, 'getGreen'], $args); + $result = Color::getGreen(...$args); $this->assertEquals($expectedResult, $result); } @@ -40,12 +40,12 @@ class ColorTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerColorGetBlue + * + * @param mixed $expectedResult */ - public function testGetBlue() + public function testGetBlue($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([Color::class, 'getBlue'], $args); + $result = Color::getBlue(...$args); $this->assertEquals($expectedResult, $result); } @@ -56,11 +56,12 @@ class ColorTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerColorChangeBrightness + * + * @param mixed $expectedResult */ - public function testChangeBrightness() + public function testChangeBrightness($expectedResult, ...$args) { - list($args, $expectedResult) = func_get_args(); - $result = call_user_func_array([Color::class, 'changeBrightness'], $args); + $result = Color::changeBrightness(...$args); $this->assertEquals($expectedResult, $result); } diff --git a/tests/PhpSpreadsheetTests/Style/NumberFormatDateTest.php b/tests/PhpSpreadsheetTests/Style/NumberFormatDateTest.php index 4ec64901..01c51c59 100644 --- a/tests/PhpSpreadsheetTests/Style/NumberFormatDateTest.php +++ b/tests/PhpSpreadsheetTests/Style/NumberFormatDateTest.php @@ -15,12 +15,12 @@ class NumberFormatDateTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerNumberFormat + * + * @param mixed $expectedResult */ - public function testFormatValueWithMask() + public function testFormatValueWithMask($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([NumberFormat::class, 'toFormattedString'], $args); + $result = NumberFormat::toFormattedString(...$args); $this->assertEquals($expectedResult, $result); } diff --git a/tests/PhpSpreadsheetTests/Style/NumberFormatTest.php b/tests/PhpSpreadsheetTests/Style/NumberFormatTest.php index 05f6128f..d900962a 100644 --- a/tests/PhpSpreadsheetTests/Style/NumberFormatTest.php +++ b/tests/PhpSpreadsheetTests/Style/NumberFormatTest.php @@ -15,12 +15,12 @@ class NumberFormatTest extends \PHPUnit_Framework_TestCase /** * @dataProvider providerNumberFormat + * + * @param mixed $expectedResult */ - public function testFormatValueWithMask() + public function testFormatValueWithMask($expectedResult, ...$args) { - $args = func_get_args(); - $expectedResult = array_pop($args); - $result = call_user_func_array([NumberFormat::class, 'toFormattedString'], $args); + $result = NumberFormat::toFormattedString(...$args); $this->assertEquals($expectedResult, $result); } diff --git a/tests/data/Calculation/DateTime/DATE.php b/tests/data/Calculation/DateTime/DATE.php index 6cdedcbe..d8882fba 100644 --- a/tests/data/Calculation/DateTime/DATE.php +++ b/tests/data/Calculation/DateTime/DATE.php @@ -4,486 +4,486 @@ return [ [ + 6890, 18, 11, 11, - 6890, ], // Excel 1900 Calendar Base Date [ - 1900, 1, + 1900, 1, 1, ], // Day before Excel mythical 1900 leap day [ + 59, 1900, 2, 28, - 59, ], // Excel mythical 1900 leap day [ + 60, 1900, 2, 29, - 60, ], // Day after Excel mythical 1900 leap day [ + 61, 1900, 3, 1, - 61, ], // Day after Excel mythical 1900 leap day [ + 713, 1901, 12, 13, - 713, ], // PHP 32-bit Earliest Date [ + 714, 1901, 12, 14, - 714, ], [ + 1461, 1903, 12, 31, - 1461, ], // Excel 1904 Calendar Base Date [ + 1462, 1904, 1, 1, - 1462, ], [ + 1463, 1904, 1, 2, - 1463, ], [ + 22269, 1960, 12, 19, - 22269, ], // PHP Base Date [ + 25569, 1970, 1, 1, - 25569, ], [ + 30292, 1982, 12, 7, - 30292, ], [ + 39611, 2008, 6, 12, - 39611, ], // PHP 32-bit Latest Date [ + 50424, 2038, 1, 19, - 50424, ], // Day after PHP 32-bit Latest Date [ + 50425, 2038, 1, 20, - 50425, ], [ + 39448, 2008, 1, 1, - 39448, ], [ + 39447, 2008, 1, null, - 39447, ], [ + 39446, 2008, 1, -1, - 39446, ], [ + 39417, 2008, 1, -30, - 39417, ], [ + 39416, 2008, 1, -31, - 39416, ], [ - 2008, - 1, - -365, 39082, + 2008, + 1, + -365, ], [ + 39508, 2008, 3, 1, - 39508, ], [ + 39507, 2008, 3, null, - 39507, ], [ + 39506, 2008, 3, -1, - 39506, ], [ + 39142, 2008, 3, -365, - 39142, ], [ + 39417, 2008, null, 1, - 39417, ], [ + 39387, 2008, -1, 1, - 39387, ], [ + 39083, 2008, -11, 1, - 39083, ], [ + 39052, 2008, -12, 1, - 39052, ], [ + 39022, 2008, -13, 1, - 39022, ], [ + 39051, 2008, -13, 30, - 39051, ], [ + 39021, 2008, -13, null, - 39021, ], [ + 38991, 2008, -13, -30, - 38991, ], [ + 38990, 2008, -13, -31, - 38990, ], [ + 39814, 2008, 13, 1, - 39814, ], [ + 39507, 2007, 15, null, - 39507, ], [ + 40210, 2008, 26, 1, - 40210, ], [ + 40199, 2008, 26, -10, - 40199, ], [ + 38686, 2008, -26, 61, - 38686, ], [ - 2010, - -15, - -50, 39641, + 2010, + -15, + -50, ], [ + 39741, 2010, -15, 50, - 39741, ], [ + 40552, 2010, 15, -50, - 40552, ], [ + 40652, 2010, 15, 50, - 40652, ], [ + 40179, 2010, 1.5, 1, - 40179, ], [ - 2010, - 1.5, - 0, 40178, + 2010, + 1.5, + 0, ], [ + 40148, 2010, 0, 1.5, - 40148, ], [ + 40179, 2010, 1, 1.5, - 40179, ], [ - 2012, - 6, - 15, 41075, - ], - [ 2012, 6, - null, + 15, + ], + [ 41060, + 2012, + 6, + null, ], [ + 40892, 2012, null, 15, - 40892, ], [ - null, - 6, - 15, 167, - ], - [ - 10, + null, 6, 15, + ], + [ 3819, + 10, + 6, + 15, ], [ - 10, - null, - null, 3622, - ], - [ - null, 10, null, + null, + ], + [ 274, + null, + 10, + null, ], [ + '#NUM!', null, null, 10, - '#NUM!', ], [ + '#NUM!', -20, null, null, - '#NUM!', ], [ + '#NUM!', -20, 6, 15, - '#NUM!', ], // Excel Maximum Date [ + 2958465, 9999, 12, 31, - 2958465, ], // Exceeded Excel Maximum Date [ + '#NUM!', 10000, 1, 1, - '#NUM!', ], [ + 39670, 2008, 8, 10, - 39670, ], [ + 39813, 2008, 12, 31, - 39813, ], [ + 39692, 2008, 8, 32, - 39692, ], [ + 39844, 2008, 13, 31, - 39844, ], [ - 2009, - 1, - 0, 39813, + 2009, + 1, + 0, ], [ + 39812, 2009, 1, -1, - 39812, ], [ - 2009, - 0, - 0, 39782, - ], - [ 2009, 0, - -1, + 0, + ], + [ 39781, + 2009, + 0, + -1, ], [ + 39752, 2009, -1, 0, - 39752, ], [ + 39751, 2009, -1, -1, - 39751, ], [ + 40146, 2010, 0, -1, - 40146, ], [ + 40329, 2010, 5, 31, - 40329, ], // MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date [ + 40199, 2010, 1, '21st', - 40199, ], // MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date [ + 40258, 2010, 'March', '21st', - 40258, ], // MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date [ + 40258, 2010, 'March', 21, - 40258, ], [ + '#VALUE!', 'ABC', 1, 21, - '#VALUE!', ], [ + '#VALUE!', 2010, 'DEF', 21, - '#VALUE!', ], [ + '#VALUE!', 2010, 3, 'GHI', - '#VALUE!', ], ]; diff --git a/tests/data/Calculation/DateTime/DATEDIF.php b/tests/data/Calculation/DateTime/DATEDIF.php index de397956..e7910e3c 100644 --- a/tests/data/Calculation/DateTime/DATEDIF.php +++ b/tests/data/Calculation/DateTime/DATEDIF.php @@ -2,615 +2,615 @@ return [ [ + 365, '2016-01-01', '2016-12-31', 'YD', - 365, ], [ + 364, '2015-01-01', '2015-12-31', 'YD', - 364, ], [ + 364, '2015-01-01', '2016-12-31', 'YD', - 364, ], [ + 365, '2016-01-01', '2017-12-31', 'YD', - 365, ], [ + 364, '2017-01-01', '2018-12-31', 'YD', - 364, ], [ + '#VALUE!', 'ABC', '2007-1-10', 'Y', - '#VALUE!', ], [ + '#VALUE!', '2007-1-1', 'DEF', 'Y', - '#VALUE!', ], [ + '#VALUE!', '2007-1-1', '2007-1-10', 'XYZ', - '#VALUE!', ], [ + '#NUM!', '2007-1-10', '2007-1-1', 'Y', - '#NUM!', ], [ + 0, '2007-12-31', '2008-1-10', 'Y', - 0, ], [ + 0, '2007-1-1', '2007-1-10', 'Y', - 0, ], [ + 0, '2007-1-1', '2007-1-10', 'M', - 0, ], [ + 9, '2007-1-1', '2007-1-10', 'D', - 9, ], [ + 0, '2007-1-1', '2007-1-10', 'YM', - 0, ], [ + 9, '2007-1-1', '2007-1-10', 'YD', - 9, ], [ + 9, '2007-1-1', '2007-1-10', 'MD', - 9, ], [ + 0, '2007-1-1', '2007-12-31', 'Y', - 0, ], [ + 11, '2007-1-1', '2007-12-31', 'M', - 11, ], [ + 364, '2007-1-1', '2007-12-31', 'D', - 364, ], [ + 11, '2007-1-1', '2007-12-31', 'YM', - 11, ], [ + 364, '2007-1-1', '2007-12-31', 'YD', - 364, ], [ - '2007-1-1', - '2007-12-31', - 'MD', 30, + '2007-1-1', + '2007-12-31', + 'MD', ], [ + 1, '2007-1-1', '2008-7-1', 'Y', - 1, ], [ - '2007-1-1', - '2008-7-1', - 'M', 18, - ], - [ '2007-1-1', '2008-7-1', - 'D', + 'M', + ], + [ 547, + '2007-1-1', + '2008-7-1', + 'D', ], [ + 6, '2007-1-1', '2008-7-1', 'YM', - 6, ], [ - '2007-1-1', - '2008-7-1', - 'YD', 181, + '2007-1-1', + '2008-7-1', + 'YD', ], [ + 0, '2007-1-1', '2008-7-1', 'MD', - 0, ], [ + 0, '2007-1-1', '2007-1-31', 'Y', - 0, ], [ + 0, '2007-1-1', '2007-1-31', 'M', - 0, ], [ + 30, '2007-1-1', '2007-1-31', 'D', - 30, ], [ + 0, '2007-1-1', '2007-1-31', 'YM', - 0, ], [ + 30, '2007-1-1', '2007-1-31', 'YD', - 30, ], [ + 30, '2007-1-1', '2007-1-31', 'MD', - 30, ], [ + 0, '2007-1-1', '2007-2-1', 'Y', - 0, ], [ + 1, '2007-1-1', '2007-2-1', 'M', - 1, ], [ - '2007-1-1', - '2007-2-1', - 'D', 31, + '2007-1-1', + '2007-2-1', + 'D', ], [ + 1, '2007-1-1', '2007-2-1', 'YM', - 1, ], [ + 31, '2007-1-1', '2007-2-1', 'YD', - 31, ], [ + 0, '2007-1-1', '2007-2-1', 'MD', - 0, ], [ + 0, '2007-1-1', '2007-2-28', 'Y', - 0, ], [ + 1, '2007-1-1', '2007-2-28', 'M', - 1, ], [ + 58, '2007-1-1', '2007-2-28', 'D', - 58, ], [ + 1, '2007-1-1', '2007-2-28', 'YM', - 1, ], [ + 58, '2007-1-1', '2007-2-28', 'YD', - 58, ], [ - '2007-1-1', - '2007-2-28', - 'MD', 27, + '2007-1-1', + '2007-2-28', + 'MD', ], [ + 0, '2007-1-31', '2007-2-1', 'Y', - 0, ], [ + 0, '2007-1-31', '2007-2-1', 'M', - 0, ], [ + 1, '2007-1-31', '2007-2-1', 'D', - 1, ], [ + 0, '2007-1-31', '2007-2-1', 'YM', - 0, ], [ + 1, '2007-1-31', '2007-2-1', 'YD', - 1, ], [ + 1, '2007-1-31', '2007-2-1', 'MD', - 1, ], [ + 0, '2007-1-31', '2007-3-1', 'Y', - 0, ], [ + 1, '2007-1-31', '2007-3-1', 'M', - 1, ], [ + 29, '2007-1-31', '2007-3-1', 'D', - 29, ], [ + 1, '2007-1-31', '2007-3-1', 'YM', - 1, ], [ + 29, '2007-1-31', '2007-3-1', 'YD', - 29, ], [ - '2007-1-31', - '2007-3-1', - 'MD', -2, + '2007-1-31', + '2007-3-1', + 'MD', ], [ + 0, '2007-1-31', '2007-3-31', 'Y', - 0, ], [ + 2, '2007-1-31', '2007-3-31', 'M', - 2, ], [ + 59, '2007-1-31', '2007-3-31', 'D', - 59, ], [ + 2, '2007-1-31', '2007-3-31', 'YM', - 2, ], [ + 59, '2007-1-31', '2007-3-31', 'YD', - 59, ], [ + 0, '2007-1-31', '2007-3-31', 'MD', - 0, ], [ + 0, '2008-1-1', '2008-9-1', 'Y', - 0, ], [ + 8, '2008-1-1', '2008-9-1', 'M', - 8, ], [ + 244, '2008-1-1', '2008-9-1', 'D', - 244, ], [ + 8, '2008-1-1', '2008-9-1', 'YM', - 8, ], [ + 244, '2008-1-1', '2008-9-1', 'YD', - 244, ], [ + 0, '2008-1-1', '2008-9-1', 'MD', - 0, ], [ - '2007-2-1', - '2008-4-1', - 'Y', 1, - ], - [ '2007-2-1', '2008-4-1', - 'M', + 'Y', + ], + [ 14, - ], - [ '2007-2-1', '2008-4-1', - 'D', + 'M', + ], + [ 425, + '2007-2-1', + '2008-4-1', + 'D', ], [ + 2, '2007-2-1', '2008-4-1', 'YM', - 2, ], [ - '2007-2-1', - '2008-4-1', - 'YD', 59, + '2007-2-1', + '2008-4-1', + 'YD', ], [ + 0, '2007-2-1', '2008-4-1', 'MD', - 0, ], [ - '1960-12-19', - '2008-6-28', - 'Y', 47, - ], - [ '1960-12-19', '2008-6-28', - 'M', + 'Y', + ], + [ 570, - ], - [ '1960-12-19', '2008-6-28', - 'D', + 'M', + ], + [ 17358, + '1960-12-19', + '2008-6-28', + 'D', ], [ + 6, '1960-12-19', '2008-6-28', 'YM', - 6, ], [ - '1960-12-19', - '2008-6-28', - 'YD', 191, + '1960-12-19', + '2008-6-28', + 'YD', ], [ + 9, '1960-12-19', '2008-6-28', 'MD', - 9, ], [ - '1982-12-7', - '2008-6-28', - 'Y', 25, - ], - [ '1982-12-7', '2008-6-28', - 'M', + 'Y', + ], + [ 306, - ], - [ '1982-12-7', '2008-6-28', - 'D', + 'M', + ], + [ 9335, - ], - [ '1982-12-7', '2008-6-28', - 'YM', + 'D', + ], + [ 6, - ], - [ '1982-12-7', '2008-6-28', - 'YD', + 'YM', + ], + [ 203, + '1982-12-7', + '2008-6-28', + 'YD', ], [ + 21, '1982-12-7', '2008-6-28', 'MD', - 21, ], [ + 2, '2007-12-25', '2010-3-17', 'Y', - 2, ], [ - '2007-12-25', - '2010-3-17', - 'M', 26, + '2007-12-25', + '2010-3-17', + 'M', ], [ + 813, '2007-12-25', '2010-3-17', 'D', - 813, ], [ + 2, '2007-12-25', '2010-3-17', 'YM', - 2, ], [ + 82, '2007-12-25', '2010-3-17', 'YD', - 82, ], [ + 20, '2007-12-25', '2010-3-17', 'MD', - 20, ], [ + 51, '19-12-1960', '26-01-2012', 'Y', - 51, ], [ + 613, '19-12-1960', '26-01-2012', 'M', - 613, ], [ + 18665, '19-12-1960', '26-01-2012', 'D', - 18665, ], [ + 1, '19-12-1960', '26-01-2012', 'YM', - 1, ], [ + 38, '19-12-1960', '26-01-2012', 'YD', - 38, ], [ + 7, '19-12-1960', '26-01-2012', 'MD', - 7, ], [ + 50, '19-12-1960', '12-12-2012', 'Y', - 50, ], [ + 0, '1982-12-07', '1982-12-7', 'D', - 0, ], ]; diff --git a/tests/data/Calculation/DateTime/DATEVALUE.php b/tests/data/Calculation/DateTime/DATEVALUE.php index 4c6ae6f5..381d26dc 100644 --- a/tests/data/Calculation/DateTime/DATEVALUE.php +++ b/tests/data/Calculation/DateTime/DATEVALUE.php @@ -4,290 +4,290 @@ return [ [ + '#VALUE!', '25-Dec-1899', - '#VALUE!', ], [ + '#VALUE!', '31-Dec-1899', - '#VALUE!', ], [ - '1-Jan-1900', 1, + '1-Jan-1900', ], [ - '1900/2/28', 59, + '1900/2/28', ], [ + '#VALUE!', '29-02-1900', - '#VALUE!', ], // MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date [ + '#VALUE!', '29th February 1900', - '#VALUE!', ], [ - '1900/3/1', 61, + '1900/3/1', ], [ - '13-12-1901', 713, + '13-12-1901', ], [ - '14-12-1901', 714, + '14-12-1901', ], [ - '1903/12/31', 1461, + '1903/12/31', ], [ - '1-Jan-1904', 1462, + '1-Jan-1904', ], // MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date [ - '2nd-Jan-1904', 1463, + '2nd-Jan-1904', ], [ - '19-12-1960', 22269, + '19-12-1960', ], // MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date [ - '1st January 1970', 25569, + '1st January 1970', ], [ - '7-Dec-1982', 30292, + '7-Dec-1982', ], [ - '1-1-2008', 39448, + '1-1-2008', ], [ - '2038-01-19', 50424, + '2038-01-19', ], [ - '2-6-2008', 39601, + '2-6-2008', ], // MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date [ - 'December 25th 2008', 39807, + 'December 25th 2008', ], [ - '1 Jan-2008', 39448, + '1 Jan-2008', ], // MS Excel success or failure dependent on country settings [ + 39813, '12-31-2008', - 39813, ], // PhpSpreadsheet tries to handle both US and UK formats, irrespective of country settings [ + 39813, '31-12-2008', - 39813, ], // MS Excel success or failure dependent on country settings [ + 39682, '8/22/2008', - 39682, ], // PhpSpreadsheet tries to handle both US and UK formats, irrespective of country settings [ + 39682, '22/8/2008', - 39682, ], [ + 39682, '22/8/08', - 39682, ], [ + 39682, '22-AUG-2008', - 39682, ], [ - '2008/02/23', 39501, + '2008/02/23', ], [ - '6-7-2008', 39635, + '6-7-2008', ], // MS Excel success or failure dependent on country settings [ - '28-2-2007', 39141, + '28-2-2007', ], // PhpSpreadsheet tries to handle both US and UK formats, irrespective of country settings [ - '2-28-2007', 39141, + '2-28-2007', ], // Should fail because it's an invalid date, but PhpSpreadsheet currently adjusts to 1-3-2007 - FIX NEEDED [ - '29-2-2007', '#VALUE!', + '29-2-2007', ], [ - '1/1/1999', 36161, + '1/1/1999', ], [ - '1954-07-20', 19925, + '1954-07-20', ], [ - '22 August 98', 36029, + '22 August 98', ], // MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date [ - '1st March 2007', 39142, + '1st March 2007', ], [ - 'The 1st day of March 2007', '#VALUE!', + 'The 1st day of March 2007', ], // 01/01 of the current year [ - '1 Jan', 42736, + '1 Jan', ], // 31/12 of the current year [ - '31/12', 43100, + '31/12', ], // Excel reads as 1st December 1931, not 31st December in current year [ - '12/31', 11658, + '12/31', ], // 05/07 of the current year [ + 42921, '5-JUL', - 42921, ], // 05/07 of the current year [ - '5 Jul', 42921, + '5 Jul', ], [ - '12/2008', 39783, + '12/2008', ], [ - '10/32', 11963, + '10/32', ], [ + '#VALUE!', 11, - '#VALUE!', ], [ + '#VALUE!', true, - '#VALUE!', ], [ + '#VALUE!', false, - '#VALUE!', ], [ + '#VALUE!', 1, - '#VALUE!', ], [ + '#VALUE!', 12345, - '#VALUE!', ], [ + '#VALUE!', 12, - '#VALUE!', ], [ + 40221, '12-Feb-2010', - 40221, ], // MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date [ + 40221, 'Feb-12-2010', - 40221, ], // MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date [ + 40221, 'February-12-2010', - 40221, ], // MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date [ + 40221, 'February 12 2010', - 40221, ], [ + 40227, '18 Feb 2010', - 40227, ], // MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date [ - '17th 3rd 2010', 40254, + '17th 3rd 2010', ], // MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date [ - 'Feb 18th 2010', 40227, + 'Feb 18th 2010', ], // MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date [ + 40210, '1st Feb 2010', - 40210, ], // MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date [ + 40210, '1st-Feb-2010', - 40210, ], [ + '#VALUE!', '1me Fev 2010', - '#VALUE!', ], // MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date [ - 'February 1st 2010', 40210, + 'February 1st 2010', ], // MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date [ - '2nd Feb 2010', 40211, + '2nd Feb 2010', ], [ + '#VALUE!', 'Second Feb 2010', - '#VALUE!', ], [ - 'First August 2010', '#VALUE!', + 'First August 2010', ], // MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date [ - '1st August 2010', 40391, + '1st August 2010', ], [ - '15:30:25', 0, + '15:30:25', ], ]; diff --git a/tests/data/Calculation/DateTime/DAY.php b/tests/data/Calculation/DateTime/DAY.php index 4f8a485d..4bcd8e7a 100644 --- a/tests/data/Calculation/DateTime/DAY.php +++ b/tests/data/Calculation/DateTime/DAY.php @@ -4,31 +4,31 @@ return [ [ - 22269, 19, + 22269, ], [ - 30348, 1, + 30348, ], [ - 30843, 10, + 30843, ], [ - '11-Nov-1918', 11, + '11-Nov-1918', ], [ - '28-Feb-1904', 28, + '28-Feb-1904', ], [ - 'Invalid', '#VALUE!', + 'Invalid', ], [ - -1, '#NUM!', + -1, ], ]; diff --git a/tests/data/Calculation/DateTime/DAYS360.php b/tests/data/Calculation/DateTime/DAYS360.php index 347e891f..d41e7fb5 100644 --- a/tests/data/Calculation/DateTime/DAYS360.php +++ b/tests/data/Calculation/DateTime/DAYS360.php @@ -2,207 +2,207 @@ return [ [ + '#VALUE!', 'ABC', '2007-1-10', false, - '#VALUE!', ], [ + '#VALUE!', '2007-1-1', 'DEF', true, - '#VALUE!', ], [ + '#VALUE!', '2007-1-1', '2007-1-10', 'XYZ', - '#VALUE!', ], [ + '#VALUE!', '2007-1-10', '2007-1-1', 'Y', - '#VALUE!', ], [ + 9, '2007-1-1', '2007-1-10', false, - 9, ], [ + 9, '2007-1-1', '2007-1-10', true, - 9, ], [ - '2007-1-1', - '2007-12-31', - false, 360, + '2007-1-1', + '2007-12-31', + false, ], [ + 359, '2007-1-1', '2007-12-31', true, - 359, ], [ + 540, '2007-1-1', '2008-7-1', false, - 540, ], [ + 540, '2007-1-1', '2008-7-1', true, - 540, ], [ - '2007-1-1', - '2007-1-31', - false, 30, - ], - [ '2007-1-1', '2007-1-31', - true, + false, + ], + [ 29, + '2007-1-1', + '2007-1-31', + true, ], [ + 30, '2007-1-1', '2007-2-1', false, - 30, ], [ + 30, '2007-1-1', '2007-2-1', true, - 30, ], [ + 57, '2007-1-1', '2007-2-28', false, - 57, ], [ + 57, '2007-1-1', '2007-2-28', true, - 57, ], [ + 1, '2007-1-31', '2007-2-1', false, - 1, ], [ + 1, '2007-1-31', '2007-2-1', true, - 1, ], [ + 31, '2007-1-31', '2007-3-1', false, - 31, ], [ + 31, '2007-1-31', '2007-3-1', true, - 31, ], [ + 60, '2007-1-31', '2007-3-31', false, - 60, ], [ + 60, '2007-1-31', '2007-3-31', true, - 60, ], [ + 240, '2008-1-1', '2008-9-1', false, - 240, ], [ + 240, '2008-1-1', '2008-9-1', true, - 240, ], [ + 420, '2007-2-1', '2008-4-1', false, - 420, ], [ + 420, '2007-2-1', '2008-4-1', true, - 420, ], [ + 17109, '1960-12-19', '2008-6-28', false, - 17109, ], [ + 17109, '1960-12-19', '2008-6-28', true, - 17109, ], [ + 9201, '1982-12-7', '2008-6-28', false, - 9201, ], [ + 9201, '1982-12-7', '2008-6-28', true, - 9201, ], [ - '2000-2-28', - '2000-3-31', - false, 33, + '2000-2-28', + '2000-3-31', + false, ], [ + 32, '2000-2-28', '2000-3-31', true, - 32, ], [ + 30, '2000-2-29', '2000-3-31', false, - 30, ], [ + 31, '2000-2-29', '2000-3-31', true, - 31, ], ]; diff --git a/tests/data/Calculation/DateTime/EDATE.php b/tests/data/Calculation/DateTime/EDATE.php index 90789c5f..6b3a513f 100644 --- a/tests/data/Calculation/DateTime/EDATE.php +++ b/tests/data/Calculation/DateTime/EDATE.php @@ -2,78 +2,78 @@ return [ [ + 39493, '15-Jan-2008', 1, - 39493, ], [ + 39431, '15-Jan-2008', -1, - 39431, ], [ + 39522, '15-Jan-2008', 2, - 39522, ], [ + 39202, '31-Mar-2007', 1, - 39202, ], [ + 39141, '31-Mar-2007', -1, - 39141, ], [ + 39507, '31-Mar-2008', -1, - 39507, ], [ + 39416, '31-Mar-2008', -4, - 39416, ], [ + 39141, '29-Feb-2008', -12, - 39141, ], [ + 39248, '15-Mar-2007', 3, - 39248, ], [ + 22269, 22269.0, 0, - 22269, ], [ + 22331, 22269.0, 2, - 22331, ], [ + 25618, 22269.0, 110, - 25618, ], [ + 18920, 22269.0, -110, - 18920, ], [ + '#VALUE!', '15-Mar-2007', 'ABC', - '#VALUE!', ], [ + '#VALUE!', 'Invalid', 12, - '#VALUE!', ], ]; diff --git a/tests/data/Calculation/DateTime/EOMONTH.php b/tests/data/Calculation/DateTime/EOMONTH.php index a7e22be5..6379f1e1 100644 --- a/tests/data/Calculation/DateTime/EOMONTH.php +++ b/tests/data/Calculation/DateTime/EOMONTH.php @@ -2,88 +2,88 @@ return [ [ + 39507, '15-Jan-2008', 1, - 39507, ], [ + 39447, '15-Jan-2008', -1, - 39447, ], [ + 39538, '15-Jan-2008', 2, - 39538, ], [ + 39202, '31-Mar-2007', 1, - 39202, ], [ + 39141, '31-Mar-2007', -1, - 39141, ], [ + 39507, '31-Mar-2008', -1, - 39507, ], [ + 39416, '31-Mar-2008', -4, - 39416, ], [ + 39141, '29-Feb-2008', -12, - 39141, ], [ + 39263, '15-Mar-2007', 3, - 39263, ], [ + 22281, 22269.0, 0, - 22281, ], [ + 22340, 22269.0, 2, - 22340, ], [ + 25627, 22269.0, 110, - 25627, ], [ + 18932, 22269.0, -110, - 18932, ], [ + 22371, 22269.0, 3, - 22371, ], [ + 22371, 22269.0, 3.75, - 22371, ], [ + '#VALUE!', '15-Mar-2007', 'ABC', - '#VALUE!', ], [ + '#VALUE!', 'Invalid', 12, - '#VALUE!', ], ]; diff --git a/tests/data/Calculation/DateTime/HOUR.php b/tests/data/Calculation/DateTime/HOUR.php index 1d32672b..7fe9bd43 100644 --- a/tests/data/Calculation/DateTime/HOUR.php +++ b/tests/data/Calculation/DateTime/HOUR.php @@ -2,51 +2,51 @@ return [ [ - 0.25, 6, + 0.25, ], [ - 0.75, 18, + 0.75, ], [ - 0.5, 12, + 0.5, ], [ - 0.59999999999999998, 14, + 0.59999999999999998, ], [ - '11-Nov-1918 11:11', 11, + '11-Nov-1918 11:11', ], [ + 23, '11:59 PM', - 23, ], [ + 23, '23:59:59', - 23, ], [ + 0, 3600, - 0, ], [ - -3600, '#NUM!', + -3600, ], [ + 0, 7200, - 0, ], [ + 0, 65535, - 0, ], [ - '1 O\'Clock', '#VALUE!', + '1 O\'Clock', ], ]; diff --git a/tests/data/Calculation/DateTime/MINUTE.php b/tests/data/Calculation/DateTime/MINUTE.php index d610ac07..ab93b43a 100644 --- a/tests/data/Calculation/DateTime/MINUTE.php +++ b/tests/data/Calculation/DateTime/MINUTE.php @@ -2,51 +2,51 @@ return [ [ - 0.20000000000000001, 48, + 0.20000000000000001, ], [ - 0.40000000000000002, 36, + 0.40000000000000002, ], [ - 0.59999999999999998, 24, + 0.59999999999999998, ], [ - 0.80000000000000004, 12, + 0.80000000000000004, ], [ - '11-Nov-1918 11:15', 15, + '11-Nov-1918 11:15', ], [ + 59, '11:59 PM', - 59, ], [ + 59, '23:59:59', - 59, ], [ + 0, 3600, - 0, ], [ - -3600, '#NUM!', + -3600, ], [ + 0, 12500, - 0, ], [ + 0, 65535, - 0, ], [ - 'Half past 1 O\'Clock', '#VALUE!', + 'Half past 1 O\'Clock', ], ]; diff --git a/tests/data/Calculation/DateTime/MONTH.php b/tests/data/Calculation/DateTime/MONTH.php index 585f48e3..bf24b93f 100644 --- a/tests/data/Calculation/DateTime/MONTH.php +++ b/tests/data/Calculation/DateTime/MONTH.php @@ -2,51 +2,51 @@ return [ [ + 1, null, - 1, ], [ + 1, 0, - 1, ], [ + 12, 22269.0, - 12, ], [ + 2, 30348.0, - 2, ], [ - 30843.0, 6, + 30843.0, ], [ - '11-Nov-1918', 11, + '11-Nov-1918', ], [ - '28-Feb-1904', 2, + '28-Feb-1904', ], [ - '01 Jul 2003', 7, + '01 Jul 2003', ], [ - 38094, 4, + 38094, ], [ - 'Dec 2003', 12, + 'Dec 2003', ], [ - -10, '#NUM!', + -10, ], [ - 'ABCD', '#VALUE!', + 'ABCD', ], ]; diff --git a/tests/data/Calculation/DateTime/NETWORKDAYS.php b/tests/data/Calculation/DateTime/NETWORKDAYS.php index f27ff143..d62e501c 100644 --- a/tests/data/Calculation/DateTime/NETWORKDAYS.php +++ b/tests/data/Calculation/DateTime/NETWORKDAYS.php @@ -2,102 +2,102 @@ return [ [ + 8, '1-Jan-2007', '10-Jan-2007', - 8, ], [ + 3, '18-Jun-2008', '20-Jun-2008', - 3, ], [ + 5, '16-Jun-2008', '20-Jun-2008', - 5, ], [ + 5, '14-Jun-2008', '20-Jun-2008', - 5, ], [ - '20-Jun-2008', - '20-Jun-2008', 1, + '20-Jun-2008', + '20-Jun-2008', ], [ + 0, '21-Jun-2008', '21-Jun-2008', - 0, ], [ - '20-Jun-2008', - '20-Jun-2008', - '20-Jun-2008', 0, + '20-Jun-2008', + '20-Jun-2008', + '20-Jun-2008', ], [ - '20-Jun-2008', - '20-Jun-2008', - '20-Jun-2008', - '20-Jun-2008', 0, + '20-Jun-2008', + '20-Jun-2008', + '20-Jun-2008', + '20-Jun-2008', ], [ + 8, '14-Jun-2008', '25-Jun-2008', - 8, ], [ - '19-Dec-1960', - '10-Jan-1961', 17, + '19-Dec-1960', + '10-Jan-1961', ], [ - '10-Jan-1961', - '19-Dec-1960', -17, + '10-Jan-1961', + '19-Dec-1960', ], [ - '19-Dec-1960', - '10-Jan-1961', - '25-Dec-1960', - '26-Dec-1960', - '01-Jan-1961', 16, + '19-Dec-1960', + '10-Jan-1961', + '25-Dec-1960', + '26-Dec-1960', + '01-Jan-1961', ], [ + -16, '10-Jan-1961', '19-Dec-1960', '25-Dec-1960', '26-Dec-1960', '01-Jan-1961', - -16, ], [ + 65, '1-Jan-2007', '31-Mar-2007', - 65, ], [ + 23, '1-Jan-2007', '31-Jan-2007', - 23, ], [ + 24, '1-Jan-2007', '1-Feb-2007', - 24, ], [ + 43, '1-Jan-2007', '28-Feb-2007', - 43, ], [ + 2, '31-Jan-2007', '1-Feb-2007', - 2, ], ]; diff --git a/tests/data/Calculation/DateTime/SECOND.php b/tests/data/Calculation/DateTime/SECOND.php index 04b44e03..baef1f1a 100644 --- a/tests/data/Calculation/DateTime/SECOND.php +++ b/tests/data/Calculation/DateTime/SECOND.php @@ -2,51 +2,51 @@ return [ [ - 0.2339930556, 57, + 0.2339930556, ], [ - 0.4202893519, 13, + 0.4202893519, ], [ - 0.60789351849999995, 22, + 0.60789351849999995, ], [ - 0.80221064809999998, 11, + 0.80221064809999998, ], [ - '11-Nov-1918 11:15:35', 35, + '11-Nov-1918 11:15:35', ], [ + 0, '11:59 PM', - 0, ], [ - '23:59:59', 59, + '23:59:59', ], [ + 0, 3600, - 0, ], [ - -3601, '#NUM!', + -3601, ], [ + 0, 12500, - 0, ], [ + 0, 65535, - 0, ], [ - 'Half past 1 O\'Clock', '#VALUE!', + 'Half past 1 O\'Clock', ], ]; diff --git a/tests/data/Calculation/DateTime/TIME.php b/tests/data/Calculation/DateTime/TIME.php index e92043bd..636c316e 100644 --- a/tests/data/Calculation/DateTime/TIME.php +++ b/tests/data/Calculation/DateTime/TIME.php @@ -2,135 +2,135 @@ return [ [ + 0.75776620370400005, 18, 11, 11, - 0.75776620370400005, ], [ + 0.26047453703700002, 6, 15, 5, - 0.26047453703700002, ], [ + 0.52094907407400004, 12, 30, 10, - 0.52094907407400004, ], [ + 0.78153935185199996, 18, 45, 25, - 0.78153935185199996, ], [ + 0.64780092592600003, 15, 32, 50, - 0.64780092592600003, ], [ + 0.50070601851899998, 12, null, 61, - 0.50070601851899998, ], [ + 0.45832175925899998, 11, null, -1, - 0.45832175925899998, ], [ + 0.41589120370400001, 10, null, -67, - 0.41589120370400001, ], [ + 0.58478009259300001, 13, 62, 5, - 0.58478009259300001, ], [ + 0.31964120370400001, 9, -80, 17, - 0.31964120370400001, ], [ + 0.22083333333300001, 8, -162, null, - 0.22083333333300001, ], [ + '#NUM!', 2, -120, -1, - '#NUM!', ], [ + 0.0, 2, -120, null, - 0.0, ], [ + 1.1574074E-5, 2, -120, 1, - 1.1574074E-5, ], [ + 0.50071759259299997, 36, 1, 2, - 0.50071759259299997, ], [ + '#NUM!', -1, 2, 3, - '#NUM!', ], [ + 0.001030092593, -1, 61, 29, - 0.001030092593, ], [ + 0.0, -1, 61, -60, - 0.0, ], [ + '#VALUE!', 'A', null, null, - '#VALUE!', ], [ + 0.49930555555599998, 11, 59, 0, - 0.49930555555599998, ], [ + 0.5, 12, 0, 0, - 0.5, ], [ + 0.70011574074100003, 16, 48, 10, - 0.70011574074100003, ], ]; diff --git a/tests/data/Calculation/DateTime/TIMEVALUE.php b/tests/data/Calculation/DateTime/TIMEVALUE.php index 1c616dad..196848dc 100644 --- a/tests/data/Calculation/DateTime/TIMEVALUE.php +++ b/tests/data/Calculation/DateTime/TIMEVALUE.php @@ -2,55 +2,55 @@ return [ [ - '12:00:00 am', 0, + '12:00:00 am', ], [ - '12:01:02 am', 0.00071759299999999999, + '12:01:02 am', ], [ - '12:03 pm', 0.50208333299999997, + '12:03 pm', ], [ - '12:7:11 pm', 0.50498842600000005, + '12:7:11 pm', ], [ - '4:13:39', 0.176145833, + '4:13:39', ], [ - '6:20:17 pm', 0.76408564800000001, + '6:20:17 pm', ], [ - '18:33:27', 0.773229167, + '18:33:27', ], [ - '31/12/2007 03:27:15', 0.14392361100000001, + '31/12/2007 03:27:15', ], [ - '9:44:55 pm', 0.90619212999999998, + '9:44:55 pm', ], [ + '#VALUE!', 12, - '#VALUE!', ], [ - '13:01', 0.54236111099999995, + '13:01', ], [ - '33:45', 0.40625, + '33:45', ], [ - '13:01PM', '#VALUE!', + '13:01PM', ], ]; diff --git a/tests/data/Calculation/DateTime/WEEKDAY.php b/tests/data/Calculation/DateTime/WEEKDAY.php index 1dfe7efb..b1013d94 100644 --- a/tests/data/Calculation/DateTime/WEEKDAY.php +++ b/tests/data/Calculation/DateTime/WEEKDAY.php @@ -2,129 +2,129 @@ return [ [ - '24-Oct-1968', 5, + '24-Oct-1968', ], [ + 4, '24-Oct-1968', 2, - 4, ], [ + 3, '24-Oct-1968', 3, - 3, ], [ - '2000-06-14', 4, + '2000-06-14', ], [ + 3, '2000-06-14', 2, - 3, ], [ + 2, '2000-06-14', 3, - 2, ], [ - '1996-07-24', 4, + '1996-07-24', ], [ + 3, '1996-07-24', 2, - 3, ], [ + 2, '1996-07-24', 3, - 2, ], [ - '1996-07-27', 7, + '1996-07-27', ], [ + 6, '1996-07-27', 2, - 6, ], [ - '1996-07-27', - 3, 5, + '1996-07-27', + 3, ], [ - '1977-7-31', 1, + '1977-7-31', ], [ - '1977-7-31', - 2, 7, + '1977-7-31', + 2, ], [ + 6, '1977-7-31', 3, - 6, ], [ - '1977-8-1', 2, + '1977-8-1', ], [ - '1977-8-1', - 2, 1, + '1977-8-1', + 2, ], [ - '1977-8-1', - 3, 0, + '1977-8-1', + 3, ], [ + 7, '1900-2-5', 2, - 7, ], [ - '1900-2-1', 4, + '1900-2-1', ], [ - 38093, 6, + 38093, ], [ + 5, 38093, 2, - 5, ], [ + 4, 38093, 3, - 4, ], [ + '#VALUE!', '3/7/1977', 'A', - '#VALUE!', ], [ + '#NUM!', '3/7/1977', 0, - '#NUM!', ], [ + '#VALUE!', 'Invalid', 1, - '#VALUE!', ], [ - -1, '#NUM!', + -1, ], ]; diff --git a/tests/data/Calculation/DateTime/WEEKNUM.php b/tests/data/Calculation/DateTime/WEEKNUM.php index 494ef8be..8cbba076 100644 --- a/tests/data/Calculation/DateTime/WEEKNUM.php +++ b/tests/data/Calculation/DateTime/WEEKNUM.php @@ -2,76 +2,76 @@ return [ [ + 52, '21-Dec-2000', 1, - 52, ], [ + 1, '2000-01-01', 1, - 1, ], [ + 2, '2000-01-02', 1, - 2, ], [ + 1, '2000-01-01', 2, - 1, ], [ + 2, '2000-01-03', 2, - 2, ], [ + 1, '1995-01-01', 1, - 1, ], [ + 1, '1995-01-07', 1, - 1, ], [ + 2, '1995-01-08', 1, - 2, ], [ + 1, '1995-01-01', 2, - 1, ], [ + 2, '1995-01-02', 2, - 2, ], [ - '3/7/1977', 28, + '3/7/1977', ], [ + '#VALUE!', '3/7/1977', 'A', - '#VALUE!', ], [ + '#NUM!', '3/7/1977', 0, - '#NUM!', ], [ + '#VALUE!', 'Invalid', 1, - '#VALUE!', ], [ - -1, '#NUM!', + -1, ], ]; diff --git a/tests/data/Calculation/DateTime/WORKDAY.php b/tests/data/Calculation/DateTime/WORKDAY.php index a618953c..76c517f9 100644 --- a/tests/data/Calculation/DateTime/WORKDAY.php +++ b/tests/data/Calculation/DateTime/WORKDAY.php @@ -2,59 +2,60 @@ return [ [ + '#VALUE!', '1-Jan-2007', 'ABC', - '#VALUE!', ], [ + 39094, '1-Jan-2007', 9, - 39094, ], [ + 39619, '18-Jun-2008', 2, - 39619, ], [ + 39619, '16-Jun-2008', 4, - 39619, ], [ + 39622, '14-Jun-2008', 6, - 39622, ], [ + 39629, '14-Jun-2008', 11, - 39629, ], [ + 39611, '14-Jun-2008', -2, - 39611, ], [ + 39605, '14-Jun-2008', -6, - 39605, ], [ + 39815, '19-Dec-2008', 10, - 39815, ], [ + 39820, '19-Dec-2008', 10, '25-Dec-2008', '26-Dec-2008', '01-Jan-2009', - 39820, ], [ + 39820, '19-Dec-2008', 10, [ @@ -64,9 +65,9 @@ return [ '01-Jan-2009', ], ], - 39820, ], [ + 39801, 39820, -10, [ @@ -76,9 +77,9 @@ return [ '01-Jan-2009', ], ], - 39801, ], [ + 41010, '5-Apr-2012', 3, [ @@ -87,6 +88,5 @@ return [ '9-Apr-2012', ], ], - 41010, ], ]; diff --git a/tests/data/Calculation/DateTime/YEAR.php b/tests/data/Calculation/DateTime/YEAR.php index 85a4c48c..5069f318 100644 --- a/tests/data/Calculation/DateTime/YEAR.php +++ b/tests/data/Calculation/DateTime/YEAR.php @@ -2,47 +2,47 @@ return [ [ + 1900, null, - 1900, ], [ + 1900, 1, - 1900, ], [ - 33333.330000000002, 1991, + 33333.330000000002, ], [ - 22269.0, 1960, + 22269.0, ], [ - 30348.0, 1983, + 30348.0, ], [ - 30843.0, 1984, + 30843.0, ], [ - '01 Jan 2525', 2525, + '01 Jan 2525', ], [ - '11-Nov-1918', 1918, + '11-Nov-1918', ], [ - '28-Feb-1904', 1904, + '28-Feb-1904', ], [ - -10, '#NUM!', + -10, ], [ - 'ABCD', '#VALUE!', + 'ABCD', ], ]; diff --git a/tests/data/Calculation/DateTime/YEARFRAC.php b/tests/data/Calculation/DateTime/YEARFRAC.php index 52025924..9cb7005a 100644 --- a/tests/data/Calculation/DateTime/YEARFRAC.php +++ b/tests/data/Calculation/DateTime/YEARFRAC.php @@ -2,387 +2,387 @@ return [ [ + 0.025, '2007-1-1', '2007-1-10', 0, - 0.025, ], [ + 0.024657534246580001, '2007-1-1', '2007-1-10', 1, - 0.024657534246580001, ], [ + 0.025, '2007-1-1', '2007-1-10', 2, - 0.025, ], [ + 0.024657534246580001, '2007-1-1', '2007-1-10', 3, - 0.024657534246580001, ], [ + 0.025, '2007-1-1', '2007-1-10', 4, - 0.025, ], [ - '2007-1-1', - '2007-12-31', - 0, 1.0, + '2007-1-1', + '2007-12-31', + 0, ], [ + 0.99726027397259998, '2007-1-1', '2007-12-31', 1, - 0.99726027397259998, ], [ - '2007-1-1', - '2007-12-31', - 2, 1.01111111111111, - ], - [ '2007-1-1', '2007-12-31', - 3, + 2, + ], + [ 0.99726027397259998, + '2007-1-1', + '2007-12-31', + 3, ], [ + 0.99722222222222001, '2007-1-1', '2007-12-31', 4, - 0.99722222222222001, ], [ + 1.5, '2007-1-1', '2008-7-1', 0, - 1.5, ], [ - '2007-1-1', - '2008-7-1', - 1, 1.49658002735978, - ], - [ '2007-1-1', '2008-7-1', - 2, + 1, + ], + [ 1.5194444444444399, - ], - [ '2007-1-1', '2008-7-1', - 3, + 2, + ], + [ 1.4986301369863, + '2007-1-1', + '2008-7-1', + 3, ], [ + 1.5, '2007-1-1', '2008-7-1', 4, - 1.5, ], [ + 0.083333333333329998, '2007-1-1', '2007-1-31', 0, - 0.083333333333329998, ], [ + 0.082191780821919996, '2007-1-1', '2007-1-31', 1, - 0.082191780821919996, ], [ + 0.083333333333329998, '2007-1-1', '2007-1-31', 2, - 0.083333333333329998, ], [ + 0.082191780821919996, '2007-1-1', '2007-1-31', 3, - 0.082191780821919996, ], [ - '2007-1-1', - '2007-1-31', - 4, 0.080555555555560002, + '2007-1-1', + '2007-1-31', + 4, ], [ + 0.083333333333329998, '2007-1-1', '2007-2-1', 0, - 0.083333333333329998, ], [ + 0.084931506849319993, '2007-1-1', '2007-2-1', 1, - 0.084931506849319993, ], [ + 0.08611111111111, '2007-1-1', '2007-2-1', 2, - 0.08611111111111, ], [ + 0.084931506849319993, '2007-1-1', '2007-2-1', 3, - 0.084931506849319993, ], [ + 0.083333333333329998, '2007-1-1', '2007-2-1', 4, - 0.083333333333329998, ], [ + 0.15833333333333, '2007-1-1', '2007-2-28', 0, - 0.15833333333333, ], [ + 0.15890410958904, '2007-1-1', '2007-2-28', 1, - 0.15890410958904, ], [ - '2007-1-1', - '2007-2-28', - 2, 0.16111111111111001, - ], - [ '2007-1-1', '2007-2-28', - 3, + 2, + ], + [ 0.15890410958904, + '2007-1-1', + '2007-2-28', + 3, ], [ + 0.15833333333333, '2007-1-1', '2007-2-28', 4, - 0.15833333333333, ], [ + 0.0027777777777800001, '2007-1-31', '2007-2-1', 0, - 0.0027777777777800001, ], [ + 0.0027397260273999999, '2007-1-31', '2007-2-1', 1, - 0.0027397260273999999, ], [ + 0.0027777777777800001, '2007-1-31', '2007-2-1', 2, - 0.0027777777777800001, ], [ + 0.0027397260273999999, '2007-1-31', '2007-2-1', 3, - 0.0027397260273999999, ], [ + 0.0027777777777800001, '2007-1-31', '2007-2-1', 4, - 0.0027777777777800001, ], [ + 0.08611111111111, '2007-1-31', '2007-3-1', 0, - 0.08611111111111, ], [ + 0.07945205479452, '2007-1-31', '2007-3-1', 1, - 0.07945205479452, ], [ - '2007-1-31', - '2007-3-1', - 2, 0.080555555555560002, - ], - [ '2007-1-31', '2007-3-1', - 3, + 2, + ], + [ 0.07945205479452, + '2007-1-31', + '2007-3-1', + 3, ], [ + 0.08611111111111, '2007-1-31', '2007-3-1', 4, - 0.08611111111111, ], [ + 0.16666666666666999, '2007-1-31', '2007-3-31', 0, - 0.16666666666666999, ], [ + 0.16164383561644, '2007-1-31', '2007-3-31', 1, - 0.16164383561644, ], [ - '2007-1-31', - '2007-3-31', - 2, 0.16388888888889, - ], - [ '2007-1-31', '2007-3-31', - 3, + 2, + ], + [ 0.16164383561644, + '2007-1-31', + '2007-3-31', + 3, ], [ + 0.16666666666666999, '2007-1-31', '2007-3-31', 4, - 0.16666666666666999, ], [ + 0.66666666666666996, '2008-1-1', '2008-9-1', 0, - 0.66666666666666996, ], [ + 0.66666666666666996, '2008-1-1', '2008-9-1', 1, - 0.66666666666666996, ], [ - '2008-1-1', - '2008-9-1', - 2, 0.67777777777778003, - ], - [ '2008-1-1', '2008-9-1', - 3, + 2, + ], + [ 0.66849315068492998, + '2008-1-1', + '2008-9-1', + 3, ], [ + 0.66666666666666996, '2008-1-1', '2008-9-1', 4, - 0.66666666666666996, ], [ + 1.1666666666666701, '2007-2-1', '2008-4-1', 0, - 1.1666666666666701, ], [ - '2007-2-1', - '2008-4-1', - 1, 1.16279069767442, + '2007-2-1', + '2008-4-1', + 1, ], [ + 1.18055555555556, '2007-2-1', '2008-4-1', 2, - 1.18055555555556, ], [ + 1.16438356164384, '2007-2-1', '2008-4-1', 3, - 1.16438356164384, ], [ + 1.1666666666666701, '2007-2-1', '2008-4-1', 4, - 1.1666666666666701, ], [ + 47.524999999999999, '1960-12-19', '2008-6-28', 0, - 47.524999999999999, ], [ + 48.216666666666697, '1960-12-19', '2008-6-28', 2, - 48.216666666666697, ], [ + 47.556164383561601, '1960-12-19', '2008-6-28', 3, - 47.556164383561601, ], [ + 47.524999999999999, '1960-12-19', '2008-6-28', 4, - 47.524999999999999, ], [ + 25.558333333333302, '1982-12-7', '2008-6-28', 0, - 25.558333333333302, ], [ + 25.5571892111134, '1982-12-7', '2008-6-28', 1, - 25.5571892111134, ], [ + 25.9305555555556, '1982-12-7', '2008-6-28', 2, - 25.9305555555556, ], [ + 25.575342465753401, '1982-12-7', '2008-6-28', 3, - 25.575342465753401, ], [ + 25.558333333333302, '1982-12-7', '2008-6-28', 4, - 25.558333333333302, ], ]; diff --git a/tests/data/Calculation/Engineering/BESSELI.php b/tests/data/Calculation/Engineering/BESSELI.php index f4f51e12..d6ee156a 100644 --- a/tests/data/Calculation/Engineering/BESSELI.php +++ b/tests/data/Calculation/Engineering/BESSELI.php @@ -2,278 +2,278 @@ return [ [ + '#NUM!', 1.5, -1, - '#NUM!', ], [ + 2.249E-5, -1, 6, - 2.249E-5, ], [ - 0, - 3, 0.0, + 0, + 3, ], [ + 4.8807925900000004, 3, 0, - 4.8807925900000004, ], [ + 0.00027146000000000001, 1, 5, - 0.00027146000000000001, ], [ + 0.98166642999999998, 1.5, 1, - 0.98166642999999998, ], [ + 0.33783461999999997, -1.5, 2.5, - 0.33783461999999997, ], [ + 0.0, -1.5, 14.99, - 0.0, ], [ + 0.0, 1, 30, - 0.0, ], [ + 2.51671625, 2.5, 1, - 2.51671625, ], [ + 2.51671625, 2.5, 1.5, - 2.51671625, ], [ + -2.51671625, -2.5, 1.5, - -2.51671625, ], [ + 6.20583492, 3.5, 1, - 6.20583492, ], [ + 0.0073673699999999998, 0.69999999999999996, 3, - 0.0073673699999999998, ], [ + 3.8320120499999999, 3.5, 2, - 3.8320120499999999, ], [ + '#VALUE!', 1.5, 'XYZ', - '#VALUE!', ], [ + '#VALUE!', 'ABC', 3, - '#VALUE!', ], [ + -1030.9147225199999, -9, 1, - -1030.9147225199999, ], [ + -6.20583492, -3.5, 1, - -6.20583492, ], [ + -0.39288151999999998, -0.73499999999999999, 1, - -0.39288151999999998, ], [ + 0.0, 0, 1, - 0.0, ], [ + 0.01750268, 0.035000000000000003, 1, - 0.01750268, ], [ - 1, - 1, 0.56515910000000003, + 1, + 1, ], [ + 0.98166642999999998, 1.5, 1, - 0.98166642999999998, ], [ + 2.51671625, 2.5, 1, - 2.51671625, ], [ + 6.20583492, 3.5, 1, - 6.20583492, ], [ + 864.49619395000002, -9, 2, - 864.49619395000002, ], [ + 3.8320120499999999, -3.5, 2, - 3.8320120499999999, ], [ + 0.070619940000000006, -0.73499999999999999, 2, - 0.070619940000000006, ], [ + 0.0, 0, 2, - 0.0, ], [ + 0.00015313999999999999, 0.035000000000000003, 2, - 0.00015313999999999999, ], [ + 0.10825973, 0.90000000000000002, 2, - 0.10825973, ], [ + 0.13574766999999999, 1, 2, - 0.13574766999999999, ], [ + 0.60327242999999997, 1.8999999999999999, 2, - 0.60327242999999997, ], [ + 1.2764661500000001, 2.5, 2, - 1.2764661500000001, ], [ + 3.8320120499999999, 3.5, 2, - 3.8320120499999999, ], [ + 6.4221893799999998, 4, 2, - 6.4221893799999998, ], [ + 8.8999999999999995E-7, 0.035000000000000003, 3, - 8.8999999999999995E-7, ], [ + 0.0073673699999999998, 0.69999999999999996, 3, - 0.0073673699999999998, ], [ + 0.0154285, 0.89000000000000001, 3, - 0.0154285, ], [ + 3.3372757800000001, 4, 3, - 3.3372757800000001, ], [ + 0.50472435999999998, 4, 5, - 0.50472435999999998, ], [ + 2.8410000000000001E-5, 1.5, 7, - 2.8410000000000001E-5, ], [ + 0.00013237000000000001, 3, 9, - 0.00013237000000000001, ], [ + 7.3782034300000001, -3.5, 0, - 7.3782034300000001, ], [ + 1.6467231899999999, -1.5, 0, - 1.6467231899999999, ], [ - 0, - 0, 1.0, + 0, + 0, ], [ + 1.26606588, 1, 0, - 1.26606588, ], [ + 1.6467231899999999, 1.5, 0, - 1.6467231899999999, ], [ + 3.2898391400000002, 2.5, 0, - 3.2898391400000002, ], [ + 7.3782034300000001, 3.5, 0, - 7.3782034300000001, ], [ + '#NUM!', -3.5, -1, - '#NUM!', ], [ + '#VALUE!', true, 1, - '#VALUE!', ], [ + '#VALUE!', 1, true, - '#VALUE!', ], [ + 104777847.71856035, 21, 2, - 104777847.71856035, ], ]; diff --git a/tests/data/Calculation/Engineering/BESSELJ.php b/tests/data/Calculation/Engineering/BESSELJ.php index 5165cf23..b1220cc1 100644 --- a/tests/data/Calculation/Engineering/BESSELJ.php +++ b/tests/data/Calculation/Engineering/BESSELJ.php @@ -2,168 +2,168 @@ return [ [ + '#NUM!', 1.5, -1, - '#NUM!', ], [ + 0.0, 0, 1, - 0.0, ], [ - 1, - 1, 0.44005059000000002, + 1, + 1, ], [ + 0.00024976000000000002, 1, 5, - 0.00024976000000000002, ], [ + 0.32992572999999997, 1.8999999999999999, 2, - 0.32992572999999997, ], [ + -0.49709409999999998, -2.5, 1.5, - -0.49709409999999998, ], [ + 0.13737753, 3.5, 1, - 0.13737753, ], [ + 0.013974, 0.89000000000000001, 3, - 0.013974, ], [ + 0.45862918000000003, 3.5, 2, - 0.45862918000000003, ], [ + '#VALUE!', 1.5, 'XYZ', - '#VALUE!', ], [ + '#VALUE!', 'ABC', 3, - '#VALUE!', ], [ + -0.13737753, -3.5, 1, - -0.13737753, ], [ + -0.34323577999999999, -0.73499999999999999, 1, - -0.34323577999999999, ], [ + 0.0, 0, 1, - 0.0, ], [ + 0.01749732, 0.035000000000000003, 1, - 0.01749732, ], [ + 0.55793651, 1.5, 1, - 0.55793651, ], [ + 0.49709409999999998, 2.5, 1, - 0.49709409999999998, ], [ + 0.13737753, 3.5, 1, - 0.13737753, ], [ + 0.14484733999999999, -9, 2, - 0.14484733999999999, ], [ + 0.064538960000000006, -0.73499999999999999, 2, - 0.064538960000000006, ], [ + 0.0, 0, 2, - 0.0, ], [ + 0.094586299999999998, 0.90000000000000002, 2, - 0.094586299999999998, ], [ + 0.32992572999999997, 1.8999999999999999, 2, - 0.32992572999999997, ], [ + 0.00015311, 0.035000000000000003, 2, - 0.00015311, ], [ + 0.45862918000000003, 3.5, 2, - 0.45862918000000003, ], [ + 0.36412814999999998, 4, 2, - 0.36412814999999998, ], [ + 8.8999999999999995E-7, 0.035000000000000003, 3, - 8.8999999999999995E-7, ], [ + 0.0069296499999999999, 0.69999999999999996, 3, - 0.0069296499999999999, ], [ + 0.013974, 0.89000000000000001, 3, - 0.013974, ], [ + 0.43017147, 4, 3, - 0.43017147, ], [ + 0.13208665999999999, 4, 5, - 0.13208665999999999, ], [ + 2.4680000000000001E-5, 1.5, 7, - 2.4680000000000001E-5, ], [ + 8.4400000000000005E-5, 3, 9, - 8.4400000000000005E-5, ], ]; diff --git a/tests/data/Calculation/Engineering/BESSELK.php b/tests/data/Calculation/Engineering/BESSELK.php index 5f10ffb7..27ce7189 100644 --- a/tests/data/Calculation/Engineering/BESSELK.php +++ b/tests/data/Calculation/Engineering/BESSELK.php @@ -2,193 +2,193 @@ return [ [ + '#NUM!', 1.5, -1, - '#NUM!', ], [ + '#NUM!', 0, 2, - '#NUM!', ], [ + 7990.0124327800004, 0.10000000000000001, 3, - 7990.0124327800004, ], [ + 0.42102444, 1, 0, - 0.42102444, ], [ + 0.21380557, 1.5, 0, - 0.21380557, ], [ + '#NUM!', -1.5, 2, - '#NUM!', ], [ + 0.27738780000000002, 1.5, 1, - 0.27738780000000002, ], [ + 0.58365597000000002, 1.5, 2, - 0.58365597000000002, ], [ + 0.094982449999999996, 2.2999999999999998, 1.5, - 0.094982449999999996, ], [ + 0.073890819999999996, 2.5, 1, - 0.073890819999999996, ], [ + 0.022239390000000001, 3.5, 1, - 0.022239390000000001, ], [ + 0.059161819999999997, 3.5, 3, - 0.059161819999999997, ], [ + 397.95880105999998, 3, 9, - 397.95880105999998, ], [ + 0.032307120000000002, 3.5, 2, - 0.032307120000000002, ], [ + '#VALUE!', 1.5, 'XYZ', - '#VALUE!', ], [ + '#VALUE!', 'ABC', 3, - '#VALUE!', ], [ + '#NUM!', -3.5, 1, - '#NUM!', ], [ + '#NUM!', -0.73499999999999999, 1, - '#NUM!', ], [ + '#NUM!', 0, 1, - '#NUM!', ], [ + 28.50197, 0.035000000000000003, 1, - 28.50197, ], [ + 0.27738780000000002, 1.5, 1, - 0.27738780000000002, ], [ + 0.073890819999999996, 2.5, 1, - 0.073890819999999996, ], [ + 0.022239390000000001, 3.5, 1, - 0.022239390000000001, ], [ + '#NUM!', -9, 2, - '#NUM!', ], [ + '#NUM!', -0.73499999999999999, 2, - '#NUM!', ], [ + '#NUM!', 0, 2, - '#NUM!', ], [ + 2.0790271499999999, 0.90000000000000002, 2, - 2.0790271499999999, ], [ + 0.29690929999999999, 1.8999999999999999, 2, - 0.29690929999999999, ], [ + 1632.1537072900001, 0.035000000000000003, 2, - 1632.1537072900001, ], [ + 0.032307120000000002, 3.5, 2, - 0.032307120000000002, ], [ + 0.017401429999999999, 4, 2, - 0.017401429999999999, ], [ + 186560.35423214, 0.035000000000000003, 3, - 186560.35423214, ], [ + 21.972169050000002, 0.69999999999999996, 3, - 21.972169050000002, ], [ + 10.31747315, 0.89000000000000001, 3, - 10.31747315, ], [ + 0.029884919999999999, 4, 3, - 0.029884919999999999, ], [ + 0.15434255, 4, 5, - 0.15434255, ], [ + 2457.7004395499998, 1.5, 7, - 2457.7004395499998, ], [ + 397.95880105999998, 3, 9, - 397.95880105999998, ], ]; diff --git a/tests/data/Calculation/Engineering/BESSELY.php b/tests/data/Calculation/Engineering/BESSELY.php index 8699e435..9d2d4f5a 100644 --- a/tests/data/Calculation/Engineering/BESSELY.php +++ b/tests/data/Calculation/Engineering/BESSELY.php @@ -2,118 +2,118 @@ return [ [ + '#NUM!', 1.5, -1, - '#NUM!', ], [ + 0.49807035999999999, 2.5, 0, - 0.49807035999999999, ], [ + 0.14591814, 2.5, 1, - 0.14591814, ], [ + -0.38133584999999998, 2.5, 2, - -0.38133584999999998, ], [ + 0.41018842, 3.5, 1, - 0.41018842, ], [ + -0.35833535, 3.5, 3, - -0.35833535, ], [ + 0.045371439999999999, 3.5, 2, - 0.045371439999999999, ], [ + -0.17121431000000001, 12.5, 0, - -0.17121431000000001, ], [ + '#VALUE!', 1.5, 'XYZ', - '#VALUE!', ], [ + '#VALUE!', 'ABC', 3, - '#VALUE!', ], [ + '#NUM!', -3.5, 1, - '#NUM!', ], [ + '#NUM!', -0.73499999999999999, 1, - '#NUM!', ], [ + '#NUM!', 0, 1, - '#NUM!', ], [ + -0.41230863000000001, 1.5, 1, - -0.41230863000000001, ], [ + 0.14591814, 2.5, 1, - 0.14591814, ], [ + 0.41018842, 3.5, 1, - 0.41018842, ], [ + '#NUM!', -9, 2, - '#NUM!', ], [ + '#NUM!', -0.73499999999999999, 2, - '#NUM!', ], [ + '#NUM!', 0, 2, - '#NUM!', ], [ + -1.9459096, 0.90000000000000002, 2, - -1.9459096, ], [ + -0.66987867999999995, 1.8999999999999999, 2, - -0.66987867999999995, ], [ + 0.045371439999999999, 3.5, 2, - 0.045371439999999999, ], [ + -0.79585141999999998, 4, 5, - -0.79585141999999998, ], ]; diff --git a/tests/data/Calculation/Engineering/BIN2DEC.php b/tests/data/Calculation/Engineering/BIN2DEC.php index 736705ea..ce9b6d34 100644 --- a/tests/data/Calculation/Engineering/BIN2DEC.php +++ b/tests/data/Calculation/Engineering/BIN2DEC.php @@ -2,25 +2,25 @@ return [ [ - '10110010', '178', + '10110010', ], [ - '1100100', '100', + '1100100', ], // Too large [ - '111001010101', '#NUM!', + '111001010101', ], [ - '101', '5', + '101', ], [ - '10', '2', + '10', ], [ '0', @@ -28,22 +28,22 @@ return [ ], // Invalid binary number [ - '21', '#NUM!', + '21', ], // Non string [ - true, '#VALUE!', + true, ], // 2's Complement [ - '1110010101', '-107', + '1110010101', ], // 2's Complement [ - '1111111111', '-1', + '1111111111', ], ]; diff --git a/tests/data/Calculation/Engineering/BIN2HEX.php b/tests/data/Calculation/Engineering/BIN2HEX.php index abf505ba..e88fb3fa 100644 --- a/tests/data/Calculation/Engineering/BIN2HEX.php +++ b/tests/data/Calculation/Engineering/BIN2HEX.php @@ -2,49 +2,49 @@ return [ [ - '10110010', 'B2', + '10110010', ], // Too large [ - '111001010101', '#NUM!', + '111001010101', ], // Leading places [ + '00FB', '11111011', 4, - '00FB', ], // Leading places as a float [ + '0FB', '11111011', 3.75, - '0FB', ], // Leading places negative [ + '#NUM!', '11111011', -1, - '#NUM!', ], // Leading places non-numeric [ + '#VALUE!', '11111011', 'ABC', - '#VALUE!', ], [ - '1110', 'E', + '1110', ], [ - '101', '5', + '101', ], [ - '10', '2', + '10', ], [ '0', @@ -52,22 +52,22 @@ return [ ], // Invalid binary number [ - '21', '#NUM!', + '21', ], // Non string [ - true, '#VALUE!', + true, ], // 2's Complement [ - '1110010101', 'FFFFFFFF95', + '1110010101', ], // 2's Complement [ - '1111111111', 'FFFFFFFFFF', + '1111111111', ], ]; diff --git a/tests/data/Calculation/Engineering/BIN2OCT.php b/tests/data/Calculation/Engineering/BIN2OCT.php index d488e7d3..dd1e4ccb 100644 --- a/tests/data/Calculation/Engineering/BIN2OCT.php +++ b/tests/data/Calculation/Engineering/BIN2OCT.php @@ -2,53 +2,53 @@ return [ [ - '1100100', '144', + '1100100', ], [ - '10110010', '262', + '10110010', ], // Too large [ - '111001010101', '#NUM!', + '111001010101', ], // Leading places [ + '011', '1001', 3, - '011', ], // Leading places as a float [ + '0011', '1001', 4.75, - '0011', ], // Leading places negative [ + '#NUM!', '1001', -1, - '#NUM!', ], // Leading places non-numeric [ + '#VALUE!', '1001', 'ABC', - '#VALUE!', ], [ - '00000010', '2', + '00000010', ], [ - '00000101', '5', + '00000101', ], [ - '00001101', '15', + '00001101', ], [ '0', @@ -56,22 +56,22 @@ return [ ], // Invalid binary number [ - '21', '#NUM!', + '21', ], // Non string [ - true, '#VALUE!', + true, ], // 2's Complement [ - '1110010101', '7777777625', + '1110010101', ], // 2's Complement [ - '1111111111', '7777777777', + '1111111111', ], ]; diff --git a/tests/data/Calculation/Engineering/COMPLEX.php b/tests/data/Calculation/Engineering/COMPLEX.php index f9b26fd2..eeb63b71 100644 --- a/tests/data/Calculation/Engineering/COMPLEX.php +++ b/tests/data/Calculation/Engineering/COMPLEX.php @@ -2,96 +2,96 @@ return [ [ + '3+4i', 3, 4, - '3+4i', ], [ + '3+4j', 3, 4, 'j', - '3+4j', ], [ + '12.34+5.67j', 12.34, 5.6699999999999999, 'j', - '12.34+5.67j', ], [ + '#VALUE!', 3.5, 'A', - '#VALUE!', ], [ + '1.234E-5+6780000000i', 1.234E-5, 6780000000.0, - '1.234E-5+6780000000i', ], [ + '123400+6.78E-9i', 123400.0, 6.7800000000000002E-9, - '123400+6.78E-9i', ], [ + '3.5+2.5i', 3.5, 2.5, - '3.5+2.5i', ], [ + '3.5+i', 3.5, 1, - '3.5+i', ], [ + 3.5, 3.5, 0, - 3.5, ], [ - 3.5, - -1, '3.5-i', + 3.5, + -1, ], [ + '3.5-2.5i', 3.5, -2.5, - '3.5-2.5i', ], [ + '1+2.5i', 1, 2.5, - '1+2.5i', ], [ - 1, - 1, '1+i', + 1, + 1, ], [ + 1, 1, 0, - 1, ], [ - 1, - -1, '1-i', + 1, + -1, ], [ + '1-2.5i', 1, -2.5, - '1-2.5i', ], [ + '2.5i', 0, 2.5, - '2.5i', ], [ + 'i', 0, 1, - 'i', ], [ 0, @@ -99,414 +99,414 @@ return [ 0, ], [ - 0, - -1, '-i', + 0, + -1, ], [ + '-2.5i', 0, -2.5, - '-2.5i', ], [ - -1, - 2.5, '-1+2.5i', + -1, + 2.5, ], [ - -1, - 1, '-1+i', + -1, + 1, ], [ + -1, -1, 0, - -1, ], [ - -1, - -1, '-1-i', + -1, + -1, ], [ - -1, - -2.5, '-1-2.5i', + -1, + -2.5, ], [ + '-3.5+2.5i', -3.5, 2.5, - '-3.5+2.5i', ], [ + '-3.5+i', -3.5, 1, - '-3.5+i', ], [ + '-3.5', -3.5, 0, - '-3.5', ], [ + '-3.5-i', -3.5, -1, - '-3.5-i', ], [ + '-3.5-2.5i', -3.5, -2.5, - '-3.5-2.5i', ], [ - -2.5, - -2.5, '-2.5-2.5i', + -2.5, + -2.5, ], [ - -2.5, - -2.5, '-2.5-2.5i', + -2.5, + -2.5, ], [ + '-1.5-2.5i', -1.5, -2.5, - '-1.5-2.5i', ], [ + '-1.5-2.5i', -1.5, -2.5, - '-1.5-2.5i', ], [ - -0.5, - -2.5, '-0.5-2.5i', - ], - [ - 0, - -2.5, - '-2.5i', - ], - [ - 0.5, - -2.5, - '0.5-2.5i', - ], - [ - 1, - -2.5, - '1-2.5i', - ], - [ - 1.5, - -2.5, - '1.5-2.5i', - ], - [ - 2, - -2.5, - '2-2.5i', - ], - [ - 2.5, - -2.5, - '2.5-2.5i', - ], - [ - 3, - -2.5, - '3-2.5i', - ], - [ - 3.5, - -2.5, - '3.5-2.5i', - ], - [ - -2.5, - -2.5, - '-2.5-2.5i', - ], - [ - -2.5, - -2.5, - '-2.5-2.5i', - ], - [ - -1.5, - -2.5, - '-1.5-2.5i', - ], - [ - -1.5, - -2.5, - '-1.5-2.5i', - ], - [ -0.5, -2.5, + ], + [ + '-2.5i', + 0, + -2.5, + ], + [ + '0.5-2.5i', + 0.5, + -2.5, + ], + [ + '1-2.5i', + 1, + -2.5, + ], + [ + '1.5-2.5i', + 1.5, + -2.5, + ], + [ + '2-2.5i', + 2, + -2.5, + ], + [ + '2.5-2.5i', + 2.5, + -2.5, + ], + [ + '3-2.5i', + 3, + -2.5, + ], + [ + '3.5-2.5i', + 3.5, + -2.5, + ], + [ + '-2.5-2.5i', + -2.5, + -2.5, + ], + [ + '-2.5-2.5i', + -2.5, + -2.5, + ], + [ + '-1.5-2.5i', + -1.5, + -2.5, + ], + [ + '-1.5-2.5i', + -1.5, + -2.5, + ], + [ '-0.5-2.5i', + -0.5, + -2.5, ], [ - 0, - -2.5, '-2.5i', + 0, + -2.5, ], [ - 0.5, - -2.5, '0.5-2.5i', + 0.5, + -2.5, ], [ - 1, - -2.5, '1-2.5i', + 1, + -2.5, ], [ - 1.5, - -2.5, '1.5-2.5i', + 1.5, + -2.5, ], [ - 2, - -2.5, '2-2.5i', + 2, + -2.5, ], [ - 2.5, - -2.5, '2.5-2.5i', + 2.5, + -2.5, ], [ - 3, - -2.5, '3-2.5i', + 3, + -2.5, ], [ - 3.5, - -2.5, '3.5-2.5i', + 3.5, + -2.5, ], [ + '-2.5-1.5i', -2.5, -1.5, - '-2.5-1.5i', ], [ + '-2.5-1.5i', -2.5, -1.5, - '-2.5-1.5i', ], [ - -1.5, - -1.5, '-1.5-1.5i', + -1.5, + -1.5, ], [ - -1.5, - -1.5, '-1.5-1.5i', + -1.5, + -1.5, ], [ + '-0.5-1.5i', -0.5, -1.5, - '-0.5-1.5i', ], [ + '-1.5i', 0, -1.5, - '-1.5i', ], [ + '0.5-1.5i', 0.5, -1.5, - '0.5-1.5i', ], [ + '1-1.5i', 1, -1.5, - '1-1.5i', ], [ + '1.5-1.5i', 1.5, -1.5, - '1.5-1.5i', ], [ + '2-1.5i', 2, -1.5, - '2-1.5i', ], [ + '2.5-1.5i', 2.5, -1.5, - '2.5-1.5i', ], [ + '3-1.5i', 3, -1.5, - '3-1.5i', ], [ + '3.5-1.5i', 3.5, -1.5, - '3.5-1.5i', ], [ + '-2.5-1.5i', -2.5, -1.5, - '-2.5-1.5i', ], [ + '-2.5-1.5i', -2.5, -1.5, - '-2.5-1.5i', ], [ - -1.5, - -1.5, '-1.5-1.5i', + -1.5, + -1.5, ], [ - -1.5, - -1.5, '-1.5-1.5i', + -1.5, + -1.5, ], [ + '-0.5-1.5i', -0.5, -1.5, - '-0.5-1.5i', ], [ + '-1.5i', 0, -1.5, - '-1.5i', ], [ + '0.5-1.5i', 0.5, -1.5, - '0.5-1.5i', ], [ + '1-1.5i', 1, -1.5, - '1-1.5i', ], [ + '1.5-1.5i', 1.5, -1.5, - '1.5-1.5i', ], [ + '2-1.5i', 2, -1.5, - '2-1.5i', ], [ + '2.5-1.5i', 2.5, -1.5, - '2.5-1.5i', ], [ + '3-1.5i', 3, -1.5, - '3-1.5i', ], [ + '3.5-1.5i', 3.5, -1.5, - '3.5-1.5i', ], [ + '-2.5-0.5i', -2.5, -0.5, - '-2.5-0.5i', ], [ + '-2.5-0.5i', -2.5, -0.5, - '-2.5-0.5i', ], [ + '-1.5-0.5i', -1.5, -0.5, - '-1.5-0.5i', ], [ + '-1.5-0.5i', -1.5, -0.5, - '-1.5-0.5i', ], [ - -0.5, - -0.5, '-0.5-0.5i', + -0.5, + -0.5, ], [ - 0, - -0.5, '-0.5i', + 0, + -0.5, ], [ - 0.5, - -0.5, '0.5-0.5i', + 0.5, + -0.5, ], [ - 1, - -0.5, '1-0.5i', + 1, + -0.5, ], [ - 1.5, - -0.5, '1.5-0.5i', + 1.5, + -0.5, ], [ - 2, - -0.5, '2-0.5i', + 2, + -0.5, ], [ - 2.5, - -0.5, '2.5-0.5i', + 2.5, + -0.5, ], [ - 3, - -0.5, '3-0.5i', + 3, + -0.5, ], [ - 3.5, - -0.5, '3.5-0.5i', + 3.5, + -0.5, ], [ -2.5, - 0, -2.5, + 0, ], [ -2.5, - 0, -2.5, + 0, ], [ -1.5, - 0, -1.5, + 0, ], [ -1.5, - 0, -1.5, + 0, ], [ -0.5, - 0, -0.5, + 0, ], [ 0, @@ -515,2571 +515,2571 @@ return [ ], [ 0.5, - 0, 0.5, + 0, ], [ 1, - 0, 1, + 0, ], [ 1.5, - 0, 1.5, + 0, ], [ 2, - 0, 2, + 0, ], [ 2.5, - 0, 2.5, + 0, ], [ 3, - 0, 3, + 0, ], [ + 3.5, 3.5, 0, - 3.5, ], [ + '-2.5+0.5i', -2.5, 0.5, - '-2.5+0.5i', ], [ + '-2.5+0.5i', -2.5, 0.5, - '-2.5+0.5i', ], [ + '-1.5+0.5i', -1.5, 0.5, - '-1.5+0.5i', ], [ + '-1.5+0.5i', -1.5, 0.5, - '-1.5+0.5i', ], [ - -0.5, - 0.5, '-0.5+0.5i', + -0.5, + 0.5, ], [ - 0, - 0.5, '0.5i', + 0, + 0.5, ], [ - 0.5, - 0.5, '0.5+0.5i', + 0.5, + 0.5, ], [ - 1, - 0.5, '1+0.5i', + 1, + 0.5, ], [ - 1.5, - 0.5, '1.5+0.5i', + 1.5, + 0.5, ], [ - 2, - 0.5, '2+0.5i', + 2, + 0.5, ], [ - 2.5, - 0.5, '2.5+0.5i', + 2.5, + 0.5, ], [ - 3, - 0.5, '3+0.5i', + 3, + 0.5, ], [ - 3.5, - 0.5, '3.5+0.5i', + 3.5, + 0.5, ], [ + '-2.5+i', -2.5, 1, - '-2.5+i', ], [ + '-2.5+i', -2.5, 1, - '-2.5+i', ], [ + '-1.5+i', -1.5, 1, - '-1.5+i', ], [ + '-1.5+i', -1.5, 1, - '-1.5+i', ], [ - -0.5, - 1, '-0.5+i', + -0.5, + 1, ], [ + 'i', 0, 1, - 'i', ], [ - 0.5, - 1, '0.5+i', + 0.5, + 1, ], [ - 1, - 1, '1+i', + 1, + 1, ], [ - 1.5, - 1, '1.5+i', + 1.5, + 1, ], [ - 2, - 1, '2+i', + 2, + 1, ], [ - 2.5, - 1, '2.5+i', + 2.5, + 1, ], [ - 3, - 1, '3+i', + 3, + 1, ], [ - 3.5, - 1, '3.5+i', + 3.5, + 1, ], [ + '-2.5+1.5i', -2.5, 1.5, - '-2.5+1.5i', ], [ + '-2.5+1.5i', -2.5, 1.5, - '-2.5+1.5i', ], [ + '-1.5+1.5i', -1.5, 1.5, - '-1.5+1.5i', ], [ + '-1.5+1.5i', -1.5, 1.5, - '-1.5+1.5i', ], [ - -0.5, - 1.5, '-0.5+1.5i', + -0.5, + 1.5, ], [ - 0, - 1.5, '1.5i', + 0, + 1.5, ], [ - 0.5, - 1.5, '0.5+1.5i', + 0.5, + 1.5, ], [ - 1, - 1.5, '1+1.5i', + 1, + 1.5, ], [ - 1.5, - 1.5, '1.5+1.5i', + 1.5, + 1.5, ], [ - 2, - 1.5, '2+1.5i', + 2, + 1.5, ], [ - 2.5, - 1.5, '2.5+1.5i', + 2.5, + 1.5, ], [ - 3, - 1.5, '3+1.5i', + 3, + 1.5, ], [ - 3.5, - 1.5, '3.5+1.5i', + 3.5, + 1.5, ], [ + '-2.5+2i', -2.5, 2, - '-2.5+2i', ], [ + '-2.5+2i', -2.5, 2, - '-2.5+2i', ], [ + '-1.5+2i', -1.5, 2, - '-1.5+2i', ], [ + '-1.5+2i', -1.5, 2, - '-1.5+2i', ], [ - -0.5, - 2, '-0.5+2i', + -0.5, + 2, ], [ - 0, - 2, '2i', + 0, + 2, ], [ - 0.5, - 2, '0.5+2i', + 0.5, + 2, ], [ - 1, - 2, '1+2i', + 1, + 2, ], [ - 1.5, - 2, '1.5+2i', + 1.5, + 2, ], [ - 2, - 2, '2+2i', + 2, + 2, ], [ - 2.5, - 2, '2.5+2i', + 2.5, + 2, ], [ - 3, - 2, '3+2i', + 3, + 2, ], [ - 3.5, - 2, '3.5+2i', + 3.5, + 2, ], [ + '-2.5+2.5i', -2.5, 2.5, - '-2.5+2.5i', ], [ + '-2.5+2.5i', -2.5, 2.5, - '-2.5+2.5i', ], [ + '-1.5+2.5i', -1.5, 2.5, - '-1.5+2.5i', ], [ + '-1.5+2.5i', -1.5, 2.5, - '-1.5+2.5i', ], [ - -0.5, - 2.5, '-0.5+2.5i', + -0.5, + 2.5, ], [ - 0, - 2.5, '2.5i', + 0, + 2.5, ], [ - 0.5, - 2.5, '0.5+2.5i', + 0.5, + 2.5, ], [ - 1, - 2.5, '1+2.5i', + 1, + 2.5, ], [ - 1.5, - 2.5, '1.5+2.5i', + 1.5, + 2.5, ], [ - 2, - 2.5, '2+2.5i', + 2, + 2.5, ], [ - 2.5, - 2.5, '2.5+2.5i', + 2.5, + 2.5, ], [ - 3, - 2.5, '3+2.5i', + 3, + 2.5, ], [ - 3.5, - 2.5, '3.5+2.5i', + 3.5, + 2.5, ], [ + '-2.5+3i', -2.5, 3, - '-2.5+3i', ], [ + '-2.5+3i', -2.5, 3, - '-2.5+3i', ], [ + '-1.5+3i', -1.5, 3, - '-1.5+3i', ], [ + '-1.5+3i', -1.5, 3, - '-1.5+3i', ], [ - -0.5, - 3, '-0.5+3i', + -0.5, + 3, ], [ - 0, - 3, '3i', + 0, + 3, ], [ - 0.5, - 3, '0.5+3i', + 0.5, + 3, ], [ - 1, - 3, '1+3i', + 1, + 3, ], [ - 1.5, - 3, '1.5+3i', + 1.5, + 3, ], [ - 2, - 3, '2+3i', + 2, + 3, ], [ - 2.5, - 3, '2.5+3i', + 2.5, + 3, ], [ - 3, - 3, '3+3i', + 3, + 3, ], [ - 3.5, - 3, '3.5+3i', + 3.5, + 3, ], [ + '-2.5+3.5i', -2.5, 3.5, - '-2.5+3.5i', ], [ + '-2.5+3.5i', -2.5, 3.5, - '-2.5+3.5i', ], [ + '-1.5+3.5i', -1.5, 3.5, - '-1.5+3.5i', ], [ + '-1.5+3.5i', -1.5, 3.5, - '-1.5+3.5i', ], [ - -0.5, - 3.5, '-0.5+3.5i', + -0.5, + 3.5, ], [ - 0, - 3.5, '3.5i', + 0, + 3.5, ], [ - 0.5, - 3.5, '0.5+3.5i', + 0.5, + 3.5, ], [ - 1, - 3.5, '1+3.5i', + 1, + 3.5, ], [ - 1.5, - 3.5, '1.5+3.5i', + 1.5, + 3.5, ], [ - 2, - 3.5, '2+3.5i', + 2, + 3.5, ], [ - 2.5, - 3.5, '2.5+3.5i', + 2.5, + 3.5, ], [ - 3, - 3.5, '3+3.5i', + 3, + 3.5, ], [ - 3.5, - 3.5, '3.5+3.5i', + 3.5, + 3.5, ], [ + '-2.5-2.5i', -2.5, -2.5, 'i', - '-2.5-2.5i', ], [ + '-2.5-2.5i', -2.5, -2.5, 'i', - '-2.5-2.5i', ], [ + '-1.5-2.5i', -1.5, -2.5, 'i', - '-1.5-2.5i', ], [ + '-1.5-2.5i', -1.5, -2.5, 'i', - '-1.5-2.5i', ], [ - -0.5, - -2.5, - 'i', '-0.5-2.5i', - ], - [ - 0, - -2.5, - 'i', - '-2.5i', - ], - [ - 0.5, - -2.5, - 'i', - '0.5-2.5i', - ], - [ - 1, - -2.5, - 'i', - '1-2.5i', - ], - [ - 1.5, - -2.5, - 'i', - '1.5-2.5i', - ], - [ - 2, - -2.5, - 'i', - '2-2.5i', - ], - [ - 2.5, - -2.5, - 'i', - '2.5-2.5i', - ], - [ - 3, - -2.5, - 'i', - '3-2.5i', - ], - [ - 3.5, - -2.5, - 'i', - '3.5-2.5i', - ], - [ - -2.5, - -2.5, - 'i', - '-2.5-2.5i', - ], - [ - -2.5, - -2.5, - 'i', - '-2.5-2.5i', - ], - [ - -1.5, - -2.5, - 'i', - '-1.5-2.5i', - ], - [ - -1.5, - -2.5, - 'i', - '-1.5-2.5i', - ], - [ -0.5, -2.5, 'i', + ], + [ + '-2.5i', + 0, + -2.5, + 'i', + ], + [ + '0.5-2.5i', + 0.5, + -2.5, + 'i', + ], + [ + '1-2.5i', + 1, + -2.5, + 'i', + ], + [ + '1.5-2.5i', + 1.5, + -2.5, + 'i', + ], + [ + '2-2.5i', + 2, + -2.5, + 'i', + ], + [ + '2.5-2.5i', + 2.5, + -2.5, + 'i', + ], + [ + '3-2.5i', + 3, + -2.5, + 'i', + ], + [ + '3.5-2.5i', + 3.5, + -2.5, + 'i', + ], + [ + '-2.5-2.5i', + -2.5, + -2.5, + 'i', + ], + [ + '-2.5-2.5i', + -2.5, + -2.5, + 'i', + ], + [ + '-1.5-2.5i', + -1.5, + -2.5, + 'i', + ], + [ + '-1.5-2.5i', + -1.5, + -2.5, + 'i', + ], + [ '-0.5-2.5i', - ], - [ - 0, + -0.5, -2.5, 'i', + ], + [ '-2.5i', - ], - [ - 0.5, + 0, -2.5, 'i', + ], + [ '0.5-2.5i', - ], - [ - 1, + 0.5, -2.5, 'i', + ], + [ '1-2.5i', - ], - [ - 1.5, + 1, -2.5, 'i', + ], + [ '1.5-2.5i', - ], - [ - 2, + 1.5, -2.5, 'i', + ], + [ '2-2.5i', - ], - [ - 2.5, + 2, -2.5, 'i', + ], + [ '2.5-2.5i', - ], - [ - 3, + 2.5, -2.5, 'i', + ], + [ '3-2.5i', - ], - [ - 3.5, + 3, -2.5, 'i', + ], + [ '3.5-2.5i', + 3.5, + -2.5, + 'i', ], [ + '-2.5-1.5i', -2.5, -1.5, 'i', - '-2.5-1.5i', ], [ + '-2.5-1.5i', -2.5, -1.5, 'i', - '-2.5-1.5i', ], [ + '-1.5-1.5i', -1.5, -1.5, 'i', - '-1.5-1.5i', ], [ + '-1.5-1.5i', -1.5, -1.5, 'i', - '-1.5-1.5i', ], [ + '-0.5-1.5i', -0.5, -1.5, 'i', - '-0.5-1.5i', ], [ + '-1.5i', 0, -1.5, 'i', - '-1.5i', ], [ + '0.5-1.5i', 0.5, -1.5, 'i', - '0.5-1.5i', ], [ + '1-1.5i', 1, -1.5, 'i', - '1-1.5i', ], [ + '1.5-1.5i', 1.5, -1.5, 'i', - '1.5-1.5i', ], [ + '2-1.5i', 2, -1.5, 'i', - '2-1.5i', ], [ + '2.5-1.5i', 2.5, -1.5, 'i', - '2.5-1.5i', ], [ + '3-1.5i', 3, -1.5, 'i', - '3-1.5i', ], [ + '3.5-1.5i', 3.5, -1.5, 'i', - '3.5-1.5i', ], [ + '-2.5-1.5i', -2.5, -1.5, 'i', - '-2.5-1.5i', ], [ + '-2.5-1.5i', -2.5, -1.5, 'i', - '-2.5-1.5i', ], [ + '-1.5-1.5i', -1.5, -1.5, 'i', - '-1.5-1.5i', ], [ + '-1.5-1.5i', -1.5, -1.5, 'i', - '-1.5-1.5i', ], [ + '-0.5-1.5i', -0.5, -1.5, 'i', - '-0.5-1.5i', ], [ + '-1.5i', 0, -1.5, 'i', - '-1.5i', ], [ + '0.5-1.5i', 0.5, -1.5, 'i', - '0.5-1.5i', ], [ + '1-1.5i', 1, -1.5, 'i', - '1-1.5i', ], [ + '1.5-1.5i', 1.5, -1.5, 'i', - '1.5-1.5i', ], [ + '2-1.5i', 2, -1.5, 'i', - '2-1.5i', ], [ + '2.5-1.5i', 2.5, -1.5, 'i', - '2.5-1.5i', ], [ + '3-1.5i', 3, -1.5, 'i', - '3-1.5i', ], [ + '3.5-1.5i', 3.5, -1.5, 'i', - '3.5-1.5i', ], [ + '-2.5-0.5i', -2.5, -0.5, 'i', - '-2.5-0.5i', ], [ + '-2.5-0.5i', -2.5, -0.5, 'i', - '-2.5-0.5i', ], [ + '-1.5-0.5i', -1.5, -0.5, 'i', - '-1.5-0.5i', ], [ + '-1.5-0.5i', -1.5, -0.5, 'i', - '-1.5-0.5i', ], [ - -0.5, - -0.5, - 'i', '-0.5-0.5i', - ], - [ - 0, + -0.5, -0.5, 'i', + ], + [ '-0.5i', - ], - [ - 0.5, + 0, -0.5, 'i', + ], + [ '0.5-0.5i', - ], - [ - 1, + 0.5, -0.5, 'i', + ], + [ '1-0.5i', - ], - [ - 1.5, + 1, -0.5, 'i', + ], + [ '1.5-0.5i', - ], - [ - 2, + 1.5, -0.5, 'i', + ], + [ '2-0.5i', - ], - [ - 2.5, + 2, -0.5, 'i', + ], + [ '2.5-0.5i', - ], - [ - 3, + 2.5, -0.5, 'i', + ], + [ '3-0.5i', - ], - [ - 3.5, + 3, -0.5, 'i', + ], + [ '3.5-0.5i', + 3.5, + -0.5, + 'i', ], [ -2.5, - 0, - 'i', - -2.5, - ], - [ -2.5, 0, 'i', + ], + [ -2.5, + -2.5, + 0, + 'i', ], [ + -1.5, -1.5, 0, 'i', - -1.5, ], [ + -1.5, -1.5, 0, 'i', - -1.5, ], [ -0.5, - 0, - 'i', -0.5, + 0, + 'i', ], [ 0, 0, - 'i', 0, + 'i', ], [ + 0.5, 0.5, 0, 'i', - 0.5, ], [ 1, - 0, - 'i', 1, + 0, + 'i', ], [ 1.5, - 0, - 'i', 1.5, + 0, + 'i', ], [ 2, - 0, - 'i', 2, + 0, + 'i', ], [ 2.5, - 0, - 'i', 2.5, + 0, + 'i', ], [ 3, - 0, - 'i', 3, + 0, + 'i', ], [ + 3.5, 3.5, 0, 'i', - 3.5, ], [ + '-2.5+0.5i', -2.5, 0.5, 'i', - '-2.5+0.5i', ], [ + '-2.5+0.5i', -2.5, 0.5, 'i', - '-2.5+0.5i', ], [ + '-1.5+0.5i', -1.5, 0.5, 'i', - '-1.5+0.5i', ], [ + '-1.5+0.5i', -1.5, 0.5, 'i', - '-1.5+0.5i', ], [ - -0.5, - 0.5, - 'i', '-0.5+0.5i', - ], - [ - 0, + -0.5, 0.5, 'i', + ], + [ '0.5i', - ], - [ - 0.5, + 0, 0.5, 'i', + ], + [ '0.5+0.5i', - ], - [ - 1, + 0.5, 0.5, 'i', + ], + [ '1+0.5i', - ], - [ - 1.5, + 1, 0.5, 'i', + ], + [ '1.5+0.5i', - ], - [ - 2, + 1.5, 0.5, 'i', + ], + [ '2+0.5i', - ], - [ - 2.5, + 2, 0.5, 'i', + ], + [ '2.5+0.5i', - ], - [ - 3, + 2.5, 0.5, 'i', + ], + [ '3+0.5i', - ], - [ - 3.5, + 3, 0.5, 'i', + ], + [ '3.5+0.5i', + 3.5, + 0.5, + 'i', ], [ + '-2.5+i', -2.5, 1, 'i', - '-2.5+i', ], [ + '-2.5+i', -2.5, 1, 'i', - '-2.5+i', ], [ + '-1.5+i', -1.5, 1, 'i', - '-1.5+i', ], [ + '-1.5+i', -1.5, 1, 'i', - '-1.5+i', ], [ - -0.5, - 1, - 'i', '-0.5+i', + -0.5, + 1, + 'i', ], [ + 'i', 0, 1, 'i', - 'i', ], [ - 0.5, - 1, - 'i', '0.5+i', - ], - [ - 1, + 0.5, 1, 'i', + ], + [ '1+i', - ], - [ - 1.5, + 1, 1, 'i', + ], + [ '1.5+i', - ], - [ - 2, + 1.5, 1, 'i', + ], + [ '2+i', - ], - [ - 2.5, + 2, 1, 'i', + ], + [ '2.5+i', - ], - [ - 3, + 2.5, 1, 'i', + ], + [ '3+i', - ], - [ - 3.5, + 3, 1, 'i', + ], + [ '3.5+i', + 3.5, + 1, + 'i', ], [ + '-2.5+1.5i', -2.5, 1.5, 'i', - '-2.5+1.5i', ], [ + '-2.5+1.5i', -2.5, 1.5, 'i', - '-2.5+1.5i', ], [ + '-1.5+1.5i', -1.5, 1.5, 'i', - '-1.5+1.5i', ], [ + '-1.5+1.5i', -1.5, 1.5, 'i', - '-1.5+1.5i', ], [ - -0.5, - 1.5, - 'i', '-0.5+1.5i', - ], - [ - 0, + -0.5, 1.5, 'i', + ], + [ '1.5i', - ], - [ - 0.5, + 0, 1.5, 'i', + ], + [ '0.5+1.5i', - ], - [ - 1, + 0.5, 1.5, 'i', + ], + [ '1+1.5i', - ], - [ - 1.5, + 1, 1.5, 'i', + ], + [ '1.5+1.5i', - ], - [ - 2, + 1.5, 1.5, 'i', + ], + [ '2+1.5i', - ], - [ - 2.5, + 2, 1.5, 'i', + ], + [ '2.5+1.5i', - ], - [ - 3, + 2.5, 1.5, 'i', + ], + [ '3+1.5i', - ], - [ - 3.5, + 3, 1.5, 'i', + ], + [ '3.5+1.5i', + 3.5, + 1.5, + 'i', ], [ + '-2.5+2i', -2.5, 2, 'i', - '-2.5+2i', ], [ + '-2.5+2i', -2.5, 2, 'i', - '-2.5+2i', ], [ + '-1.5+2i', -1.5, 2, 'i', - '-1.5+2i', ], [ + '-1.5+2i', -1.5, 2, 'i', - '-1.5+2i', ], [ - -0.5, - 2, - 'i', '-0.5+2i', - ], - [ - 0, + -0.5, 2, 'i', + ], + [ '2i', - ], - [ - 0.5, + 0, 2, 'i', + ], + [ '0.5+2i', - ], - [ - 1, + 0.5, 2, 'i', + ], + [ '1+2i', - ], - [ - 1.5, + 1, 2, 'i', + ], + [ '1.5+2i', - ], - [ - 2, + 1.5, 2, 'i', + ], + [ '2+2i', - ], - [ - 2.5, + 2, 2, 'i', + ], + [ '2.5+2i', - ], - [ - 3, + 2.5, 2, 'i', + ], + [ '3+2i', - ], - [ - 3.5, + 3, 2, 'i', + ], + [ '3.5+2i', + 3.5, + 2, + 'i', ], [ + '-2.5+2.5i', -2.5, 2.5, 'i', - '-2.5+2.5i', ], [ + '-2.5+2.5i', -2.5, 2.5, 'i', - '-2.5+2.5i', ], [ + '-1.5+2.5i', -1.5, 2.5, 'i', - '-1.5+2.5i', ], [ + '-1.5+2.5i', -1.5, 2.5, 'i', - '-1.5+2.5i', ], [ - -0.5, - 2.5, - 'i', '-0.5+2.5i', - ], - [ - 0, + -0.5, 2.5, 'i', + ], + [ '2.5i', - ], - [ - 0.5, + 0, 2.5, 'i', + ], + [ '0.5+2.5i', - ], - [ - 1, + 0.5, 2.5, 'i', + ], + [ '1+2.5i', - ], - [ - 1.5, + 1, 2.5, 'i', + ], + [ '1.5+2.5i', - ], - [ - 2, + 1.5, 2.5, 'i', + ], + [ '2+2.5i', - ], - [ - 2.5, + 2, 2.5, 'i', + ], + [ '2.5+2.5i', - ], - [ - 3, + 2.5, 2.5, 'i', + ], + [ '3+2.5i', - ], - [ - 3.5, + 3, 2.5, 'i', + ], + [ '3.5+2.5i', + 3.5, + 2.5, + 'i', ], [ + '-2.5+3i', -2.5, 3, 'i', - '-2.5+3i', ], [ + '-2.5+3i', -2.5, 3, 'i', - '-2.5+3i', ], [ + '-1.5+3i', -1.5, 3, 'i', - '-1.5+3i', ], [ + '-1.5+3i', -1.5, 3, 'i', - '-1.5+3i', ], [ - -0.5, - 3, - 'i', '-0.5+3i', - ], - [ - 0, + -0.5, 3, 'i', + ], + [ '3i', - ], - [ - 0.5, + 0, 3, 'i', + ], + [ '0.5+3i', - ], - [ - 1, + 0.5, 3, 'i', + ], + [ '1+3i', - ], - [ - 1.5, + 1, 3, 'i', + ], + [ '1.5+3i', - ], - [ - 2, + 1.5, 3, 'i', + ], + [ '2+3i', - ], - [ - 2.5, + 2, 3, 'i', + ], + [ '2.5+3i', - ], - [ - 3, + 2.5, 3, 'i', + ], + [ '3+3i', - ], - [ - 3.5, + 3, 3, 'i', + ], + [ '3.5+3i', + 3.5, + 3, + 'i', ], [ + '-2.5+3.5i', -2.5, 3.5, 'i', - '-2.5+3.5i', ], [ + '-2.5+3.5i', -2.5, 3.5, 'i', - '-2.5+3.5i', ], [ + '-1.5+3.5i', -1.5, 3.5, 'i', - '-1.5+3.5i', ], [ + '-1.5+3.5i', -1.5, 3.5, 'i', - '-1.5+3.5i', ], [ - -0.5, - 3.5, - 'i', '-0.5+3.5i', - ], - [ - 0, + -0.5, 3.5, 'i', + ], + [ '3.5i', - ], - [ - 0.5, + 0, 3.5, 'i', + ], + [ '0.5+3.5i', - ], - [ - 1, + 0.5, 3.5, 'i', + ], + [ '1+3.5i', - ], - [ - 1.5, + 1, 3.5, 'i', + ], + [ '1.5+3.5i', - ], - [ - 2, + 1.5, 3.5, 'i', + ], + [ '2+3.5i', - ], - [ - 2.5, + 2, 3.5, 'i', + ], + [ '2.5+3.5i', - ], - [ - 3, + 2.5, 3.5, 'i', + ], + [ '3+3.5i', + 3, + 3.5, + 'i', ], [ + '3.5+3.5i', 3.5, 3.5, 'i', - '3.5+3.5i', ], [ + '-2.5-2.5j', -2.5, -2.5, 'j', - '-2.5-2.5j', ], [ + '-2.5-2.5j', -2.5, -2.5, 'j', - '-2.5-2.5j', ], [ + '-1.5-2.5j', -1.5, -2.5, 'j', - '-1.5-2.5j', ], [ + '-1.5-2.5j', -1.5, -2.5, 'j', - '-1.5-2.5j', ], [ - -0.5, - -2.5, - 'j', '-0.5-2.5j', - ], - [ - 0, - -2.5, - 'j', - '-2.5j', - ], - [ - 0.5, - -2.5, - 'j', - '0.5-2.5j', - ], - [ - 1, - -2.5, - 'j', - '1-2.5j', - ], - [ - 1.5, - -2.5, - 'j', - '1.5-2.5j', - ], - [ - 2, - -2.5, - 'j', - '2-2.5j', - ], - [ - 2.5, - -2.5, - 'j', - '2.5-2.5j', - ], - [ - 3, - -2.5, - 'j', - '3-2.5j', - ], - [ - 3.5, - -2.5, - 'j', - '3.5-2.5j', - ], - [ - -2.5, - -2.5, - 'j', - '-2.5-2.5j', - ], - [ - -2.5, - -2.5, - 'j', - '-2.5-2.5j', - ], - [ - -1.5, - -2.5, - 'j', - '-1.5-2.5j', - ], - [ - -1.5, - -2.5, - 'j', - '-1.5-2.5j', - ], - [ -0.5, -2.5, 'j', + ], + [ + '-2.5j', + 0, + -2.5, + 'j', + ], + [ + '0.5-2.5j', + 0.5, + -2.5, + 'j', + ], + [ + '1-2.5j', + 1, + -2.5, + 'j', + ], + [ + '1.5-2.5j', + 1.5, + -2.5, + 'j', + ], + [ + '2-2.5j', + 2, + -2.5, + 'j', + ], + [ + '2.5-2.5j', + 2.5, + -2.5, + 'j', + ], + [ + '3-2.5j', + 3, + -2.5, + 'j', + ], + [ + '3.5-2.5j', + 3.5, + -2.5, + 'j', + ], + [ + '-2.5-2.5j', + -2.5, + -2.5, + 'j', + ], + [ + '-2.5-2.5j', + -2.5, + -2.5, + 'j', + ], + [ + '-1.5-2.5j', + -1.5, + -2.5, + 'j', + ], + [ + '-1.5-2.5j', + -1.5, + -2.5, + 'j', + ], + [ '-0.5-2.5j', - ], - [ - 0, + -0.5, -2.5, 'j', + ], + [ '-2.5j', - ], - [ - 0.5, + 0, -2.5, 'j', + ], + [ '0.5-2.5j', - ], - [ - 1, + 0.5, -2.5, 'j', + ], + [ '1-2.5j', - ], - [ - 1.5, + 1, -2.5, 'j', + ], + [ '1.5-2.5j', - ], - [ - 2, + 1.5, -2.5, 'j', + ], + [ '2-2.5j', - ], - [ - 2.5, + 2, -2.5, 'j', + ], + [ '2.5-2.5j', - ], - [ - 3, + 2.5, -2.5, 'j', + ], + [ '3-2.5j', - ], - [ - 3.5, + 3, -2.5, 'j', + ], + [ '3.5-2.5j', + 3.5, + -2.5, + 'j', ], [ + '-2.5-1.5j', -2.5, -1.5, 'j', - '-2.5-1.5j', ], [ + '-2.5-1.5j', -2.5, -1.5, 'j', - '-2.5-1.5j', ], [ + '-1.5-1.5j', -1.5, -1.5, 'j', - '-1.5-1.5j', ], [ + '-1.5-1.5j', -1.5, -1.5, 'j', - '-1.5-1.5j', ], [ + '-0.5-1.5j', -0.5, -1.5, 'j', - '-0.5-1.5j', ], [ + '-1.5j', 0, -1.5, 'j', - '-1.5j', ], [ + '0.5-1.5j', 0.5, -1.5, 'j', - '0.5-1.5j', ], [ + '1-1.5j', 1, -1.5, 'j', - '1-1.5j', ], [ + '1.5-1.5j', 1.5, -1.5, 'j', - '1.5-1.5j', ], [ + '2-1.5j', 2, -1.5, 'j', - '2-1.5j', ], [ + '2.5-1.5j', 2.5, -1.5, 'j', - '2.5-1.5j', ], [ + '3-1.5j', 3, -1.5, 'j', - '3-1.5j', ], [ + '3.5-1.5j', 3.5, -1.5, 'j', - '3.5-1.5j', ], [ + '-2.5-1.5j', -2.5, -1.5, 'j', - '-2.5-1.5j', ], [ + '-2.5-1.5j', -2.5, -1.5, 'j', - '-2.5-1.5j', ], [ + '-1.5-1.5j', -1.5, -1.5, 'j', - '-1.5-1.5j', ], [ + '-1.5-1.5j', -1.5, -1.5, 'j', - '-1.5-1.5j', ], [ + '-0.5-1.5j', -0.5, -1.5, 'j', - '-0.5-1.5j', ], [ + '-1.5j', 0, -1.5, 'j', - '-1.5j', ], [ + '0.5-1.5j', 0.5, -1.5, 'j', - '0.5-1.5j', ], [ + '1-1.5j', 1, -1.5, 'j', - '1-1.5j', ], [ + '1.5-1.5j', 1.5, -1.5, 'j', - '1.5-1.5j', ], [ + '2-1.5j', 2, -1.5, 'j', - '2-1.5j', ], [ + '2.5-1.5j', 2.5, -1.5, 'j', - '2.5-1.5j', ], [ + '3-1.5j', 3, -1.5, 'j', - '3-1.5j', ], [ + '3.5-1.5j', 3.5, -1.5, 'j', - '3.5-1.5j', ], [ + '-2.5-0.5j', -2.5, -0.5, 'j', - '-2.5-0.5j', ], [ + '-2.5-0.5j', -2.5, -0.5, 'j', - '-2.5-0.5j', ], [ + '-1.5-0.5j', -1.5, -0.5, 'j', - '-1.5-0.5j', ], [ + '-1.5-0.5j', -1.5, -0.5, 'j', - '-1.5-0.5j', ], [ - -0.5, - -0.5, - 'j', '-0.5-0.5j', - ], - [ - 0, + -0.5, -0.5, 'j', + ], + [ '-0.5j', - ], - [ - 0.5, + 0, -0.5, 'j', + ], + [ '0.5-0.5j', - ], - [ - 1, + 0.5, -0.5, 'j', + ], + [ '1-0.5j', - ], - [ - 1.5, + 1, -0.5, 'j', + ], + [ '1.5-0.5j', - ], - [ - 2, + 1.5, -0.5, 'j', + ], + [ '2-0.5j', - ], - [ - 2.5, + 2, -0.5, 'j', + ], + [ '2.5-0.5j', - ], - [ - 3, + 2.5, -0.5, 'j', + ], + [ '3-0.5j', - ], - [ - 3.5, + 3, -0.5, 'j', + ], + [ '3.5-0.5j', + 3.5, + -0.5, + 'j', ], [ -2.5, - 0, - 'j', - -2.5, - ], - [ -2.5, 0, 'j', + ], + [ -2.5, + -2.5, + 0, + 'j', ], [ + -1.5, -1.5, 0, 'j', - -1.5, ], [ + -1.5, -1.5, 0, 'j', - -1.5, ], [ -0.5, - 0, - 'j', -0.5, + 0, + 'j', ], [ 0, 0, - 'j', 0, + 'j', ], [ + 0.5, 0.5, 0, 'j', - 0.5, ], [ 1, - 0, - 'j', 1, + 0, + 'j', ], [ 1.5, - 0, - 'j', 1.5, + 0, + 'j', ], [ 2, - 0, - 'j', 2, + 0, + 'j', ], [ 2.5, - 0, - 'j', 2.5, + 0, + 'j', ], [ 3, - 0, - 'j', 3, + 0, + 'j', ], [ + 3.5, 3.5, 0, 'j', - 3.5, ], [ + '-2.5+0.5j', -2.5, 0.5, 'j', - '-2.5+0.5j', ], [ + '-2.5+0.5j', -2.5, 0.5, 'j', - '-2.5+0.5j', ], [ + '-1.5+0.5j', -1.5, 0.5, 'j', - '-1.5+0.5j', ], [ + '-1.5+0.5j', -1.5, 0.5, 'j', - '-1.5+0.5j', ], [ - -0.5, - 0.5, - 'j', '-0.5+0.5j', - ], - [ - 0, + -0.5, 0.5, 'j', + ], + [ '0.5j', - ], - [ - 0.5, + 0, 0.5, 'j', + ], + [ '0.5+0.5j', - ], - [ - 1, + 0.5, 0.5, 'j', + ], + [ '1+0.5j', - ], - [ - 1.5, + 1, 0.5, 'j', + ], + [ '1.5+0.5j', - ], - [ - 2, + 1.5, 0.5, 'j', + ], + [ '2+0.5j', - ], - [ - 2.5, + 2, 0.5, 'j', + ], + [ '2.5+0.5j', - ], - [ - 3, + 2.5, 0.5, 'j', + ], + [ '3+0.5j', - ], - [ - 3.5, + 3, 0.5, 'j', + ], + [ '3.5+0.5j', + 3.5, + 0.5, + 'j', ], [ + '-2.5+j', -2.5, 1, 'j', - '-2.5+j', ], [ + '-2.5+j', -2.5, 1, 'j', - '-2.5+j', ], [ + '-1.5+j', -1.5, 1, 'j', - '-1.5+j', ], [ + '-1.5+j', -1.5, 1, 'j', - '-1.5+j', ], [ - -0.5, - 1, - 'j', '-0.5+j', + -0.5, + 1, + 'j', ], [ + 'j', 0, 1, 'j', - 'j', ], [ - 0.5, - 1, - 'j', '0.5+j', - ], - [ - 1, + 0.5, 1, 'j', + ], + [ '1+j', - ], - [ - 1.5, + 1, 1, 'j', + ], + [ '1.5+j', - ], - [ - 2, + 1.5, 1, 'j', + ], + [ '2+j', - ], - [ - 2.5, + 2, 1, 'j', + ], + [ '2.5+j', - ], - [ - 3, + 2.5, 1, 'j', + ], + [ '3+j', - ], - [ - 3.5, + 3, 1, 'j', + ], + [ '3.5+j', + 3.5, + 1, + 'j', ], [ + '-2.5+1.5j', -2.5, 1.5, 'j', - '-2.5+1.5j', ], [ + '-2.5+1.5j', -2.5, 1.5, 'j', - '-2.5+1.5j', ], [ + '-1.5+1.5j', -1.5, 1.5, 'j', - '-1.5+1.5j', ], [ + '-1.5+1.5j', -1.5, 1.5, 'j', - '-1.5+1.5j', ], [ - -0.5, - 1.5, - 'j', '-0.5+1.5j', - ], - [ - 0, + -0.5, 1.5, 'j', + ], + [ '1.5j', - ], - [ - 0.5, + 0, 1.5, 'j', + ], + [ '0.5+1.5j', - ], - [ - 1, + 0.5, 1.5, 'j', + ], + [ '1+1.5j', - ], - [ - 1.5, + 1, 1.5, 'j', + ], + [ '1.5+1.5j', - ], - [ - 2, + 1.5, 1.5, 'j', + ], + [ '2+1.5j', - ], - [ - 2.5, + 2, 1.5, 'j', + ], + [ '2.5+1.5j', - ], - [ - 3, + 2.5, 1.5, 'j', + ], + [ '3+1.5j', - ], - [ - 3.5, + 3, 1.5, 'j', + ], + [ '3.5+1.5j', + 3.5, + 1.5, + 'j', ], [ + '-2.5+2j', -2.5, 2, 'j', - '-2.5+2j', ], [ + '-2.5+2j', -2.5, 2, 'j', - '-2.5+2j', ], [ + '-1.5+2j', -1.5, 2, 'j', - '-1.5+2j', ], [ + '-1.5+2j', -1.5, 2, 'j', - '-1.5+2j', ], [ - -0.5, - 2, - 'j', '-0.5+2j', - ], - [ - 0, + -0.5, 2, 'j', + ], + [ '2j', - ], - [ - 0.5, + 0, 2, 'j', + ], + [ '0.5+2j', - ], - [ - 1, + 0.5, 2, 'j', + ], + [ '1+2j', - ], - [ - 1.5, + 1, 2, 'j', + ], + [ '1.5+2j', - ], - [ - 2, + 1.5, 2, 'j', + ], + [ '2+2j', - ], - [ - 2.5, + 2, 2, 'j', + ], + [ '2.5+2j', - ], - [ - 3, + 2.5, 2, 'j', + ], + [ '3+2j', - ], - [ - 3.5, + 3, 2, 'j', + ], + [ '3.5+2j', + 3.5, + 2, + 'j', ], [ + '-2.5+2.5j', -2.5, 2.5, 'j', - '-2.5+2.5j', ], [ + '-2.5+2.5j', -2.5, 2.5, 'j', - '-2.5+2.5j', ], [ + '-1.5+2.5j', -1.5, 2.5, 'j', - '-1.5+2.5j', ], [ + '-1.5+2.5j', -1.5, 2.5, 'j', - '-1.5+2.5j', ], [ - -0.5, - 2.5, - 'j', '-0.5+2.5j', - ], - [ - 0, + -0.5, 2.5, 'j', + ], + [ '2.5j', - ], - [ - 0.5, + 0, 2.5, 'j', + ], + [ '0.5+2.5j', - ], - [ - 1, + 0.5, 2.5, 'j', + ], + [ '1+2.5j', - ], - [ - 1.5, + 1, 2.5, 'j', + ], + [ '1.5+2.5j', - ], - [ - 2, + 1.5, 2.5, 'j', + ], + [ '2+2.5j', - ], - [ - 2.5, + 2, 2.5, 'j', + ], + [ '2.5+2.5j', - ], - [ - 3, + 2.5, 2.5, 'j', + ], + [ '3+2.5j', - ], - [ - 3.5, + 3, 2.5, 'j', + ], + [ '3.5+2.5j', + 3.5, + 2.5, + 'j', ], [ + '-2.5+3j', -2.5, 3, 'j', - '-2.5+3j', ], [ + '-2.5+3j', -2.5, 3, 'j', - '-2.5+3j', ], [ + '-1.5+3j', -1.5, 3, 'j', - '-1.5+3j', ], [ + '-1.5+3j', -1.5, 3, 'j', - '-1.5+3j', ], [ - -0.5, - 3, - 'j', '-0.5+3j', + -0.5, + 3, + 'j', ], [ + '3j', 0, 3, 'j', - '3j', ], [ + '0.5+3j', 0.5, 3, 'j', - '0.5+3j', ], [ + '1+3j', 1, 3, 'j', - '1+3j', ], [ + '1.5+3j', 1.5, 3, 'j', - '1.5+3j', ], [ + '2+3j', 2, 3, 'j', - '2+3j', ], [ + '2.5+3j', 2.5, 3, 'j', - '2.5+3j', ], [ - 3, - 3, - 'j', '3+3j', + 3, + 3, + 'j', ], [ + '3.5+3j', 3.5, 3, 'j', - '3.5+3j', ], [ + '-2.5+3.5j', -2.5, 3.5, 'j', - '-2.5+3.5j', ], [ + '-2.5+3.5j', -2.5, 3.5, 'j', - '-2.5+3.5j', ], [ + '-1.5+3.5j', -1.5, 3.5, 'j', - '-1.5+3.5j', ], [ + '-1.5+3.5j', -1.5, 3.5, 'j', - '-1.5+3.5j', ], [ + '-0.5+3.5j', -0.5, 3.5, 'j', - '-0.5+3.5j', ], [ + '3.5j', 0, 3.5, 'j', - '3.5j', ], [ + '0.5+3.5j', 0.5, 3.5, 'j', - '0.5+3.5j', ], [ + '1+3.5j', 1, 3.5, 'j', - '1+3.5j', ], [ + '1.5+3.5j', 1.5, 3.5, 'j', - '1.5+3.5j', ], [ + '2+3.5j', 2, 3.5, 'j', - '2+3.5j', ], [ + '2.5+3.5j', 2.5, 3.5, 'j', - '2.5+3.5j', ], [ + '3+3.5j', 3, 3.5, 'j', - '3+3.5j', ], [ + '3.5+3.5j', 3.5, 3.5, 'j', - '3.5+3.5j', ], [ + '-1.23-4.56i', -1.23, -4.5599999999999996, - '-1.23-4.56i', ], [ + '-3.21i', 0, -3.21, 'i', - '-3.21i', ], [ + '1.23-2.34j', 1.23, -2.3399999999999999, 'j', - '1.23-2.34j', ], [ + -1.23, -1.23, 0, - -1.23, ], [ + 0, 0, 0, 'i', - 0, ], [ + 1.23, 1.23, 0, 'j', - 1.23, ], [ + '-1.23+4.56i', -1.23, 4.5599999999999996, - '-1.23+4.56i', ], [ + '3.21i', 0, 3.21, 'i', - '3.21i', ], [ + '1.23+2.34j', 1.23, 2.3399999999999999, 'j', - '1.23+2.34j', ], ]; diff --git a/tests/data/Calculation/Engineering/CONVERTUOM.php b/tests/data/Calculation/Engineering/CONVERTUOM.php index 8cc7fec5..248c2cd0 100644 --- a/tests/data/Calculation/Engineering/CONVERTUOM.php +++ b/tests/data/Calculation/Engineering/CONVERTUOM.php @@ -2,147 +2,147 @@ return [ [ + 0.45359230974880999, 1.0, 'lbm', 'kg', - 0.45359230974880999, ], [ 123.45, - 'kg', - 'kg', 123.45, - ], - [ - 68, - 'F', - 'C', - 20, + 'kg', + 'kg', ], [ + 20, + 68, + 'F', + 'C', + ], + [ + 68, 20, 'C', 'F', - 68, - ], - [ - 68, - 'F', - 'K', - 293.14999999999998, ], [ 293.14999999999998, - 'K', - 'F', 68, + 'F', + 'K', ], [ + 68, + 293.14999999999998, + 'K', + 'F', + ], + [ + 295.14999999999998, 22, 'C', 'K', - 295.14999999999998, ], [ + 22.5, 295.64999999999998, 'K', 'C', - 22.5, ], [ + '#N/A', 2.5, 'ft', 'sec', - '#N/A', - ], - [ - 12345, - 'm', - 'km', - 12.345000000000001, ], [ 12.345000000000001, - 'km', - 'm', 12345, + 'm', + 'km', ], [ + 12345, + 12.345000000000001, + 'km', + 'm', + ], + [ + 0.62137119223732995, 1, 'km', 'mi', - 0.62137119223732995, ], [ + '#VALUE!', 'three', 'ft', 'yds', - '#VALUE!', ], [ + 123.45, 123.45, 'K', 'kel', - 123.45, ], [ + 123.45, 123.45, 'C', 'cel', - 123.45, ], [ + 123.45, 123.45, 'F', 'fah', - 123.45, ], [ + '#N/A', 1, 'ft', 'day', - '#N/A', ], [ 123.45, - 'm', - 'm', 123.45, + 'm', + 'm', ], [ + 234.56, 234.56, 'km', 'km', - 234.56, ], [ + '#N/A', 234.56, 'kpt', 'lt', - '#N/A', ], [ + '#N/A', 234.56, 'sm', 'm', - '#N/A', ], [ + '#N/A', 234.56, 'lt', 'kpt', - '#N/A', ], [ + '#N/A', 234.56, 'm', 'sm', - '#N/A', ], [ + 12345000, 12.345000000000001, 'km', 'mm', - 12345000, ], ]; diff --git a/tests/data/Calculation/Engineering/DEC2BIN.php b/tests/data/Calculation/Engineering/DEC2BIN.php index b3fcc73d..a88b69a8 100644 --- a/tests/data/Calculation/Engineering/DEC2BIN.php +++ b/tests/data/Calculation/Engineering/DEC2BIN.php @@ -2,90 +2,90 @@ return [ [ - 357, '101100101', + 357, ], // Too large [ - 512, '#NUM!', + 512, ], // Too small [ - -513, '#NUM!', + -513, ], [ + '1001', 9, 4, - '1001', ], [ + '00001001', 9, 8, - '00001001', ], // Leading places as a float [ + '001001', 9, 6.75, - '001001', ], // Leading places negative [ + '#NUM!', 9, -1, - '#NUM!', ], // Leading places non-numeric [ + '#VALUE!', 9, 'ABC', - '#VALUE!', ], [ - 246, '11110110', + 246, ], [ + '#NUM!', 12345, - '#NUM!', ], [ + '#NUM!', 123456789, - '#NUM!', ], [ - 123.45, '1111011', + 123.45, ], [ - 0, '0', + 0, ], // Invalid decimal [ - '3579A', '#VALUE!', + '3579A', ], // Non string [ - true, '#VALUE!', + true, ], // 2's Complement [ - -100, '1110011100', + -100, ], // 2's Complement [ - -107, '1110010101', + -107, ], // 2's Complement [ - -512, '1000000000', + -512, ], ]; diff --git a/tests/data/Calculation/Engineering/DEC2HEX.php b/tests/data/Calculation/Engineering/DEC2HEX.php index 55fd5f0b..fd889afe 100644 --- a/tests/data/Calculation/Engineering/DEC2HEX.php +++ b/tests/data/Calculation/Engineering/DEC2HEX.php @@ -2,51 +2,51 @@ return [ [ - '357', '165', + '357', ], [ - '1357', '54D', + '1357', ], [ - '246', 'F6', + '246', ], [ - '12345', '3039', + '12345', ], [ - '123456789', '75BCD15', + '123456789', ], [ + '0064', '100', 4, - '0064', ], // Leading places as a float [ + '00064', '100', 5.75, - '00064', ], // Leading places negative [ + '#NUM!', '100', -1, - '#NUM!', ], // Leading places non-numeric [ + '#VALUE!', '100', 'ABC', - '#VALUE!', ], [ - '123.45', '7B', + '123.45', ], [ '0', @@ -54,22 +54,22 @@ return [ ], // Invalid decimal [ - '3579A', '#VALUE!', + '3579A', ], // Non string [ - true, '#VALUE!', + true, ], // 2's Complement [ - '-54', 'FFFFFFFFCA', + '-54', ], // 2's Complement [ - '-107', 'FFFFFFFF95', + '-107', ], ]; diff --git a/tests/data/Calculation/Engineering/DEC2OCT.php b/tests/data/Calculation/Engineering/DEC2OCT.php index db56acf1..59ae5a0d 100644 --- a/tests/data/Calculation/Engineering/DEC2OCT.php +++ b/tests/data/Calculation/Engineering/DEC2OCT.php @@ -2,33 +2,33 @@ return [ [ - '357', '545', + '357', ], [ - '1357', '2515', + '1357', ], [ - '246', '366', + '246', ], [ - '12345', '30071', + '12345', ], [ - '123456789', '726746425', + '123456789', ], [ - '123.45', '173', + '123.45', ], [ + '072', '58', 3, - '072', ], [ '0', @@ -36,22 +36,22 @@ return [ ], // Invalid decimal [ - '3579A', '#VALUE!', + '3579A', ], // Non string [ - true, '#VALUE!', + true, ], // 2's Complement [ - '-100', '7777777634', + '-100', ], // 2's Complement [ - '-107', '7777777625', + '-107', ], ]; diff --git a/tests/data/Calculation/Engineering/DELTA.php b/tests/data/Calculation/Engineering/DELTA.php index 2c7ddba1..828cc66a 100644 --- a/tests/data/Calculation/Engineering/DELTA.php +++ b/tests/data/Calculation/Engineering/DELTA.php @@ -2,128 +2,128 @@ return [ [ - -1.5, - -1.5, 1, + -1.5, + -1.5, ], [ + 0, -0.75, -1.5, - 0, ], [ + 0, 0, -1.5, - 0, ], [ + 0, 0.75, -1.5, - 0, ], [ + 0, 1.5, -1.5, - 0, ], [ + 0, -1.5, -0.75, - 0, ], [ - -0.75, - -0.75, 1, + -0.75, + -0.75, ], [ + 0, 0, -0.75, - 0, ], [ + 0, 0.75, -0.75, - 0, ], [ + 0, 1.5, -0.75, - 0, ], [ + 0, -1.5, 0, - 0, ], [ + 0, -0.75, 0, - 0, ], [ - 0, - 0, 1, + 0, + 0, ], [ + 0, 0.75, 0, - 0, ], [ + 0, 1.5, 0, - 0, ], [ + 0, -1.5, 0.75, - 0, ], [ + 0, -0.75, 0.75, - 0, ], [ 0, - 0.75, 0, + 0.75, ], [ - 0.75, - 0.75, 1, + 0.75, + 0.75, ], [ + 0, 1.5, 0.75, - 0, ], [ + 0, -1.5, 1.5, - 0, ], [ + 0, -0.75, 1.5, - 0, ], [ + 0, 0, 1.5, - 0, ], [ + 0, 0.75, 1.5, - 0, ], [ - 1.5, - 1.5, 1, + 1.5, + 1.5, ], ]; diff --git a/tests/data/Calculation/Engineering/ERF.php b/tests/data/Calculation/Engineering/ERF.php index 4ece0934..dbc07a0d 100644 --- a/tests/data/Calculation/Engineering/ERF.php +++ b/tests/data/Calculation/Engineering/ERF.php @@ -4,578 +4,578 @@ return [ [ - 0, 0.0, + 0, ], [ - 0.01, 0.0112834155558496, + 0.01, ], [ - 0.050000000000000003, 0.056371977797016602, + 0.050000000000000003, ], [ - 0.10000000000000001, 0.11246291601828499, + 0.10000000000000001, ], [ - 0.125, 0.140316204801334, + 0.125, ], [ - 0.14999999999999999, 0.167995971427363, + 0.14999999999999999, ], [ - 0.20000000000000001, 0.222702589210478, + 0.20000000000000001, ], [ - 0.25, 0.27632639016823701, + 0.25, ], [ - 0.29999999999999999, 0.328626759459127, + 0.29999999999999999, ], [ - 0.34999999999999998, 0.37938205356230997, + 0.34999999999999998, ], [ - 0.40000000000000002, 0.42839235504666801, + 0.40000000000000002, ], [ - 0.45000000000000001, 0.475481719786924, + 0.45000000000000001, ], [ - 0.5, 0.52049987781304696, + 0.5, ], [ - 0.59999999999999998, 0.60385609084792602, + 0.59999999999999998, ], [ - 0.69999999999999996, 0.67780119383741799, + 0.69999999999999996, ], [ - 0.80000000000000004, 0.74210096470766096, + 0.80000000000000004, ], [ - 0.90000000000000002, 0.79690821242283205, + 0.90000000000000002, ], [ - 1, 0.84270079294971501, + 1, ], [ - 1.1000000000000001, 0.88020506957408196, + 1.1000000000000001, ], [ - 1.2, 0.910313978229635, + 1.2, ], [ - 1.3, 0.93400794494065198, + 1.3, ], [ - 1.3999999999999999, 0.95228511976264896, + 1.3999999999999999, ], [ - 1.5, 0.96610514647531098, + 1.5, ], [ - 1.75, 0.98667167121918198, + 1.75, ], [ + 0.99532226501895305, 2, - 0.99532226501895305, ], [ - 2.5, 0.99959304798255499, + 2.5, ], [ - 3, 0.99997790950300103, + 3, ], [ - 3.5, 0.99999925690162805, + 3.5, ], [ - 4, 0.99999998458274197, + 4, ], [ - 4.5, 0.99999999980338405, + 4.5, ], [ - 5, 0.99999999999846301, + 5, ], [ - 5.5, 0.99999999999999301, + 5.5, ], [ + 1.0, 6, - 1.0, ], [ + 1.0, 32, - 1.0, ], [ - -0.10000000000000001, -0.11246291601828499, + -0.10000000000000001, ], [ - -1, -0.84270079294971501, + -1, ], [ + '#VALUE!', true, - '#VALUE!', ], [ + '#VALUE!', false, - '#VALUE!', ], [ - '2', 0.99532226501895305, + '2', ], [ - 'TWO', '#VALUE!', + 'TWO', ], [ - -1.5, - -1.5, 0.0, + -1.5, + -1.5, ], [ + -0.25494951282179601, -0.75, -1.5, - -0.25494951282179601, ], [ + -0.96610514647531098, 0, -1.5, - -0.96610514647531098, ], [ + -1.67726078012883, 0.75, -1.5, - -1.67726078012883, ], [ - 1.5, - -1.5, -1.93221029295062, + 1.5, + -1.5, ], [ - 2.25, - -1.5, -1.96464242988863, + 2.25, + -1.5, ], [ - 3, - -1.5, -1.96608305597831, + 3, + -1.5, ], [ - 3.75, - -1.5, -1.96610503274805, + 3.75, + -1.5, ], [ - 4.5, - -1.5, -1.96610514627869, + 4.5, + -1.5, ], [ + 0.25494951282179601, -1.5, -0.75, - 0.25494951282179601, ], [ - -0.75, - -0.75, 0.0, + -0.75, + -0.75, ], [ + -0.71115563365351497, 0, -0.75, - -0.71115563365351497, ], [ - 0.75, - -0.75, -1.4223112673070299, + 0.75, + -0.75, ], [ - 1.5, - -0.75, -1.67726078012883, + 1.5, + -0.75, ], [ - 2.25, - -0.75, -1.70969291706683, + 2.25, + -0.75, ], [ - 3, - -0.75, -1.71113354315652, + 3, + -0.75, ], [ - 3.75, - -0.75, -1.71115551992626, + 3.75, + -0.75, ], [ - 4.5, - -0.75, -1.7111556334569, + 4.5, + -0.75, ], [ + 0.96610514647531098, -1.5, 0, - 0.96610514647531098, ], [ + 0.71115563365351497, -0.75, 0, - 0.71115563365351497, ], [ - 0, - 0, 0.0, + 0, + 0, ], [ - 0.75, - 0, -0.71115563365351497, + 0.75, + 0, ], [ - 1.5, - 0, -0.96610514647531098, + 1.5, + 0, ], [ - 2.25, - 0, -0.99853728341331904, + 2.25, + 0, ], [ - 3, - 0, -0.99997790950300103, + 3, + 0, ], [ - 3.75, - 0, -0.99999988627274305, + 3.75, + 0, ], [ - 4.5, - 0, -0.99999999980338405, + 4.5, + 0, ], [ + 1.67726078012883, -1.5, 0.75, - 1.67726078012883, ], [ - -0.75, - 0.75, 1.4223112673070299, + -0.75, + 0.75, ], [ - 0, - 0.75, 0.71115563365351497, + 0, + 0.75, ], [ - 0.75, - 0.75, 0.0, + 0.75, + 0.75, ], [ - 1.5, - 0.75, -0.25494951282179601, + 1.5, + 0.75, ], [ - 2.25, - 0.75, -0.28738164975980401, + 2.25, + 0.75, ], [ - 3, - 0.75, -0.288822275849486, + 3, + 0.75, ], [ - 3.75, - 0.75, -0.28884425261922803, + 3.75, + 0.75, ], [ - 4.5, - 0.75, -0.28884436614986903, + 4.5, + 0.75, ], [ - -1.5, - 1.5, 1.93221029295062, + -1.5, + 1.5, ], [ - -0.75, - 1.5, 1.67726078012883, + -0.75, + 1.5, ], [ - 0, - 1.5, 0.96610514647531098, + 0, + 1.5, ], [ - 0.75, - 1.5, 0.25494951282179601, + 0.75, + 1.5, ], [ - 1.5, - 1.5, 0.0, + 1.5, + 1.5, ], [ - 2.25, - 1.5, -0.032432136938008102, + 2.25, + 1.5, ], [ - 3, - 1.5, -0.0338727630276906, + 3, + 1.5, ], [ - 3.75, - 1.5, -0.033894739797432599, + 3.75, + 1.5, ], [ - 4.5, - 1.5, -0.033894853328073203, + 4.5, + 1.5, ], [ - -1.5, - 2.25, 1.96464242988863, + -1.5, + 2.25, ], [ - -0.75, - 2.25, 1.70969291706683, + -0.75, + 2.25, ], [ - 0, - 2.25, 0.99853728341331904, + 0, + 2.25, ], [ - 0.75, - 2.25, 0.28738164975980401, + 0.75, + 2.25, ], [ - 1.5, - 2.25, 0.032432136938008102, + 1.5, + 2.25, ], [ - 2.25, - 2.25, 0.0, + 2.25, + 2.25, ], [ - 3, - 2.25, -0.0014406260896824999, + 3, + 2.25, ], [ - 3.75, - 2.25, -0.0014626028594246, + 3.75, + 2.25, ], [ - 4.5, - 2.25, -0.0014627163900651, + 4.5, + 2.25, ], [ - -1.5, - 3, 1.96608305597831, + -1.5, + 3, ], [ - -0.75, - 3, 1.71113354315652, + -0.75, + 3, ], [ - 0, - 3, 0.99997790950300103, + 0, + 3, ], [ - 0.75, - 3, 0.288822275849486, + 0.75, + 3, ], [ - 1.5, - 3, 0.0338727630276906, + 1.5, + 3, ], [ - 2.25, - 3, 0.0014406260896824999, + 2.25, + 3, ], [ - 3, - 3, 0.0, + 3, + 3, ], [ - 3.75, - 3, -2.1976769741999999E-5, + 3.75, + 3, ], [ - 4.5, - 3, -2.2090300382599999E-5, + 4.5, + 3, ], [ - -1.5, - 3.75, 1.96610503274805, + -1.5, + 3.75, ], [ + 1.71115551992626, -0.75, 3.75, - 1.71115551992626, ], [ + 0.99999988627274305, 0, 3.75, - 0.99999988627274305, ], [ + 0.28884425261922803, 0.75, 3.75, - 0.28884425261922803, ], [ + 0.033894739797432599, 1.5, 3.75, - 0.033894739797432599, ], [ + 0.0014626028594246, 2.25, 3.75, - 0.0014626028594246, ], [ + 2.1976769741999999E-5, 3, 3.75, - 2.1976769741999999E-5, ], [ - 3.75, - 3.75, 0.0, + 3.75, + 3.75, ], [ + -1.135306406E-7, 4.5, 3.75, - -1.135306406E-7, ], [ + 1.96610514627869, -1.5, 4.5, - 1.96610514627869, ], [ + 1.7111556334569, -0.75, 4.5, - 1.7111556334569, ], [ + 0.99999999980338405, 0, 4.5, - 0.99999999980338405, ], [ + 0.28884436614986903, 0.75, 4.5, - 0.28884436614986903, ], [ + 0.033894853328073203, 1.5, 4.5, - 0.033894853328073203, ], [ + 0.0014627163900651, 2.25, 4.5, - 0.0014627163900651, ], [ + 2.2090300382599999E-5, 3, 4.5, - 2.2090300382599999E-5, ], [ + 1.135306406E-7, 3.75, 4.5, - 1.135306406E-7, ], [ - 4.5, - 4.5, 0.0, + 4.5, + 4.5, ], [ + -1.84270079294818, 5, -1, - -1.84270079294818, ], [ + 1.84270079294818, -5, 1, - 1.84270079294818, ], ]; diff --git a/tests/data/Calculation/Engineering/ERFC.php b/tests/data/Calculation/Engineering/ERFC.php index 9ef5d8c0..94939a31 100644 --- a/tests/data/Calculation/Engineering/ERFC.php +++ b/tests/data/Calculation/Engineering/ERFC.php @@ -4,163 +4,163 @@ return [ [ - 0, 1.0, + 0, ], [ - 0.01, 0.98871658444415, + 0.01, ], [ - 0.050000000000000003, 0.94362802220298303, + 0.050000000000000003, ], [ - 0.10000000000000001, 0.88753708398171505, + 0.10000000000000001, ], [ - 0.125, 0.859683795198666, + 0.125, ], [ - 0.14999999999999999, 0.832004028572636, + 0.14999999999999999, ], [ - 0.20000000000000001, 0.77729741078952197, + 0.20000000000000001, ], [ - 0.25, 0.72367360983176299, + 0.25, ], [ - 0.29999999999999999, 0.671373240540873, + 0.29999999999999999, ], [ - 0.34999999999999998, 0.62061794643768997, + 0.34999999999999998, ], [ - 0.40000000000000002, 0.57160764495333205, + 0.40000000000000002, ], [ - 0.45000000000000001, 0.524518280213076, + 0.45000000000000001, ], [ - 0.5, 0.47950012218695298, + 0.5, ], [ - 0.59999999999999998, 0.39614390915207398, + 0.59999999999999998, ], [ - 0.69999999999999996, 0.32219880616258201, + 0.69999999999999996, ], [ - 0.80000000000000004, 0.25789903529233899, + 0.80000000000000004, ], [ - 0.90000000000000002, 0.203091787577168, + 0.90000000000000002, ], [ - 1, 0.15729920705028499, + 1, ], [ - 1.1000000000000001, 0.119794930425918, + 1.1000000000000001, ], [ - 1.2, 0.089686021770364596, + 1.2, ], [ - 1.3, 0.065992055059347507, + 1.3, ], [ - 1.3999999999999999, 0.047714880237351202, + 1.3999999999999999, ], [ - 1.5, 0.033894853524689302, + 1.5, ], [ - 1.75, 0.0133283287808176, + 1.75, ], [ + 0.0046777349810473001, 2, - 0.0046777349810473001, ], [ - 2.5, 0.00040695201744500001, + 2.5, ], [ - 3, 2.20904969986E-5, + 3, ], [ - 3.5, 7.4309837229999996E-7, + 3.5, ], [ - 4, 1.54172579E-8, + 4, ], [ - 4.5, 1.9661600000000001E-10, + 4.5, ], [ - 5, 1.5375000000000001E-12, + 5, ], [ - 5.5, 7.4000000000000003E-15, + 5.5, ], [ + 0.0, 6, - 0.0, ], [ + 0.0, 32, - 0.0, ], [ - -0.10000000000000001, 1.1124629160182899, + -0.10000000000000001, ], [ - -1, 1.8427007929497099, + -1, ], [ + '#VALUE!', true, - '#VALUE!', ], [ + '#VALUE!', false, - '#VALUE!', ], [ - '2', 0.0046777349810473001, + '2', ], [ - 'TWO', '#VALUE!', + 'TWO', ], ]; diff --git a/tests/data/Calculation/Engineering/GESTEP.php b/tests/data/Calculation/Engineering/GESTEP.php index a8bc93b3..b98c66f1 100644 --- a/tests/data/Calculation/Engineering/GESTEP.php +++ b/tests/data/Calculation/Engineering/GESTEP.php @@ -2,408 +2,408 @@ return [ [ - -1.5, - -1.5, 1, + -1.5, + -1.5, ], [ + 1, -0.75, -1.5, - 1, ], [ + 1, 0, -1.5, - 1, ], [ + 1, 0.75, -1.5, - 1, ], [ + 1, 1.5, -1.5, - 1, ], [ + 1, 2.25, -1.5, - 1, ], [ + 1, 3, -1.5, - 1, ], [ + 1, 3.75, -1.5, - 1, ], [ + 1, 4.5, -1.5, - 1, ], [ + 0, -1.5, -0.75, - 0, ], [ - -0.75, - -0.75, 1, + -0.75, + -0.75, ], [ + 1, 0, -0.75, - 1, ], [ + 1, 0.75, -0.75, - 1, ], [ + 1, 1.5, -0.75, - 1, ], [ + 1, 2.25, -0.75, - 1, ], [ + 1, 3, -0.75, - 1, ], [ + 1, 3.75, -0.75, - 1, ], [ + 1, 4.5, -0.75, - 1, ], [ + 0, -1.5, 0, - 0, ], [ + 0, -0.75, 0, - 0, ], [ - 0, - 0, 1, - ], - [ - 0.75, 0, - 1, - ], - [ - 1.5, 0, - 1, ], [ - 2.25, - 0, 1, - ], - [ - 3, - 0, - 1, - ], - [ - 3.75, - 0, - 1, - ], - [ - 4.5, - 0, - 1, - ], - [ - -1.5, 0.75, 0, ], [ - -0.75, - 0.75, - 0, - ], - [ - 0, - 0.75, - 0, - ], - [ - 0.75, - 0.75, 1, - ], - [ - 1.5, - 0.75, - 1, - ], - [ - 2.25, - 0.75, - 1, - ], - [ - 3, - 0.75, - 1, - ], - [ - 3.75, - 0.75, - 1, - ], - [ - 4.5, - 0.75, - 1, - ], - [ - -1.5, 1.5, 0, ], [ - -0.75, - 1.5, - 0, - ], - [ - 0, - 1.5, - 0, - ], - [ - 0.75, - 1.5, - 0, - ], - [ - 1.5, - 1.5, 1, - ], - [ - 2.25, - 1.5, - 1, - ], - [ - 3, - 1.5, - 1, - ], - [ - 3.75, - 1.5, - 1, - ], - [ - 4.5, - 1.5, - 1, - ], - [ - -1.5, 2.25, 0, ], [ - -0.75, - 2.25, - 0, - ], - [ - 0, - 2.25, - 0, - ], - [ - 0.75, - 2.25, - 0, - ], - [ - 1.5, - 2.25, - 0, - ], - [ - 2.25, - 2.25, 1, + 3, + 0, ], [ - 3, - 2.25, 1, + 3.75, + 0, ], [ - 3.75, - 2.25, 1, - ], - [ - 4.5, - 2.25, - 1, - ], - [ - -1.5, - 3, - 0, - ], - [ - -0.75, - 3, - 0, - ], - [ - 0, - 3, - 0, - ], - [ - 0.75, - 3, - 0, - ], - [ - 1.5, - 3, - 0, - ], - [ - 2.25, - 3, - 0, - ], - [ - 3, - 3, - 1, - ], - [ - 3.75, - 3, - 1, - ], - [ - 4.5, - 3, - 1, - ], - [ - -1.5, - 3.75, - 0, - ], - [ - -0.75, - 3.75, - 0, - ], - [ - 0, - 3.75, - 0, - ], - [ - 0.75, - 3.75, - 0, - ], - [ - 1.5, - 3.75, - 0, - ], - [ - 2.25, - 3.75, - 0, - ], - [ - 3, - 3.75, - 0, - ], - [ - 3.75, - 3.75, - 1, - ], - [ - 4.5, - 3.75, - 1, - ], - [ - -1.5, - 4.5, - 0, - ], - [ - -0.75, 4.5, 0, ], [ 0, - 4.5, - 0, + -1.5, + 0.75, ], [ + 0, + -0.75, + 0.75, + ], + [ + 0, + 0, + 0.75, + ], + [ + 1, + 0.75, + 0.75, + ], + [ + 1, + 1.5, + 0.75, + ], + [ + 1, + 2.25, + 0.75, + ], + [ + 1, + 3, + 0.75, + ], + [ + 1, + 3.75, + 0.75, + ], + [ + 1, + 4.5, + 0.75, + ], + [ + 0, + -1.5, + 1.5, + ], + [ + 0, + -0.75, + 1.5, + ], + [ + 0, + 0, + 1.5, + ], + [ + 0, + 0.75, + 1.5, + ], + [ + 1, + 1.5, + 1.5, + ], + [ + 1, + 2.25, + 1.5, + ], + [ + 1, + 3, + 1.5, + ], + [ + 1, + 3.75, + 1.5, + ], + [ + 1, + 4.5, + 1.5, + ], + [ + 0, + -1.5, + 2.25, + ], + [ + 0, + -0.75, + 2.25, + ], + [ + 0, + 0, + 2.25, + ], + [ + 0, + 0.75, + 2.25, + ], + [ + 0, + 1.5, + 2.25, + ], + [ + 1, + 2.25, + 2.25, + ], + [ + 1, + 3, + 2.25, + ], + [ + 1, + 3.75, + 2.25, + ], + [ + 1, + 4.5, + 2.25, + ], + [ + 0, + -1.5, + 3, + ], + [ + 0, + -0.75, + 3, + ], + [ + 0, + 0, + 3, + ], + [ + 0, + 0.75, + 3, + ], + [ + 0, + 1.5, + 3, + ], + [ + 0, + 2.25, + 3, + ], + [ + 1, + 3, + 3, + ], + [ + 1, + 3.75, + 3, + ], + [ + 1, + 4.5, + 3, + ], + [ + 0, + -1.5, + 3.75, + ], + [ + 0, + -0.75, + 3.75, + ], + [ + 0, + 0, + 3.75, + ], + [ + 0, + 0.75, + 3.75, + ], + [ + 0, + 1.5, + 3.75, + ], + [ + 0, + 2.25, + 3.75, + ], + [ + 0, + 3, + 3.75, + ], + [ + 1, + 3.75, + 3.75, + ], + [ + 1, + 4.5, + 3.75, + ], + [ + 0, + -1.5, + 4.5, + ], + [ + 0, + -0.75, + 4.5, + ], + [ + 0, + 0, + 4.5, + ], + [ + 0, 0.75, 4.5, - 0, ], [ + 0, 1.5, 4.5, - 0, ], [ + 0, 2.25, 4.5, - 0, ], [ + 0, 3, 4.5, - 0, ], [ + 0, 3.75, 4.5, - 0, ], [ - 4.5, - 4.5, 1, + 4.5, + 4.5, ], ]; diff --git a/tests/data/Calculation/Engineering/HEX2BIN.php b/tests/data/Calculation/Engineering/HEX2BIN.php index bc1fad56..76903007 100644 --- a/tests/data/Calculation/Engineering/HEX2BIN.php +++ b/tests/data/Calculation/Engineering/HEX2BIN.php @@ -2,70 +2,70 @@ return [ [ - 'FF', '11111111', + 'FF', ], [ - '1FF', '111111111', + '1FF', ], [ + '#NUM!', '200', - '#NUM!', ], // 2's Complement [ - 'FFFFFFFE00', '1000000000', + 'FFFFFFFE00', ], // 2's Complement [ + '#NUM!', 'FFFFFFFDFF', - '#NUM!', ], [ - '01AB', '110101011', + '01AB', ], [ - 'ABCD', '#NUM!', + 'ABCD', ], [ - 'F6', '11110110', + 'F6', ], [ + '00001111', 'F', 8, - '00001111', ], [ - 'B7', '10110111', + 'B7', ], [ + '#NUM!', '12345', - '#NUM!', ], [ + '#NUM!', '123456789', - '#NUM!', ], [ + '#NUM!', '123.45', + ], + [ + '0', + '0', + ], + [ '#NUM!', - ], - [ - '0', - '0', - ], - [ 'G3579A', - '#NUM!', ], [ - true, '#VALUE!', + true, ], ]; diff --git a/tests/data/Calculation/Engineering/HEX2DEC.php b/tests/data/Calculation/Engineering/HEX2DEC.php index 2e2751df..c8bbd153 100644 --- a/tests/data/Calculation/Engineering/HEX2DEC.php +++ b/tests/data/Calculation/Engineering/HEX2DEC.php @@ -2,66 +2,66 @@ return [ [ - '01AB', '427', + '01AB', ], [ - 'ABCD', '43981', + 'ABCD', ], [ - 'F6', '246', + 'F6', ], [ - '12345', '74565', + '12345', ], [ - '123456789', '4886718345', + '123456789', ], [ + '#NUM!', '123.45', + ], + [ + '0', + '0', + ], + [ '#NUM!', - ], - [ - '0', - '0', - ], - [ 'G3579A', - '#NUM!', ], [ - true, '#VALUE!', + true, ], [ - '-107', '#NUM!', + '-107', ], [ - 'A5', '165', + 'A5', ], [ - '3DA408B9', '1034160313', + '3DA408B9', ], // 2's Complement [ - 'FFFFFFFF5B', '-165', + 'FFFFFFFF5B', ], // 2's Complement [ - 'FFFFFFFFFF', '-1', + 'FFFFFFFFFF', ], // Too large [ - '1FFFFFFFFFF', '#NUM!', + '1FFFFFFFFFF', ], ]; diff --git a/tests/data/Calculation/Engineering/HEX2OCT.php b/tests/data/Calculation/Engineering/HEX2OCT.php index 80a38174..9b2dd90d 100644 --- a/tests/data/Calculation/Engineering/HEX2OCT.php +++ b/tests/data/Calculation/Engineering/HEX2OCT.php @@ -2,57 +2,57 @@ return [ [ - '01AB', '653', + '01AB', ], [ - 'ABCD', '125715', + 'ABCD', ], [ - 'F6', '366', + 'F6', ], [ - '3B4E', '35516', + '3B4E', ], [ + '017', 'F', 3, - '017', ], [ - '12345', '221505', + '12345', ], [ + '#NUM!', '123456789', - '#NUM!', ], [ + '#NUM!', '123.45', + ], + [ + '0', + '0', + ], + [ '#NUM!', - ], - [ - '0', - '0', - ], - [ 'G3579A', - '#NUM!', ], [ - true, '#VALUE!', + true, ], [ - '-107', '#NUM!', + '-107', ], // 2's Complement [ - 'FFFFFFFF00', '7777777400', + 'FFFFFFFF00', ], ]; diff --git a/tests/data/Calculation/Engineering/IMABS.php b/tests/data/Calculation/Engineering/IMABS.php index 56955186..3e789326 100644 --- a/tests/data/Calculation/Engineering/IMABS.php +++ b/tests/data/Calculation/Engineering/IMABS.php @@ -2,111 +2,111 @@ return [ [ - '12.34+5.67j', 13.58029822942, + '12.34+5.67j', ], [ - '1.234E-5+6.78E9i', 6780000000.0, + '1.234E-5+6.78E9i', ], [ + 4.3011626335209998, '3.5+2.5i', - 4.3011626335209998, ], [ + 3.6400549446400001, '3.5+i', - 3.6400549446400001, ], [ + 3.5, '3.5', - 3.5, ], [ + 3.6400549446400001, '3.5-i', - 3.6400549446400001, ], [ + 4.3011626335209998, '3.5-2.5i', - 4.3011626335209998, ], [ + 2.6925824035670001, '1+2.5i', - 2.6925824035670001, ], [ + 1.4142135623730001, '1+i', - 1.4142135623730001, ], [ + 1, '1', - 1, ], [ + 1.4142135623730001, '1-i', - 1.4142135623730001, ], [ + 2.6925824035670001, '1-2.5i', - 2.6925824035670001, ], [ + 2.5, '2.5i', - 2.5, ], [ + 1, 'i', - 1, ], [ - '0', 0, + '0', ], [ + 1, '-i', - 1, ], [ - '-2.5i', 2.5, + '-2.5i', ], [ + 2.6925824035670001, '-1+2.5i', - 2.6925824035670001, ], [ + 1.4142135623730001, '-1+i', - 1.4142135623730001, ], [ - '-1', 1, + '-1', ], [ - '-1-i', 1.4142135623730001, + '-1-i', ], [ - '-1-2.5i', 2.6925824035670001, + '-1-2.5i', ], [ + 4.3011626335209998, '-3.5+2.5i', - 4.3011626335209998, ], [ + 3.6400549446400001, '-3.5+i', - 3.6400549446400001, ], [ - '-3.5', 3.5, + '-3.5', ], [ - '-3.5-i', 3.6400549446400001, + '-3.5-i', ], [ - '-3.5-2.5i', 4.3011626335209998, + '-3.5-2.5i', ], ]; diff --git a/tests/data/Calculation/Engineering/IMAGINARY.php b/tests/data/Calculation/Engineering/IMAGINARY.php index a0dc711f..0fe61648 100644 --- a/tests/data/Calculation/Engineering/IMAGINARY.php +++ b/tests/data/Calculation/Engineering/IMAGINARY.php @@ -2,123 +2,123 @@ return [ [ - '12.34+5.67j', 5.6699999999999999, + '12.34+5.67j', ], [ - '1.234E-5+6.78E9i', 6780000000.0, + '1.234E-5+6.78E9i', ], [ + 2.5, '3.5+2.5i', - 2.5, ], [ + 1, '3.5+i', - 1, ], [ + 0, '3.5', - 0, ], [ + -1, '3.5-i', - -1, ], [ + -2.5, '3.5-2.5i', - -2.5, ], [ + 2.5, '1+2.5i', - 2.5, ], [ + 1, '1+i', - 1, ], [ + 0, '1', - 0, ], [ + 0, 1, - 0, ], [ + -1, '1-i', - -1, ], [ + -2.5, '1-2.5i', - -2.5, ], [ + 2.5, '2.5i', - 2.5, ], [ + 1, 'i', - 1, ], [ + 0, '0', - 0, ], [ 0, 0, ], [ + 0, 0.0, - 0, ], [ + -1, '-i', - -1, ], [ + -2.5, '-2.5i', - -2.5, ], [ + 2.5, '-1+2.5i', - 2.5, ], [ + 1, '-1+i', - 1, ], [ + 0, '-1', - 0, ], [ + -1, '-1-i', - -1, ], [ + -2.5, '-1-2.5i', - -2.5, ], [ - '-3.5+2.5i', 2.5, + '-3.5+2.5i', ], [ - '-3.5+i', 1, + '-3.5+i', ], [ - '-3.5', 0, + '-3.5', ], [ - '-3.5-i', -1, + '-3.5-i', ], [ - '-3.5-2.5i', -2.5, + '-3.5-2.5i', ], ]; diff --git a/tests/data/Calculation/Engineering/IMARGUMENT.php b/tests/data/Calculation/Engineering/IMARGUMENT.php index 1b6dece1..37253001 100644 --- a/tests/data/Calculation/Engineering/IMARGUMENT.php +++ b/tests/data/Calculation/Engineering/IMARGUMENT.php @@ -2,107 +2,107 @@ return [ [ - '12.34+5.67j', 0.43071059555000002, + '12.34+5.67j', ], [ - '3.5+2.5i', 0.620249485983, + '3.5+2.5i', ], [ - '3.5+i', 0.27829965900499998, + '3.5+i', ], [ + 0, '3.5', - 0, ], [ - '3.5-i', -0.27829965900499998, + '3.5-i', ], [ - '3.5-2.5i', -0.620249485983, + '3.5-2.5i', ], [ - '1+2.5i', 1.1902899496829999, + '1+2.5i', ], [ - '1+i', 0.78539816339699997, + '1+i', ], [ - '1', 0, + '1', ], [ - '1-i', -0.78539816339699997, + '1-i', ], [ - '1-2.5i', -1.1902899496829999, + '1-2.5i', ], [ + 1.570796326795, '2.5i', - 1.570796326795, ], [ + 1.570796326795, 'i', - 1.570796326795, ], [ - '0', '#DIV/0!', + '0', ], [ + -1.570796326795, '-i', - -1.570796326795, ], [ + -1.570796326795, '-2.5i', - -1.570796326795, ], [ - '-1+2.5i', 1.9513027039069999, + '-1+2.5i', ], [ - '-1+i', 2.3561944901919998, + '-1+i', ], [ + 3.1415926535900001, '-1', - 3.1415926535900001, ], [ - '-1-i', -2.3561944901919998, + '-1-i', ], [ - '-1-2.5i', -1.9513027039069999, + '-1-2.5i', ], [ - '-3.5+2.5i', 2.5213431676070002, + '-3.5+2.5i', ], [ - '-3.5+i', 2.8632929945850001, + '-3.5+i', ], [ - '-3.5', 3.1415926535900001, + '-3.5', ], [ - '-3.5-i', -2.8632929945850001, + '-3.5-i', ], [ - '-3.5-2.5i', -2.5213431676070002, + '-3.5-2.5i', ], ]; diff --git a/tests/data/Calculation/Engineering/IMCONJUGATE.php b/tests/data/Calculation/Engineering/IMCONJUGATE.php index 4e09b68c..37b6612d 100644 --- a/tests/data/Calculation/Engineering/IMCONJUGATE.php +++ b/tests/data/Calculation/Engineering/IMCONJUGATE.php @@ -2,107 +2,107 @@ return [ [ - '12.34+5.67j', '12.34-5.67j', - ], - [ - '3.5+2.5i', - '3.5-2.5i', - ], - [ - '3.5+i', - '3.5-i', - ], - [ - '3.5', - '3.5', - ], - [ - '3.5-i', - '3.5+i', + '12.34+5.67j', ], [ '3.5-2.5i', '3.5+2.5i', ], [ - '1+2.5i', - '1-2.5i', + '3.5-i', + '3.5+i', ], [ - '1+i', - '1-i', + '3.5', + '3.5', ], [ - '1', - '1', + '3.5+i', + '3.5-i', ], [ - '1-i', - '1+i', + '3.5+2.5i', + '3.5-2.5i', ], [ '1-2.5i', '1+2.5i', ], [ - '2.5i', - '-2.5i', + '1-i', + '1+i', ], [ - 'i', - '-i', + '1', + '1', ], [ - '0', - '0', + '1+i', + '1-i', ], [ - '-i', - 'i', + '1+2.5i', + '1-2.5i', ], [ '-2.5i', '2.5i', ], [ - '-1+2.5i', - '-1-2.5i', + '-i', + 'i', ], [ - '-1+i', - '-1-i', + '0', + '0', ], [ - '-1', - '-1', + 'i', + '-i', ], [ - '-1-i', - '-1+i', + '2.5i', + '-2.5i', ], [ '-1-2.5i', '-1+2.5i', ], [ - '-3.5+2.5i', + '-1-i', + '-1+i', + ], + [ + '-1', + '-1', + ], + [ + '-1+i', + '-1-i', + ], + [ + '-1+2.5i', + '-1-2.5i', + ], + [ '-3.5-2.5i', - ], - [ - '-3.5+i', - '-3.5-i', - ], - [ - '-3.5', - '-3.5', + '-3.5+2.5i', ], [ '-3.5-i', '-3.5+i', ], [ - '-3.5-2.5i', + '-3.5', + '-3.5', + ], + [ + '-3.5+i', + '-3.5-i', + ], + [ '-3.5+2.5i', + '-3.5-2.5i', ], ]; diff --git a/tests/data/Calculation/Engineering/IMCOS.php b/tests/data/Calculation/Engineering/IMCOS.php index 47b2d2a3..c951a4a3 100644 --- a/tests/data/Calculation/Engineering/IMCOS.php +++ b/tests/data/Calculation/Engineering/IMCOS.php @@ -2,111 +2,111 @@ return [ [ - '12.34+5.67j', '141.319179436356+32.547610312508j', + '12.34+5.67j', ], [ + '-5.74262349163406+2.12231025604134i', '3.5+2.5i', - '-5.74262349163406+2.12231025604134i', ], [ + '-1.44502817950166+0.412240867891067i', '3.5+i', - '-1.44502817950166+0.412240867891067i', ], [ + '-0.936456687290796', '3.5', - '-0.936456687290796', ], [ + '-1.44502817950166-0.412240867891067i', '3.5-i', - '-1.44502817950166-0.412240867891067i', ], [ + '-5.74262349163406-2.12231025604134i', '3.5-2.5i', - '-5.74262349163406-2.12231025604134i', ], [ + '3.31329014611322-5.0910715229497i', '1+2.5i', - '3.31329014611322-5.0910715229497i', ], [ + '0.833730025131149-0.988897705762865i', '1+i', - '0.833730025131149-0.988897705762865i', ], [ - '1', '0.54030230586814', + '1', ], [ + '0.833730025131149+0.988897705762865i', '1-i', - '0.833730025131149+0.988897705762865i', ], [ + '3.31329014611322+5.0910715229497i', '1-2.5i', - '3.31329014611322+5.0910715229497i', ], [ + '6.13228947966369', '2.5i', - '6.13228947966369', ], [ + '1.54308063481524', 'i', - '1.54308063481524', ], [ - '0', '1', + '0', ], [ - '-i', '1.54308063481524', + '-i', ], [ - '-2.5i', '6.13228947966369', + '-2.5i', ], [ - '-1+2.5i', '3.31329014611322+5.0910715229497i', + '-1+2.5i', ], [ - '-1+i', '0.833730025131149+0.988897705762865i', + '-1+i', ], [ - '-1', '0.54030230586814', + '-1', ], [ - '-1-i', '0.833730025131149-0.988897705762865i', + '-1-i', ], [ - '-1-2.5i', '3.31329014611322-5.0910715229497i', + '-1-2.5i', ], [ - '-3.5+2.5i', '-5.74262349163406-2.12231025604134i', + '-3.5+2.5i', ], [ - '-3.5+i', '-1.44502817950166-0.412240867891067i', + '-3.5+i', ], [ - '-3.5', '-0.936456687290796', + '-3.5', ], [ - '-3.5-i', '-1.44502817950166+0.412240867891067i', + '-3.5-i', ], [ - '-3.5-2.5i', '-5.74262349163406+2.12231025604134i', + '-3.5-2.5i', ], [ - '3', '-0.989992496600445', + '3', ], ]; diff --git a/tests/data/Calculation/Engineering/IMDIV.php b/tests/data/Calculation/Engineering/IMDIV.php index fb688502..d53562ac 100644 --- a/tests/data/Calculation/Engineering/IMDIV.php +++ b/tests/data/Calculation/Engineering/IMDIV.php @@ -2,103 +2,103 @@ return [ [ + '#NUM!', '12.34+5.67j', '123.45+67.89i', - '#NUM!', ], [ + '0.0961415519586104-0.00694248653276682j', '12.34+5.67j', '123.45+67.89j', - '0.0961415519586104-0.00694248653276682j', ], [ - '-12.34+5.67i', - '-123.45+67.89i', '0.0961415519586104+0.00694248653276682i', + '-12.34+5.67i', + '-123.45+67.89i', ], [ - '-12.34-5.67i', - '-123.45+67.89i', '0.0573549954111941+0.0774712890924744i', + '-12.34-5.67i', + '-123.45+67.89i', ], [ - '-12.34+5.67i', - '-123.45-67.89i', '0.0573549954111941-0.0774712890924744i', + '-12.34+5.67i', + '-123.45-67.89i', ], [ - '-12.34-5.67i', - '-123.45-67.89i', '0.0961415519586104-0.00694248653276682i', + '-12.34-5.67i', + '-123.45-67.89i', ], [ + '-0.0573549954111941-0.0774712890924744i', '12.34+5.67i', '-123.45+67.89i', - '-0.0573549954111941-0.0774712890924744i', ], [ + '-0.0961415519586104-0.00694248653276682i', '12.34-5.67i', '-123.45+67.89i', - '-0.0961415519586104-0.00694248653276682i', ], [ + '-0.0961415519586104+0.00694248653276682i', '12.34+5.67i', '-123.45-67.89i', - '-0.0961415519586104+0.00694248653276682i', ], [ + '-0.0573549954111941+0.0774712890924744i', '12.34-5.67i', '-123.45-67.89i', - '-0.0573549954111941+0.0774712890924744i', ], [ + '-0.0573549954111941+0.0774712890924744i', '-12.34+5.67i', '123.45+67.89i', - '-0.0573549954111941+0.0774712890924744i', ], [ - '-12.34-5.67i', - '123.45+67.89i', '-0.0961415519586104+0.00694248653276682i', + '-12.34-5.67i', + '123.45+67.89i', ], [ + '-0.0961415519586104-0.00694248653276682i', '-12.34+5.67i', '123.45-67.89i', - '-0.0961415519586104-0.00694248653276682i', ], [ + '-0.0573549954111941-0.0774712890924744i', '-12.34-5.67i', '123.45-67.89i', - '-0.0573549954111941-0.0774712890924744i', ], [ + '#NUM!', '-12.34-5.67i', '123.45-67.89', - '#NUM!', ], [ + '#NUM!', '-12.34-5.67j', '123.45-67.89', - '#NUM!', ], [ + '#NUM!', '-12.34-5.67', '123.45-67.89j', - '#NUM!', ], [ - '-12.34-5.67i', - '-12.34-5.67i', '1', + '-12.34-5.67i', + '-12.34-5.67i', ], [ + '-0.0767482736849023-0.0422068878126206i', '-12.34', '123.45-67.89i', - '-0.0767482736849023-0.0422068878126206i', ], [ + '1+0.459481361426256i', '-12.34-5.67i', '-12.34', - '1+0.459481361426256i', ], ]; diff --git a/tests/data/Calculation/Engineering/IMEXP.php b/tests/data/Calculation/Engineering/IMEXP.php index 09081cc3..c57be8da 100644 --- a/tests/data/Calculation/Engineering/IMEXP.php +++ b/tests/data/Calculation/Engineering/IMEXP.php @@ -2,111 +2,111 @@ return [ [ - '12.34+5.67j', '187004.11273906-131589.323796073j', + '12.34+5.67j', ], [ - '-12.34E-5+6.78E9i', '0.519482808316086+0.85433649244115i', + '-12.34E-5+6.78E9i', ], [ - '3.5+2.5i', '-26.5302329126575+19.8186755366902i', + '3.5+2.5i', ], [ - '3.5+i', '17.8923550531471+27.8656919720394i', + '3.5+i', ], [ - '3.5', '33.1154519586923', + '3.5', ], [ - '3.5-i', '17.8923550531471-27.8656919720394i', + '3.5-i', ], [ - '3.5-2.5i', '-26.5302329126575-19.8186755366902i', + '3.5-2.5i', ], [ - '1+2.5i', '-2.17773413212721+1.62681595415671i', + '1+2.5i', ], [ - '1+i', '1.46869393991589+2.28735528717884i', + '1+i', ], [ - '1', '2.71828182845905', - ], - [ - '1-i', - '1.46869393991589-2.28735528717884i', - ], - [ - '1-2.5i', - '-2.17773413212721-1.62681595415671i', - ], - [ - '2.5i', - '-0.801143615546934+0.598472144103957i', - ], - [ - 'i', - '0.54030230586814+0.841470984807897i', - ], - [ - '0', '1', ], [ - '-i', + '1.46869393991589-2.28735528717884i', + '1-i', + ], + [ + '-2.17773413212721-1.62681595415671i', + '1-2.5i', + ], + [ + '-0.801143615546934+0.598472144103957i', + '2.5i', + ], + [ + '0.54030230586814+0.841470984807897i', + 'i', + ], + [ + '1', + '0', + ], + [ '0.54030230586814-0.841470984807897i', + '-i', ], [ - '-2.5i', '-0.801143615546934-0.598472144103957i', + '-2.5i', ], [ - '-1+2.5i', '-0.294724265585475+0.220165597929638i', + '-1+2.5i', ], [ - '-1+i', '0.198766110346413+0.309559875653112i', + '-1+i', ], [ - '-1', '0.367879441171442', + '-1', ], [ - '-1-i', '0.198766110346413-0.309559875653112i', + '-1-i', ], [ - '-1-2.5i', '-0.294724265585475-0.220165597929638i', + '-1-2.5i', ], [ - '-3.5+2.5i', '-0.0241924409350133+0.0180722928030842i', + '-3.5+2.5i', ], [ - '-3.5+i', '0.016315715894263+0.025410221967i', + '-3.5+i', ], [ - '-3.5', '0.0301973834223185', + '-3.5', ], [ - '-3.5-i', '0.016315715894263-0.025410221967i', + '-3.5-i', ], [ - '-3.5-2.5i', '-0.0241924409350133-0.0180722928030842i', + '-3.5-2.5i', ], ]; diff --git a/tests/data/Calculation/Engineering/IMLN.php b/tests/data/Calculation/Engineering/IMLN.php index 5dfe4460..d4497b52 100644 --- a/tests/data/Calculation/Engineering/IMLN.php +++ b/tests/data/Calculation/Engineering/IMLN.php @@ -2,111 +2,111 @@ return [ [ - '12.34+5.67j', '2.60862008281875+0.430710595550204j', + '12.34+5.67j', ], [ - '-1.234E-5+6.78E9i', '22.6372429388987+1.5707963267949i', + '-1.234E-5+6.78E9i', ], [ - '3.5+2.5i', '1.45888536604214+0.620249485982821i', + '3.5+2.5i', ], [ - '3.5+i', '1.29199877621612+0.278299659005111i', + '3.5+i', ], [ - '3.5', '1.25276296849537', + '3.5', ], [ - '3.5-i', '1.29199877621612-0.278299659005111i', + '3.5-i', ], [ - '3.5-2.5i', '1.45888536604214-0.620249485982821i', + '3.5-2.5i', ], [ - '1+2.5i', '0.990500734433292+1.19028994968253i', + '1+2.5i', ], [ - '1+i', '0.346573590279973+0.785398163397448i', + '1+i', ], [ + '0', '1', - '0', ], [ - '1-i', '0.346573590279973-0.785398163397448i', + '1-i', ], [ - '1-2.5i', '0.990500734433292-1.19028994968253i', + '1-2.5i', ], [ - '2.5i', '0.916290731874155+1.5707963267949i', + '2.5i', ], [ - 'i', '1.5707963267949i', + 'i', ], [ - '0', '#NUM!', + '0', ], [ - '-i', '-1.5707963267949i', + '-i', ], [ - '-2.5i', '0.916290731874155-1.5707963267949i', + '-2.5i', ], [ - '-1+2.5i', '0.990500734433292+1.95130270390726i', + '-1+2.5i', ], [ - '-1+i', '0.346573590279973+2.35619449019234i', + '-1+i', ], [ - '-1', '3.14159265358979i', + '-1', ], [ - '-1-i', '0.346573590279973-2.35619449019234i', + '-1-i', ], [ - '-1-2.5i', '0.990500734433292-1.95130270390726i', + '-1-2.5i', ], [ - '-3.5+2.5i', '1.45888536604214+2.52134316760697i', + '-3.5+2.5i', ], [ - '-3.5+i', '1.29199877621612+2.86329299458468i', + '-3.5+i', ], [ - '-3.5', '1.25276296849537+3.14159265358979i', + '-3.5', ], [ - '-3.5-i', '1.29199877621612-2.86329299458468i', + '-3.5-i', ], [ - '-3.5-2.5i', '1.45888536604214-2.52134316760697i', + '-3.5-2.5i', ], ]; diff --git a/tests/data/Calculation/Engineering/IMLOG10.php b/tests/data/Calculation/Engineering/IMLOG10.php index f036b40e..dadf89cd 100644 --- a/tests/data/Calculation/Engineering/IMLOG10.php +++ b/tests/data/Calculation/Engineering/IMLOG10.php @@ -2,111 +2,111 @@ return [ [ - '12.34+5.67j', '1.13290930735019+0.187055234944717j', + '12.34+5.67j', ], [ - '-12.34E-5+6.78E9i', '9.83122969386706+0.682188176920927i', + '-12.34E-5+6.78E9i', ], [ - '3.5+2.5i', '0.633585864201507+0.269370929165668i', + '3.5+2.5i', ], [ - '3.5+i', '0.561107939136413+0.120864006221476i', + '3.5+i', ], [ - '3.5', '0.544068044350276', + '3.5', ], [ - '3.5-i', '0.561107939136413-0.120864006221476i', + '3.5-i', ], [ - '3.5-2.5i', '0.633585864201507-0.269370929165668i', + '3.5-2.5i', ], [ - '1+2.5i', '0.430169003285497+0.516936357012023i', + '1+2.5i', ], [ - '1+i', '0.150514997831991+0.34109408846046i', + '1+i', ], [ + '0', '1', - '0', ], [ - '1-i', '0.150514997831991-0.34109408846046i', + '1-i', ], [ - '1-2.5i', '0.430169003285497-0.516936357012023i', + '1-2.5i', ], [ - '2.5i', '0.397940008672038+0.68218817692092i', + '2.5i', ], [ - 'i', '0.68218817692092i', + 'i', ], [ - '0', '#NUM!', + '0', ], [ - '-i', '-0.68218817692092i', + '-i', ], [ - '-2.5i', '0.397940008672038-0.68218817692092i', + '-2.5i', ], [ - '-1+2.5i', '0.430169003285497+0.847439996829817i', + '-1+2.5i', ], [ - '-1+i', '0.150514997831991+1.02328226538138i', + '-1+i', ], [ - '-1', '1.36437635384184i', + '-1', ], [ - '-1-i', '0.150514997831991-1.02328226538138i', + '-1-i', ], [ - '-1-2.5i', '0.430169003285497-0.847439996829817i', + '-1-2.5i', ], [ - '-3.5+2.5i', '0.633585864201507+1.09500542467617i', + '-3.5+2.5i', ], [ - '-3.5+i', '0.561107939136413+1.24351234762036i', + '-3.5+i', ], [ - '-3.5', '0.544068044350276+1.36437635384184i', + '-3.5', ], [ - '-3.5-i', '0.561107939136413-1.24351234762036i', + '-3.5-i', ], [ - '-3.5-2.5i', '0.633585864201507-1.09500542467617i', + '-3.5-2.5i', ], ]; diff --git a/tests/data/Calculation/Engineering/IMLOG2.php b/tests/data/Calculation/Engineering/IMLOG2.php index 4b84171a..40948717 100644 --- a/tests/data/Calculation/Engineering/IMLOG2.php +++ b/tests/data/Calculation/Engineering/IMLOG2.php @@ -2,111 +2,111 @@ return [ [ - '12.34+5.67j', '3.76344325733562+0.621384040306436j', + '12.34+5.67j', ], [ - '-12.34E-5+6.78E9i', '32.6586381298614+2.26618007108803i', + '-12.34E-5+6.78E9i', ], [ - '3.5+2.5i', '2.10472668297646+0.894830857610216i', + '3.5+2.5i', ], [ - '3.5+i', '1.86396022742506+0.401501537958665i', + '3.5+i', ], [ - '3.5', '1.80735492219671', + '3.5', ], [ - '3.5-i', '1.86396022742506-0.401501537958665i', + '3.5-i', ], [ - '3.5-2.5i', '2.10472668297646-0.894830857610216i', + '3.5-2.5i', ], [ - '1+2.5i', '1.42899049767377+1.71722540775913i', + '1+2.5i', ], [ - '1+i', '0.500000000038482+1.13309003554401i', + '1+i', ], [ + '0', '1', - '0', ], [ - '1-i', '0.500000000038482-1.13309003554401i', + '1-i', ], [ - '1-2.5i', '1.42899049767377-1.71722540775913i', + '1-2.5i', ], [ - '2.5i', '1.3219280949891+2.26618007108801i', + '2.5i', ], [ - 'i', '2.26618007108801i', + 'i', ], [ - '0', '#NUM!', + '0', ], [ - '-i', '-2.26618007108801i', + '-i', ], [ - '-2.5i', '1.3219280949891-2.26618007108801i', + '-2.5i', ], [ - '-1+2.5i', '1.42899049767377+2.81513473441689i', + '-1+2.5i', ], [ - '-1+i', '0.500000000038482+3.39927010663201i', + '-1+i', ], [ - '-1', '4.53236014217602i', + '-1', ], [ - '-1-i', '0.500000000038482-3.39927010663201i', + '-1-i', ], [ - '-1-2.5i', '1.42899049767377-2.81513473441689i', + '-1-2.5i', ], [ - '-3.5+2.5i', '2.10472668297646+3.63752928456581i', + '-3.5+2.5i', ], [ - '-3.5+i', '1.86396022742506+4.13085860421736i', + '-3.5+i', ], [ - '-3.5', '1.80735492219671+4.53236014217602i', + '-3.5', ], [ - '-3.5-i', '1.86396022742506-4.13085860421736i', + '-3.5-i', ], [ - '-3.5-2.5i', '2.10472668297646-3.63752928456581i', + '-3.5-2.5i', ], ]; diff --git a/tests/data/Calculation/Engineering/IMPOWER.php b/tests/data/Calculation/Engineering/IMPOWER.php index 9fa182ec..821008a5 100644 --- a/tests/data/Calculation/Engineering/IMPOWER.php +++ b/tests/data/Calculation/Engineering/IMPOWER.php @@ -2,93 +2,93 @@ return [ [ + '120.1267+139.9356j', '12.34+5.67j', 2, - '120.1267+139.9356j', ], [ + '688.928626+2407.923693j', '12.34+5.67j', 3, - '688.928626+2407.923693j', ], [ + '6.69108496973016E-002-3.07442883131037E-002j', '12.34+5.67j', -1, - '6.69108496973016E-002-3.07442883131037E-002j', ], [ + '3.53185054333564E-003-4.11425290873718E-003j', '12.34+5.67j', -2, - '3.53185054333564E-003-4.11425290873718E-003j', ], [ + '3.60002071031685+0.787495469644252j', '12.34+5.67j', 0.5, - '3.60002071031685+0.787495469644252j', ], [ + '0.517904976730581-5.59833234375533E-002j', '12.34+5.67j', -0.25, - '0.517904976730581-5.59833234375533E-002j', ], [ + '1', '12.34+5.67j', 0, - '1', ], [ + '-1-1.34451369308841E-014i', '-i', 2, - '-1-1.34451369308841E-014i', ], [ + '1.22460635382238E-016-2i', '1-i', 2, - '1.22460635382238E-016-2i', ], [ + '-6.25+8.40321058180257E-014i', '2.5i', 2, - '-6.25+8.40321058180257E-014i', ], [ - '2.5i', - '2.5', '-6.98771242968685-6.98771242968684i', + '2.5i', + '2.5', ], [ - '2.5i', - '2.5i', '#VALUE!', + '2.5i', + '2.5i', ], [ - '2.5', - '2.5', 9.8821176880261898, + '2.5', + '2.5', ], [ - '2', - '2', 4, + '2', + '2', ], [ - '-12.34-5.67i', - '-12.34', '-4.69972844488573E-15+9.35464904349343E-15i', + '-12.34-5.67i', + '-12.34', ], [ + '5.93343000067521E-15-8.62503997728057E-15i', '12.34-5.67i', '-12.34', - '5.93343000067521E-15-8.62503997728057E-15i', ], [ + '-42881944468901.9-85355046682682.3i', '-12.34-5.67i', '12.34', - '-42881944468901.9-85355046682682.3i', ], [ + '54138663282971.3+78697841733874.3i', '12.34-5.67i', '12.34', - '54138663282971.3+78697841733874.3i', ], ]; diff --git a/tests/data/Calculation/Engineering/IMPRODUCT.php b/tests/data/Calculation/Engineering/IMPRODUCT.php index d8166737..47076bcd 100644 --- a/tests/data/Calculation/Engineering/IMPRODUCT.php +++ b/tests/data/Calculation/Engineering/IMPRODUCT.php @@ -2,79 +2,79 @@ return [ [ - '12.34+5.67j', - '123.45+67.89i', '#NUM!', - ], - [ '12.34+5.67j', - '12.34+5.67j', - ], - [ - '12.34+5.67i', '123.45+67.89i', - '5.67', + ], + [ + '12.34+5.67j', + '12.34+5.67j', + ], + [ '6454.936089+8718.895647i', + '12.34+5.67i', + '123.45+67.89i', + '5.67', ], [ + '6454.936089+8718.895647j', '12.34+5.67j', '123.45+67.89j', '5.67', - '6454.936089+8718.895647j', ], [ + '1138.4367+1537.7241j', '12.34+5.67j', '123.45+67.89j', - '1138.4367+1537.7241j', ], [ + '1908.3093+137.8011i', '12.34-5.67i', '123.45+67.89i', - '1908.3093+137.8011i', ], [ + '1908.3093-137.8011i', '12.34+5.67i', '123.45-67.89i', - '1908.3093-137.8011i', ], [ + '1138.4367-1537.7241i', '12.34-5.67i', '123.45-67.89i', - '1138.4367-1537.7241i', ], [ + '-1908.3093-137.8011i', '-12.34+5.67i', '123.45+67.89i', - '-1908.3093-137.8011i', ], [ + '-1138.4367-1537.7241i', '-12.34-5.67i', '123.45+67.89i', - '-1138.4367-1537.7241i', ], [ + '-1908.3093+137.8011i', '12.34+5.67i', '-123.45+67.89i', - '-1908.3093+137.8011i', ], [ + '1138.4367-1537.7241i', '-12.34+5.67i', '-123.45+67.89i', - '1138.4367-1537.7241i', ], [ + '1138.4367+1537.7241i', '-12.34-5.67i', '-123.45-67.89i', - '1138.4367+1537.7241i', ], [ + '-1523.373+837.7626i', '-12.34', '123.45-67.89i', - '-1523.373+837.7626i', ], [ + '152.2756+69.9678i', '-12.34-5.67i', '-12.34', - '152.2756+69.9678i', ], ]; diff --git a/tests/data/Calculation/Engineering/IMREAL.php b/tests/data/Calculation/Engineering/IMREAL.php index 400a9158..477268db 100644 --- a/tests/data/Calculation/Engineering/IMREAL.php +++ b/tests/data/Calculation/Engineering/IMREAL.php @@ -2,123 +2,123 @@ return [ [ - '12.34+5.67j"', 12.34, + '12.34+5.67j"', ], [ - '-1.234E-5+6.78E9i', -1.234E-5, + '-1.234E-5+6.78E9i', ], [ + 3.5, '3.5+2.5i', - 3.5, ], [ + 3.5, '3.5+i', - 3.5, ], [ + 3.5, '3.5', - 3.5, ], [ 3.5, 3.5, ], [ + 3.5, '3.5-i', - 3.5, ], [ + 3.5, '3.5-2.5i', - 3.5, ], [ + 1, '1+2.5i', - 1, ], [ + 1, '1+i', - 1, ], [ + 1, '1', - 1, ], [ 1, 1, ], [ + 1, '1-i', - 1, ], [ + 1, '1-2.5i', - 1, ], [ + 0, '2.5i', - 0, ], [ + 0, 'i', - 0, ], [ + 0, '0', - 0, ], [ 0, 0, ], [ + 0, '-i', - 0, ], [ + 0, '-2.5i', - 0, ], [ + -1, '-1+2.5i', - -1, ], [ + -1, '-1+i', - -1, ], [ + -1, '-1', - -1, ], [ + -1, '-1-i', - -1, ], [ + -1, '-1-2.5i', - -1, ], [ + -3.5, '-3.5+2.5i', - -3.5, ], [ + -3.5, '-3.5+i', - -3.5, ], [ + -3.5, '-3.5', - -3.5, ], [ + -3.5, '-3.5-i', - -3.5, ], [ - '-3.5-2.5i', -3.5, + '-3.5-2.5i', ], ]; diff --git a/tests/data/Calculation/Engineering/IMSIN.php b/tests/data/Calculation/Engineering/IMSIN.php index 8b99c13d..0c02c19d 100644 --- a/tests/data/Calculation/Engineering/IMSIN.php +++ b/tests/data/Calculation/Engineering/IMSIN.php @@ -2,111 +2,111 @@ return [ [ - '12.34+5.67j', '-32.5483841590412+141.315819535092j', + '12.34+5.67j', ], [ - '3.5+2.5i', '-2.15110429680353-5.66575444574645i', + '3.5+2.5i', ], [ - '3.5+i', '-0.541286805665839-1.10052501669986i', + '3.5+i', ], [ - '3.5', '-0.35078322768962', + '3.5', ], [ - '3.5-i', '-0.541286805665839+1.10052501669986i', + '3.5-i', ], [ - '3.5-2.5i', '-2.15110429680353+5.66575444574645i', + '3.5-2.5i', ], [ - '1+2.5i', '5.16014366757971+3.26893943207955i', + '1+2.5i', ], [ - '1+i', '1.29845758141598+0.634963914784736i', + '1+i', ], [ - '1', '0.841470984807897', + '1', ], [ - '1-i', '1.29845758141598-0.634963914784736i', + '1-i', ], [ - '1-2.5i', '5.16014366757971-3.26893943207955i', + '1-2.5i', ], [ - '2.5i', '6.05020448103979i', + '2.5i', ], [ - 'i', '1.1752011936438i', + 'i', ], [ '0', '0', ], [ - '-i', '-1.1752011936438i', + '-i', ], [ - '-2.5i', '-6.05020448103979i', + '-2.5i', ], [ - '-1+2.5i', '-5.16014366757971+3.26893943207955i', + '-1+2.5i', ], [ - '-1+i', '-1.29845758141598+0.634963914784736i', + '-1+i', ], [ - '-1', '-0.841470984807897', + '-1', ], [ - '-1-i', '-1.29845758141598-0.634963914784736i', + '-1-i', ], [ - '-1-2.5i', '-5.16014366757971-3.26893943207955i', + '-1-2.5i', ], [ - '-3.5+2.5i', '2.15110429680353-5.66575444574645i', + '-3.5+2.5i', ], [ - '-3.5+i', '0.541286805665839-1.10052501669986i', + '-3.5+i', ], [ - '-3.5', '0.35078322768962', + '-3.5', ], [ - '-3.5-i', '0.541286805665839+1.10052501669986i', + '-3.5-i', ], [ - '-3.5-2.5i', '2.15110429680353+5.66575444574645i', + '-3.5-2.5i', ], [ - '3', '0.141120008059867', + '3', ], ]; diff --git a/tests/data/Calculation/Engineering/IMSQRT.php b/tests/data/Calculation/Engineering/IMSQRT.php index d1ea73f9..b372d9f8 100644 --- a/tests/data/Calculation/Engineering/IMSQRT.php +++ b/tests/data/Calculation/Engineering/IMSQRT.php @@ -2,115 +2,115 @@ return [ [ - '12.34+5.67j', '3.60002071031685+0.787495469644252j', + '12.34+5.67j', ], [ - '-1.234E-5+6.78E9i', '58223.7065120385+58223.7065120386i', + '-1.234E-5+6.78E9i', ], [ - '3.5+2.5i', '1.9749889409211+0.632914936433528i', + '3.5+2.5i', ], [ - '3.5+i', '1.88945163270197+0.264627043818521i', + '3.5+i', ], [ - '3.5', '1.87082869338697', + '3.5', ], [ - '3.5-i', '1.88945163270197-0.264627043818521i', + '3.5-i', ], [ - '3.5-2.5i', '1.9749889409211-0.632914936433528i', + '3.5-2.5i', ], [ - '1+2.5i', '1.35878298553655+0.919940868634298i', + '1+2.5i', ], [ - '1+i', '1.09868411346781+0.455089860562227i', + '1+i', ], [ '1', '1', ], [ - '1-i', '1.09868411346781-0.455089860562227i', + '1-i', ], [ - '1-2.5i', '1.35878298553655-0.919940868634298i', + '1-2.5i', ], [ - '2.5i', '1.11803398874989+1.11803398874989i', + '2.5i', ], [ - 'i', '0.707106781186548+0.707106781186547i', + 'i', ], [ '0', '0', ], [ - '-i', '0.707106781186548-0.707106781186547i', + '-i', ], [ - '-2.5i', '1.11803398874989-1.11803398874989i', + '-2.5i', ], [ - '-1+2.5i', '0.919940868634298+1.35878298553655i', + '-1+2.5i', ], [ - '-1+i', '0.455089860562227+1.09868411346781i', + '-1+i', ], [ - '-1', '6.12303176911189E-017+i', + '-1', ], [ - '-1-i', '0.455089860562227-1.09868411346781i', + '-1-i', ], [ - '-1-2.5i', '0.919940868634298-1.35878298553655i', + '-1-2.5i', ], [ - '-3.5+2.5i', '0.632914936433528+1.9749889409211i', + '-3.5+2.5i', ], [ - '-3.5+i', '0.264627043818521+1.88945163270197i', + '-3.5+i', ], [ - '-3.5', '1.14551435241745E-016+1.87082869338697i', + '-3.5', ], [ - '-3.5-i', '0.264627043818521-1.88945163270197i', + '-3.5-i', ], [ - '-3.5-2.5i', '0.632914936433528-1.9749889409211i', + '-3.5-2.5i', ], [ - '9', '3', + '9', ], ]; diff --git a/tests/data/Calculation/Engineering/IMSUB.php b/tests/data/Calculation/Engineering/IMSUB.php index e6176494..c5cd7d92 100644 --- a/tests/data/Calculation/Engineering/IMSUB.php +++ b/tests/data/Calculation/Engineering/IMSUB.php @@ -2,54 +2,54 @@ return [ [ + '#NUM!', '12.34+5.67j', '123.45+67.89i', - '#NUM!', ], [ - '123.45+67.89j', - '12.34+5.67j', '111.11+62.22j', + '123.45+67.89j', + '12.34+5.67j', ], [ + '-111.11-62.22j', '12.34+5.67j', '123.45+67.89j', - '-111.11-62.22j', ], [ + '-111.11-62.22i', '12.34+5.67i', '123.45+67.89i', '123.45+67.89i', - '-111.11-62.22i', ], [ + '-135.79+62.22i', '-12.34-5.67i', '123.45-67.89i', - '-135.79+62.22i', ], [ + '135.79+62.22i', '12.34-5.67i', '-123.45-67.89i', - '135.79+62.22i', ], [ + '111.11+62.22i', '-12.34-5.67i', '-123.45-67.89i', - '111.11+62.22i', ], [ + '#NUM!', '-12.34-5.67i', '-123.45-67.89', - '#NUM!', ], [ + '#NUM!', '-12.34-5.67j', '-123.45-67.89', - '#NUM!', ], [ + '#NUM!', '-12.34-5.67', '-123.45-67.89j', - '#NUM!', ], ]; diff --git a/tests/data/Calculation/Engineering/IMSUM.php b/tests/data/Calculation/Engineering/IMSUM.php index 9539a159..ac6152aa 100644 --- a/tests/data/Calculation/Engineering/IMSUM.php +++ b/tests/data/Calculation/Engineering/IMSUM.php @@ -2,55 +2,55 @@ return [ [ + '#NUM!', '12.34+5.67j', '123.45+67.89i', - '#NUM!', ], [ - '12.34+5.67j', - '123.45+67.89j', '135.79+73.56j', + '12.34+5.67j', + '123.45+67.89j', ], [ - '12.34-5.67i', - '123.45+67.89i', '135.79+62.22i', + '12.34-5.67i', + '123.45+67.89i', ], [ + '135.79-62.22i', '12.34+5.67i', '123.45-67.89i', - '135.79-62.22i', ], [ + '135.79-73.56i', '12.34-5.67i', '123.45-67.89i', - '135.79-73.56i', ], [ + '259.24+141.45i', '12.34+5.67i', '123.45+67.89i', '123.45+67.89i', - '259.24+141.45i', ], [ + '#NUM!', '12.34+5.67i', '123.45+67.89i', '123.45+67.89j', - '#NUM!', ], [ + '111.11-73.56i', '-12.34-5.67i', '123.45-67.89i', - '111.11-73.56i', ], [ + '-111.11-73.56i', '12.34-5.67i', '-123.45-67.89i', - '-111.11-73.56i', ], [ + '-135.79-73.56i', '-12.34-5.67i', '-123.45-67.89i', - '-135.79-73.56i', ], ]; diff --git a/tests/data/Calculation/Engineering/OCT2BIN.php b/tests/data/Calculation/Engineering/OCT2BIN.php index ec52224c..c4796110 100644 --- a/tests/data/Calculation/Engineering/OCT2BIN.php +++ b/tests/data/Calculation/Engineering/OCT2BIN.php @@ -2,60 +2,60 @@ return [ [ - '1357', '#NUM!', + '1357', ], [ - '246', '10100110', + '246', ], [ + '011', '3', 3, - '011', ], [ + '#NUM!', '12345', - '#NUM!', ], [ + '#NUM!', '123.45', - '#NUM!', ], [ '0', '0', ], [ - true, '#VALUE!', + true, ], [ - '3579', '#NUM!', + '3579', ], // 2's Complement [ - '7777777000', '1000000000', + '7777777000', ], // 2's Complement [ - '7777777777', '1111111111', + '7777777777', ], // Too small [ - '17777777777', '#NUM!', + '17777777777', ], [ - '777', '111111111', + '777', ], // Too large [ - '1777', '#NUM!', + '1777', ], ]; diff --git a/tests/data/Calculation/Engineering/OCT2DEC.php b/tests/data/Calculation/Engineering/OCT2DEC.php index 4d03b252..1d2ab60f 100644 --- a/tests/data/Calculation/Engineering/OCT2DEC.php +++ b/tests/data/Calculation/Engineering/OCT2DEC.php @@ -2,40 +2,40 @@ return [ [ - '1357', '751', + '1357', ], [ - '246', '166', + '246', ], [ - '12345', '5349', + '12345', ], [ + '#NUM!', '123.45', - '#NUM!', ], [ '0', '0', ], [ - true, '#VALUE!', + true, ], [ - '3579', '#NUM!', + '3579', ], [ - '54', '44', + '54', ], // 2's Complement [ - '7777777533', '-165', + '7777777533', ], ]; diff --git a/tests/data/Calculation/Engineering/OCT2HEX.php b/tests/data/Calculation/Engineering/OCT2HEX.php index 32681275..d688704f 100644 --- a/tests/data/Calculation/Engineering/OCT2HEX.php +++ b/tests/data/Calculation/Engineering/OCT2HEX.php @@ -2,41 +2,41 @@ return [ [ - '1357', '2EF', + '1357', ], [ - '246', 'A6', + '246', ], [ - '12345', '14E5', + '12345', ], [ + '0040', '100', 4, - '0040', ], [ + '#NUM!', '123.45', - '#NUM!', ], [ '0', '0', ], [ - true, '#VALUE!', + true, ], [ - '3579', '#NUM!', + '3579', ], // 2's Complement [ - '7777777533', 'FFFFFFFF5B', + '7777777533', ], ]; diff --git a/tests/data/Calculation/Financial/ACCRINT.php b/tests/data/Calculation/Financial/ACCRINT.php index 293f0dae..58f6b636 100644 --- a/tests/data/Calculation/Financial/ACCRINT.php +++ b/tests/data/Calculation/Financial/ACCRINT.php @@ -4,6 +4,7 @@ return [ [ + 16.666666666666998, '2008-03-01', '2008-08-31', '2008-05-01', @@ -11,9 +12,9 @@ return [ 1000, 2, 0, - 16.666666666666998, ], [ + 15.555555555555999, '2008-03-05', '2008-08-31', '2008-05-01', @@ -21,18 +22,18 @@ return [ 1000, 2, 0, - 15.555555555555999, ], [ + 200, '2010-01-01', '2010-06-30', '2010-04-01', 0.080000000000000002, 10000, 4, - 200, ], [ + '#NUM!', '2008-03-05', '2008-08-31', '2008-05-01', @@ -40,9 +41,9 @@ return [ 1000, 2, 0, - '#NUM!', ], [ + '#VALUE!', 'Invalid Date', '2008-08-31', '2008-05-01', @@ -50,9 +51,9 @@ return [ 1000, 2, 0, - '#VALUE!', ], [ + '#VALUE!', '2008-03-01', '2008-08-31', '2008-05-01', @@ -60,9 +61,9 @@ return [ 1000, 2, 0, - '#VALUE!', ], [ + '#VALUE!', '2008-03-01', '2008-08-31', '2008-05-01', @@ -70,6 +71,5 @@ return [ 1000, 2, 'ABC', - '#VALUE!', ], ]; diff --git a/tests/data/Calculation/Financial/ACCRINTM.php b/tests/data/Calculation/Financial/ACCRINTM.php index 846d95f0..7949b1ad 100644 --- a/tests/data/Calculation/Financial/ACCRINTM.php +++ b/tests/data/Calculation/Financial/ACCRINTM.php @@ -4,42 +4,42 @@ return [ [ + 20.547945205478999, '2008-04-01', '2008-06-15', 0.10000000000000001, 1000, 3, - 20.547945205478999, ], [ + 800, '2010-01-01', '2010-12-31', 0.080000000000000002, 10000, - 800, ], [ + '#NUM!', '2008-03-05', '2008-08-31', -0.10000000000000001, 1000, 2, - '#NUM!', ], [ + '#VALUE!', 'Invalid Date', '2008-08-31', 0.10000000000000001, 1000, 2, - '#VALUE!', ], [ + '#VALUE!', '2008-03-01', '2008-08-31', 'ABC', 1000, 2, - '#VALUE!', ], ]; diff --git a/tests/data/Calculation/Financial/AMORDEGRC.php b/tests/data/Calculation/Financial/AMORDEGRC.php index 034b6abc..1e959141 100644 --- a/tests/data/Calculation/Financial/AMORDEGRC.php +++ b/tests/data/Calculation/Financial/AMORDEGRC.php @@ -4,6 +4,7 @@ return [ [ + 776, 2400, '2008-08-19', '2008-12-31', @@ -11,9 +12,9 @@ return [ 1, 0.14999999999999999, 1, - 776, ], [ + 42, 150, '2011-01-01', '2011-09-30', @@ -21,6 +22,5 @@ return [ 1, 0.20000000000000001, 4, - 42, ], ]; diff --git a/tests/data/Calculation/Financial/AMORLINC.php b/tests/data/Calculation/Financial/AMORLINC.php index 53851f19..92adbe13 100644 --- a/tests/data/Calculation/Financial/AMORLINC.php +++ b/tests/data/Calculation/Financial/AMORLINC.php @@ -4,6 +4,7 @@ return [ [ + 360, 2400, '2008-08-19', '2008-12-31', @@ -11,9 +12,9 @@ return [ 1, 0.14999999999999999, 1, - 360, ], [ + 30, 150, '2011-01-01', '2011-09-30', @@ -21,6 +22,5 @@ return [ 1, 0.20000000000000001, 4, - 30, ], ]; diff --git a/tests/data/Calculation/Financial/COUPDAYBS.php b/tests/data/Calculation/Financial/COUPDAYBS.php index bc02a717..ea93d427 100644 --- a/tests/data/Calculation/Financial/COUPDAYBS.php +++ b/tests/data/Calculation/Financial/COUPDAYBS.php @@ -4,37 +4,37 @@ return [ [ + 71, '25-Jan-2007', '15-Nov-2008', 2, 1, - 71, ], [ + 66, '2011-01-01', '2012-10-25', 4, - 66, ], [ + '#VALUE!', 'Invalid Date', '15-Nov-2008', 2, 1, - '#VALUE!', ], [ + '#VALUE!', '25-Jan-2007', 'Invalid Date', 2, 1, - '#VALUE!', ], [ + '#NUM!', '25-Jan-2007', '15-Nov-2008', 3, 1, - '#NUM!', ], ]; diff --git a/tests/data/Calculation/Financial/COUPDAYS.php b/tests/data/Calculation/Financial/COUPDAYS.php index b2c6f1d8..9f6b3b7d 100644 --- a/tests/data/Calculation/Financial/COUPDAYS.php +++ b/tests/data/Calculation/Financial/COUPDAYS.php @@ -4,37 +4,37 @@ return [ [ + 181, '25-Jan-2007', '15-Nov-2008', 2, 1, - 181, ], [ + 90, '2011-01-01', '2012-10-25', 4, - 90, ], [ + '#VALUE!', 'Invalid Date', '15-Nov-2008', 2, 1, - '#VALUE!', ], [ + '#VALUE!', '25-Jan-2007', 'Invalid Date', 2, 1, - '#VALUE!', ], [ + '#NUM!', '25-Jan-2007', '15-Nov-2008', 3, 1, - '#NUM!', ], ]; diff --git a/tests/data/Calculation/Financial/COUPDAYSNC.php b/tests/data/Calculation/Financial/COUPDAYSNC.php index 997c00b2..2b249cb8 100644 --- a/tests/data/Calculation/Financial/COUPDAYSNC.php +++ b/tests/data/Calculation/Financial/COUPDAYSNC.php @@ -4,37 +4,37 @@ return [ [ + 110, '25-Jan-2007', '15-Nov-2008', 2, 1, - 110, ], [ + 24, '2011-01-01', '2012-10-25', 4, - 24, ], [ + '#VALUE!', 'Invalid Date', '15-Nov-2008', 2, 1, - '#VALUE!', ], [ + '#VALUE!', '25-Jan-2007', 'Invalid Date', 2, 1, - '#VALUE!', ], [ + '#NUM!', '25-Jan-2007', '15-Nov-2008', 3, 1, - '#NUM!', ], ]; diff --git a/tests/data/Calculation/Financial/COUPNCD.php b/tests/data/Calculation/Financial/COUPNCD.php index c3720eb5..b0701d74 100644 --- a/tests/data/Calculation/Financial/COUPNCD.php +++ b/tests/data/Calculation/Financial/COUPNCD.php @@ -4,37 +4,37 @@ return [ [ + 39217, '25-Jan-2007', '15-Nov-2008', 2, 1, - 39217, ], [ + 40568, '2011-01-01', '2012-10-25', 4, - 40568, ], [ + '#VALUE!', 'Invalid Date', '15-Nov-2008', 2, 1, - '#VALUE!', ], [ + '#VALUE!', '25-Jan-2007', 'Invalid Date', 2, 1, - '#VALUE!', ], [ + '#NUM!', '25-Jan-2007', '15-Nov-2008', 3, 1, - '#NUM!', ], ]; diff --git a/tests/data/Calculation/Financial/COUPNUM.php b/tests/data/Calculation/Financial/COUPNUM.php index 1270c598..a81b139e 100644 --- a/tests/data/Calculation/Financial/COUPNUM.php +++ b/tests/data/Calculation/Financial/COUPNUM.php @@ -4,45 +4,45 @@ return [ [ + 4, '25-Jan-2007', '15-Nov-2008', 2, 1, - 4, ], [ + 8, '2011-01-01', '2012-10-25', 4, 0, - 8, ], [ + '#VALUE!', 'Invalid Date', '15-Nov-2008', 2, 1, - '#VALUE!', ], [ + '#VALUE!', '25-Jan-2007', 'Invalid Date', 2, 1, - '#VALUE!', ], [ + '#NUM!', '25-Jan-2007', '15-Nov-2008', 3, 1, - '#NUM!', ], [ + 5, '01-Jan-2008', '31-Dec-2012', 1, 1, - 5, ], ]; diff --git a/tests/data/Calculation/Financial/COUPPCD.php b/tests/data/Calculation/Financial/COUPPCD.php index a90ee8d6..a6c14d97 100644 --- a/tests/data/Calculation/Financial/COUPPCD.php +++ b/tests/data/Calculation/Financial/COUPPCD.php @@ -4,37 +4,37 @@ return [ [ + 39036, '25-Jan-2007', '15-Nov-2008', 2, 1, - 39036, ], [ + 40476, '2011-01-01', '2012-10-25', 4, - 40476, ], [ + '#VALUE!', 'Invalid Date', '15-Nov-2008', 2, 1, - '#VALUE!', ], [ + '#VALUE!', '25-Jan-2007', 'Invalid Date', 2, 1, - '#VALUE!', ], [ + '#NUM!', '25-Jan-2007', '15-Nov-2008', 3, 1, - '#NUM!', ], ]; diff --git a/tests/data/Calculation/Financial/CUMIPMT.php b/tests/data/Calculation/Financial/CUMIPMT.php index 33bfbf2a..bc14d92a 100644 --- a/tests/data/Calculation/Financial/CUMIPMT.php +++ b/tests/data/Calculation/Financial/CUMIPMT.php @@ -4,84 +4,84 @@ return [ [ + -11135.232130750999, 0.0074999999999999997, 360, 125000, 13, 24, 0, - -11135.232130750999, ], [ + -937.5, 0.0074999999999999997, 360, 125000, 1, 1, 0, - -937.5, ], [ + -2294.9775375120998, 0.0041666666669999998, 60, 50000, 1, 12, 0, - -2294.9775375120998, ], [ + -1833.1000667254, 0.0041666666669999998, 60, 50000, 13, 24, 0, - -1833.1000667254, ], [ + -1347.5920679425001, 0.0041666666669999998, 60, 50000, 25, 36, 0, - -1347.5920679425001, ], [ + -837.24455850309005, 0.0041666666669999998, 60, 50000, 37, 48, 0, - -837.24455850309005, ], [ + -300.78670189938998, 0.0041666666669999998, 60, 50000, 49, 60, 0, - -300.78670189938998, ], [ + '#VALUE!', 0.0074999999999999997, 360, 125000, 24, 13, 0, - '#VALUE!', ], [ + '#NUM!', 0.0074999999999999997, 360, 125000, 24, 13, 2, - '#NUM!', ], ]; diff --git a/tests/data/Calculation/Financial/CUMPRINC.php b/tests/data/Calculation/Financial/CUMPRINC.php index c2bb9493..63392c52 100644 --- a/tests/data/Calculation/Financial/CUMPRINC.php +++ b/tests/data/Calculation/Financial/CUMPRINC.php @@ -4,84 +4,84 @@ return [ [ + -934.10712342088004, 0.0074999999999999997, 360, 125000, 13, 24, 0, - -934.10712342088004, ], [ + -68.278271180977001, 0.0074999999999999997, 360, 125000, 1, 1, 0, - -68.278271180977001, ], [ + -9027.7626490046005, 0.0041666666669999998, 60, 50000, 1, 12, 0, - -9027.7626490046005, ], [ + -9489.6401197913001, 0.0041666666669999998, 60, 50000, 13, 24, 0, - -9489.6401197913001, ], [ + -9975.1481185740995, 0.0041666666669999998, 60, 50000, 25, 36, 0, - -9975.1481185740995, ], [ + -10485.495628014, 0.0041666666669999998, 60, 50000, 37, 48, 0, - -10485.495628014, ], [ + -11021.953484617001, 0.0041666666669999998, 60, 50000, 49, 60, 0, - -11021.953484617001, ], [ + '#VALUE!', 0.0074999999999999997, 360, 125000, 24, 13, 0, - '#VALUE!', ], [ + '#NUM!', 0.0074999999999999997, 360, 125000, 24, 13, 2, - '#NUM!', ], ]; diff --git a/tests/data/Calculation/Financial/DB.php b/tests/data/Calculation/Financial/DB.php index d3480802..7f8fc6fa 100644 --- a/tests/data/Calculation/Financial/DB.php +++ b/tests/data/Calculation/Financial/DB.php @@ -4,131 +4,131 @@ return [ [ - 1000000, - 100000, - 6, - 1, - 7, 186083.33333333, + 1000000, + 100000, + 6, + 1, + 7, ], [ + 259639.41666667, 1000000, 100000, 6, 2, 7, - 259639.41666667, ], [ + 176814.44274999999, 1000000, 100000, 6, 3, 7, - 176814.44274999999, ], [ + 120410.63551275, 1000000, 100000, 6, 4, 7, - 120410.63551275, ], [ + 81999.642784183001, 1000000, 100000, 6, 5, 7, - 81999.642784183001, ], [ - 1000000, - 100000, - 6, - 6, - 7, 55841.756736028001, + 1000000, + 100000, + 6, + 6, + 7, ], [ + 15845.098473848, 1000000, 100000, 6, 7, 7, - 15845.098473848, ], [ + 1845.0, 10000, 1000, 5, 1, 6, - 1845.0, ], [ + 3009.1950000000002, 10000, 1000, 5, 2, 6, - 3009.1950000000002, ], [ + 1898.8020449999999, 10000, 1000, 5, 3, 6, - 1898.8020449999999, ], [ + 1198.1440903949999, 10000, 1000, 5, 4, 6, - 1198.1440903949999, ], [ - 10000, - 1000, - 5, - 5, - 6, 756.02892103925001, + 10000, + 1000, + 5, + 5, + 6, ], [ + 238.52712458788, 10000, 1000, 5, 6, 6, - 238.52712458788, ], [ + 0.0, 0, 0, 5, 6, 6, - 0.0, ], [ + '#NUM!', -1000, 100, 5, 6, 6, - '#NUM!', ], [ + '#VALUE!', 'ABC', 100, 5, 6, 6, - '#VALUE!', ], ]; diff --git a/tests/data/Calculation/Financial/DDB.php b/tests/data/Calculation/Financial/DDB.php index 124bd30a..879224ca 100644 --- a/tests/data/Calculation/Financial/DDB.php +++ b/tests/data/Calculation/Financial/DDB.php @@ -4,112 +4,112 @@ return [ [ + 0.13150684931507001, 2400, 300, 36500, 1, - 0.13150684931507001, ], [ + 0.13149964346031001, 2400, 300, 36500, 2, - 0.13149964346031001, ], [ + 0.13146362010870999, 2400, 300, 36500, 7, - 0.13146362010870999, ], [ + 0.91843145432707995, 2400, 300, 36500, 7, 14, - 0.91843145432707995, ], [ + 40.0, 2400, 300, 120, 1, 2, - 40.0, ], [ + 480.0, 2400, 300, 10, 1, 2, - 480.0, ], [ + 306.0, 2400, 300, 10, 2, 1.5, - 306.0, ], [ + 22.122547200000302, 2400, 300, 10, 10, - 22.122547200000302, ], [ + 4000.0, 10000, 1000, 5, 1, - 4000.0, ], [ + 2400.0, 10000, 1000, 5, 2, - 2400.0, ], [ + 1440.0, 10000, 1000, 5, 3, - 1440.0, ], [ + 864.0, 10000, 1000, 5, 4, - 864.0, ], [ + 296.0, 10000, 1000, 5, 5, - 296.0, ], [ + '#NUM!', -2400, 300, 36500, 1, - '#NUM!', ], [ + '#VALUE!', 'ABC', 300, 36500, 1, - '#VALUE!', ], ]; diff --git a/tests/data/Calculation/Financial/DISC.php b/tests/data/Calculation/Financial/DISC.php index 66241c73..d77b0a81 100644 --- a/tests/data/Calculation/Financial/DISC.php +++ b/tests/data/Calculation/Financial/DISC.php @@ -4,40 +4,40 @@ return [ [ + 0.052420213, '2007-01-25', '2007-06-15', 97.974999999999994, 100, 1, - 0.052420213, ], [ + 0.01, '2010-04-01', '2015-03-31', 95, 100, - 0.01, ], [ + '#NUM!', '2010-04-01', '2015-03-31', 0, 100, - '#NUM!', ], [ + '#VALUE!', '2010-04-01', '2015-03-31', 'ABC', 100, - '#VALUE!', ], [ + '#VALUE!', 'Invalid Date', '2007-06-15', 97.974999999999994, 100, 1, - '#VALUE!', ], ]; diff --git a/tests/data/Calculation/Financial/DOLLARDE.php b/tests/data/Calculation/Financial/DOLLARDE.php index 70788f10..eed6c8af 100644 --- a/tests/data/Calculation/Financial/DOLLARDE.php +++ b/tests/data/Calculation/Financial/DOLLARDE.php @@ -4,48 +4,48 @@ return [ [ + 1.125, 1.02, 16, - 1.125, ], [ + 1.3125, 1.1000000000000001, 32, - 1.3125, ], [ + 1.0625, 1.01, 16, - 1.0625, ], [ + 1.625, 1.1000000000000001, 16, - 1.625, ], [ + 1.09375, 1.03, 32, - 1.09375, ], [ + 1.9375, 1.3, 32, - 1.9375, ], [ + 1.375, 1.1200000000000001, 32, - 1.375, ], [ + '#DIV/0!', 1.2344999999999999, 0, - '#DIV/0!', ], [ + '#NUM!', 1.2344999999999999, -2, - '#NUM!', ], ]; diff --git a/tests/data/Calculation/Financial/DOLLARFR.php b/tests/data/Calculation/Financial/DOLLARFR.php index c0a89255..3d0fb61f 100644 --- a/tests/data/Calculation/Financial/DOLLARFR.php +++ b/tests/data/Calculation/Financial/DOLLARFR.php @@ -4,48 +4,48 @@ return [ [ + 1.02, 1.125, 16, - 1.02, ], [ + 1.04, 1.125, 32, - 1.04, ], [ + 1.01, 1.0625, 16, - 1.01, ], [ + 1.1000000000000001, 1.625, 16, - 1.1000000000000001, ], [ + 1.03, 1.09375, 32, - 1.03, ], [ + 1.3, 1.9375, 32, - 1.3, ], [ + 1.1200000000000001, 1.375, 32, - 1.1200000000000001, ], [ + '#DIV/0!', 1.2344999999999999, 0, - '#DIV/0!', ], [ + '#NUM!', 1.2344999999999999, -2, - '#NUM!', ], ]; diff --git a/tests/data/Calculation/Financial/EFFECT.php b/tests/data/Calculation/Financial/EFFECT.php index f7fe4a8d..7a94626b 100644 --- a/tests/data/Calculation/Financial/EFFECT.php +++ b/tests/data/Calculation/Financial/EFFECT.php @@ -4,28 +4,28 @@ return [ [ + 0.053542667370758003, 0.052499999999999998, 4, - 0.053542667370758003, ], [ + 0.103812890625, 0.10000000000000001, 4, - 0.103812890625, ], [ + 0.10249999999999999, 0.10000000000000001, 2, - 0.10249999999999999, ], [ + 0.025156250000000002, 0.025000000000000001, 2, - 0.025156250000000002, ], [ + '#NUM!', 1, 0, - '#NUM!', ], ]; diff --git a/tests/data/Calculation/Financial/FV.php b/tests/data/Calculation/Financial/FV.php index f651bd35..3c811b2b 100644 --- a/tests/data/Calculation/Financial/FV.php +++ b/tests/data/Calculation/Financial/FV.php @@ -4,62 +4,62 @@ return [ [ + 2581.4033740600998, 0.0050000000000000001, 10, -200, -500, 1, - 2581.4033740600998, ], [ + 12682.503013197, 0.01, 12, -1000, - 12682.503013197, ], [ + 82846.246372417998, 0.0091666666670000008, 35, -2000, null, 1, - 82846.246372417998, ], [ + 2301.4018303408998, 0.0050000000000000001, 12, -100, -1000, 1, - 2301.4018303408998, ], [ + 68006.082841536001, 0.0041666666669999998, 60, -1000, - 68006.082841536001, ], [ + 39729.460894165997, 0.025000000000000001, 16, -2000, 0, 1, - 39729.460894165997, ], [ + '#NUM!', 0.10000000000000001, 12, -100, 0, 2, - '#NUM!', ], [ + 1300, 0.0, 12, -100, -100, - 1300, ], ]; diff --git a/tests/data/Calculation/Financial/FVSCHEDULE.php b/tests/data/Calculation/Financial/FVSCHEDULE.php index eb5cdfef..b332912c 100644 --- a/tests/data/Calculation/Financial/FVSCHEDULE.php +++ b/tests/data/Calculation/Financial/FVSCHEDULE.php @@ -4,6 +4,7 @@ return [ [ + 1.3308899999999999, 1, [ [ @@ -12,18 +13,18 @@ return [ 0.10000000000000001, ], ], - 1.3308899999999999, ], [ + 13.3089, 10, [ 0.089999999999999997, 0.11, 0.10000000000000001, ], - 13.3089, ], [ + 12223.614571874999, 10000, [ [ @@ -34,6 +35,5 @@ return [ 0.035000000000000003, ], ], - 12223.614571874999, ], ]; diff --git a/tests/data/Calculation/Financial/INTRATE.php b/tests/data/Calculation/Financial/INTRATE.php index 1c32558f..9a62bafd 100644 --- a/tests/data/Calculation/Financial/INTRATE.php +++ b/tests/data/Calculation/Financial/INTRATE.php @@ -4,42 +4,42 @@ return [ [ + 0.057680000000000002, '2008-02-15', '2008-05-15', 1000000, 1014420, 2, - 0.057680000000000002, ], [ + 0.22500000000000001, '2005-04-01', '2010-03-31', 1000, 2125, - 0.22500000000000001, ], [ + '#VALUE!', '2008-02-15', '2008-05-15', 1000000, 1014420, 'ABC', - '#VALUE!', ], [ + '#NUM!', '2008-02-15', '2008-05-15', 1000000, -1014420, 2, - '#NUM!', ], [ + '#VALUE!', 'Invalid Date', '2008-05-15', 1000000, 1014420, 2, - '#VALUE!', ], ]; diff --git a/tests/data/Calculation/Financial/IPMT.php b/tests/data/Calculation/Financial/IPMT.php index f6312a06..aaea844b 100644 --- a/tests/data/Calculation/Financial/IPMT.php +++ b/tests/data/Calculation/Financial/IPMT.php @@ -4,67 +4,67 @@ return [ [ + -22.406893015021002, 0.0083333333329999992, 3, 3, 8000, - -22.406893015021002, ], [ + -292.44712990937001, 0.10000000000000001, 3, 3, 8000, - -292.44712990937001, ], [ - 0.0041666666669999998, - 1, - 60, - 50000, -208.33333335, + 0.0041666666669999998, + 1, + 60, + 50000, ], [ + -205.26988189617001, 0.0041666666669999998, 2, 60, 50000, - -205.26988189617001, ], [ + 0.0, 0.0087500000000000008, 1, 8, 10000, 5000, 1, - 0.0, ], [ + -70.968650395558996, 0.0087500000000000008, 2, 8, 10000, 5000, 1, - -70.968650395558996, ], [ + '#NUM!', 0.0050000000000000001, 2, 8, 2500, 200, 6, - '#NUM!', ], [ + '#VALUE!', 0.0050000000000000001, 8, 2, 2500, 200, 1, - '#VALUE!', ], ]; diff --git a/tests/data/Calculation/Financial/IRR.php b/tests/data/Calculation/Financial/IRR.php index d8c71522..142ab204 100644 --- a/tests/data/Calculation/Financial/IRR.php +++ b/tests/data/Calculation/Financial/IRR.php @@ -4,6 +4,7 @@ return [ [ + -0.02124484827341, [ -70000, 12000, @@ -11,9 +12,9 @@ return [ 18000, 21000, ], - -0.02124484827341, ], [ + 0.086630948036519995, [ -70000, 12000, @@ -22,9 +23,9 @@ return [ 21000, 26000, ], - 0.086630948036519995, ], [ + -0.1821374641455, [ -70000, 12000, @@ -32,9 +33,9 @@ return [ 18000, ], 0.10000000000000001, - -0.1821374641455, ], [ + -0.13618951095869, [ -100, [ @@ -43,9 +44,9 @@ return [ 28.800000000000001, ], ], - -0.13618951095869, ], [ + 0.13057575637152699, [ -100, [ @@ -56,6 +57,5 @@ return [ 41.469999999999999, ], ], - 0.13057575637152699, ], ]; diff --git a/tests/data/Calculation/Financial/ISPMT.php b/tests/data/Calculation/Financial/ISPMT.php index a4a8cf4a..3f2328bc 100644 --- a/tests/data/Calculation/Financial/ISPMT.php +++ b/tests/data/Calculation/Financial/ISPMT.php @@ -4,31 +4,31 @@ return [ [ + -64814.814812222001, 0.0083333333329999992, 1, 36, 8000000, - -64814.814812222001, ], [ + -533333.33333333, 0.10000000000000001, 1, 3, 8000000, - -533333.33333333, ], [ + -204.86111112750001, 0.0041666666669999998, 1, 60, 50000, - -204.86111112750001, ], [ + -201.38888890499999, 0.0041666666669999998, 2, 60, 50000, - -201.38888890499999, ], ]; diff --git a/tests/data/Calculation/Financial/MIRR.php b/tests/data/Calculation/Financial/MIRR.php index d2a4d279..b32edcbe 100644 --- a/tests/data/Calculation/Financial/MIRR.php +++ b/tests/data/Calculation/Financial/MIRR.php @@ -4,6 +4,7 @@ return [ [ + 0.12609413036591, [ -120000, [ @@ -16,9 +17,9 @@ return [ ], 0.10000000000000001, 0.12, - 0.12609413036591, ], [ + -0.048044655249981, [ -120000, [ @@ -29,9 +30,9 @@ return [ ], 0.10000000000000001, 0.12, - -0.048044655249981, ], [ + 0.13475911082830999, [ -120000, [ @@ -44,9 +45,9 @@ return [ ], 0.10000000000000001, 0.14000000000000001, - 0.13475911082830999, ], [ + 0.74021752686287001, [ -100, [ @@ -57,9 +58,9 @@ return [ ], 5.5, 5, - 0.74021752686287001, ], [ + 1.8579321744785, [ -100, [ @@ -72,6 +73,5 @@ return [ ], 5.5, 5, - 1.8579321744785, ], ]; diff --git a/tests/data/Calculation/Financial/NOMINAL.php b/tests/data/Calculation/Financial/NOMINAL.php index 35b8c30c..5f0ce8a6 100644 --- a/tests/data/Calculation/Financial/NOMINAL.php +++ b/tests/data/Calculation/Financial/NOMINAL.php @@ -4,28 +4,28 @@ return [ [ + 0.052500319868356002, 0.053543, 4, - 0.052500319868356002, ], [ + 0.096454756337780001, 0.10000000000000001, 4, - 0.096454756337780001, ], [ + 0.097617696340302998, 0.10000000000000001, 2, - 0.097617696340302998, ], [ + 0.024718035238113001, 0.025000000000000001, 12, - 0.024718035238113001, ], [ + '#NUM!', -0.025000000000000001, 12, - '#NUM!', ], ]; diff --git a/tests/data/Calculation/Financial/NPER.php b/tests/data/Calculation/Financial/NPER.php index c2b818b4..7b3d24c7 100644 --- a/tests/data/Calculation/Financial/NPER.php +++ b/tests/data/Calculation/Financial/NPER.php @@ -4,70 +4,70 @@ return [ [ + 59.673865674295001, 0.01, -100, -1000, 10000, 1, - 59.673865674295001, ], [ + 60.082122853762002, 0.01, -100, -1000, 10000, - 60.082122853762002, ], [ + -9.5785940398132006, 0.01, -100, -1000, - -9.5785940398132006, ], [ + 54.787577259999999, 0.0033333333329999999, -1000, 50000, - 54.787577259999999, ], [ + 11.90373729, 0.014999999999999999, -1200, 9000, 5000, 1, - 11.90373729, ], [ + '#NUM!', 0.014999999999999999, -1200, 9000, 5000, 2, - '#NUM!', ], [ + '#NUM!', 0.014999999999999999, 0.0, 0.0, 5000, 1, - '#NUM!', ], [ + '#NUM!', 0.0, 0.0, -500, 5000, 1, - '#NUM!', ], [ + -2.0, 0.0, -50, -250, 150, 1, - -2.0, ], ]; diff --git a/tests/data/Calculation/Financial/NPV.php b/tests/data/Calculation/Financial/NPV.php index 0602be9b..27db7f4d 100644 --- a/tests/data/Calculation/Financial/NPV.php +++ b/tests/data/Calculation/Financial/NPV.php @@ -4,23 +4,24 @@ return [ [ + 1188.4434123352, 0.10000000000000001, -10000, 3000, 4200, 6800, - 1188.4434123352, ], [ + 41922.061554931999, 0.080000000000000002, 8000, 9200, 10000, 12000, 14500, - 41922.061554931999, ], [ + 36250.534912984003, 0.080000000000000002, 8000, 9200, @@ -28,15 +29,14 @@ return [ 12000, 14500, -9000, - 36250.534912984003, ], [ + 12678.677633095, 0.050000000000000003, 2000, 2400, 2900, 3500, 4100, - 12678.677633095, ], ]; diff --git a/tests/data/Calculation/Financial/PRICE.php b/tests/data/Calculation/Financial/PRICE.php index 57d80248..f64f29e0 100644 --- a/tests/data/Calculation/Financial/PRICE.php +++ b/tests/data/Calculation/Financial/PRICE.php @@ -4,6 +4,7 @@ return [ [ + 94.6343616213221, '15-Feb-2008', '15-Nov-2017', 0.057500000000000002, @@ -11,9 +12,9 @@ return [ 100, 2, 0, - 94.6343616213221, ], [ + 94.635449207877201, '15-Feb-2008', '15-Nov-2017', 0.057500000000000002, @@ -21,9 +22,9 @@ return [ 100, 2, 1, - 94.635449207877201, ], [ + 94.636564030025099, '15-Feb-2008', '15-Nov-2017', 0.057500000000000002, @@ -31,9 +32,9 @@ return [ 100, 2, 2, - 94.636564030025099, ], [ + 94.635174796784497, '15-Feb-2008', '15-Nov-2017', 0.057500000000000002, @@ -41,9 +42,9 @@ return [ 100, 2, 3, - 94.635174796784497, ], [ + 110.83448359321601, '01-Apr-2012', '31-Mar-2020', 0.12, @@ -51,9 +52,9 @@ return [ 100, 2, null, - 110.83448359321601, ], [ + 110.834537395859, '01-Apr-2012', '31-Mar-2020', 0.12, @@ -61,9 +62,9 @@ return [ 100, 2, 1, - 110.834537395859, ], [ + 110.83448359321601, '01-Apr-2012', '31-Mar-2020', 0.12, @@ -71,9 +72,9 @@ return [ 100, 2, 2, - 110.83448359321601, ], [ + 110.83452855143901, '01-Apr-2012', '31-Mar-2020', 0.12, @@ -81,9 +82,9 @@ return [ 100, 2, 3, - 110.83452855143901, ], [ + 110.921732963198, '01-Apr-2012', '31-Mar-2020', 0.12, @@ -91,6 +92,5 @@ return [ 100, 4, 3, - 110.921732963198, ], ]; diff --git a/tests/data/Calculation/Financial/RATE.php b/tests/data/Calculation/Financial/RATE.php index 92088251..20f5397a 100644 --- a/tests/data/Calculation/Financial/RATE.php +++ b/tests/data/Calculation/Financial/RATE.php @@ -4,69 +4,69 @@ return [ [ + 0.0077014724882014003, 48, -200, 8000, - 0.0077014724882014003, ], [ + 0.046781916422493401, 60, -6000, 120000, - 0.046781916422493401, ], [ + -0.020442952219356499, 60, -1000, 120000, - -0.020442952219356499, ], [ + 0.015130843902343399, 24, -250, 5000, - 0.015130843902343399, ], [ + 0.016550119066711999, 24, -250, 5000, null, 1, - 0.016550119066711999, ], [ + 0.087499997684093694, 208, -700, 8000, - 0.087499997684093694, ], [ + 0.087113755605863596, 10, -1000, 6500, - 0.087113755605863596, ], [ + 0.048472127283572801, 6, -1000, 100000, -126068, - 0.048472127283572801, ], [ + 0.030272873827543501, 6, 1000, 100000, -126068, - 0.030272873827543501, ], [ + 0.030272873827543699, 6, -1000, -100000, 126068, 0, - 0.030272873827543699, ], ]; diff --git a/tests/data/Calculation/Functions/ERROR_TYPE.php b/tests/data/Calculation/Functions/ERROR_TYPE.php index ee4fd863..b9acafdc 100644 --- a/tests/data/Calculation/Functions/ERROR_TYPE.php +++ b/tests/data/Calculation/Functions/ERROR_TYPE.php @@ -5,55 +5,55 @@ return [ '#N/A', ], [ + '#N/A', null, - '#N/A', ], [ + '#N/A', -1, - '#N/A', ], [ + '#N/A', 1.25, - '#N/A', ], [ + '#N/A', '', - '#N/A', ], [ + '#N/A', '2.5', - '#N/A', ], [ + '#N/A', true, - '#N/A', ], [ - '#NULL!', 1, + '#NULL!', ], [ - '#DIV/0!', 2, + '#DIV/0!', ], [ - '#VALUE!', 3, + '#VALUE!', ], [ - '#REF!', 4, + '#REF!', ], [ - '#NAME?', 5, + '#NAME?', ], [ - '#NUM!', 6, + '#NUM!', ], [ - '#N/A', 7, + '#N/A', ], ]; diff --git a/tests/data/Calculation/Functions/IS_BLANK.php b/tests/data/Calculation/Functions/IS_BLANK.php index f2be545f..83f25163 100644 --- a/tests/data/Calculation/Functions/IS_BLANK.php +++ b/tests/data/Calculation/Functions/IS_BLANK.php @@ -5,60 +5,60 @@ return [ true, ], [ + true, null, - true, ], [ + false, -1, - false, ], [ + false, 0, - false, ], [ + false, 9, - false, ], [ + false, 1.5, - false, ], [ + false, '', - false, ], [ + false, '-1', - false, ], [ + false, '2', - false, ], [ + false, '-1.5', - false, ], [ + false, 'ABC', - false, ], [ + false, '#VALUE!', - false, ], [ + false, '#N/A', - false, ], [ + false, 'TRUE', - false, ], [ - true, false, + true, ], [ false, diff --git a/tests/data/Calculation/Functions/IS_ERR.php b/tests/data/Calculation/Functions/IS_ERR.php index 223d3add..1678843b 100644 --- a/tests/data/Calculation/Functions/IS_ERR.php +++ b/tests/data/Calculation/Functions/IS_ERR.php @@ -5,60 +5,60 @@ return [ false, ], [ + false, null, - false, ], [ + false, -1, - false, ], [ + false, 0, - false, ], [ + false, 9, - false, ], [ + false, 1.5, - false, ], [ + false, '', - false, ], [ + false, '-1', - false, ], [ + false, '2', - false, ], [ + false, '-1.5', - false, ], [ + false, 'ABC', - false, ], [ + true, '#VALUE!', - true, ], [ + false, '#N/A', - false, ], [ + false, 'TRUE', - false, ], [ - true, false, + true, ], [ false, diff --git a/tests/data/Calculation/Functions/IS_ERROR.php b/tests/data/Calculation/Functions/IS_ERROR.php index a2d64b2a..db35752c 100644 --- a/tests/data/Calculation/Functions/IS_ERROR.php +++ b/tests/data/Calculation/Functions/IS_ERROR.php @@ -5,60 +5,60 @@ return [ false, ], [ + false, null, - false, ], [ + false, -1, - false, ], [ + false, 0, - false, ], [ + false, 9, - false, ], [ + false, 1.5, - false, ], [ + false, '', - false, ], [ + false, '-1', - false, ], [ + false, '2', - false, ], [ + false, '-1.5', - false, ], [ + false, 'ABC', - false, ], [ + true, '#VALUE!', - true, ], [ + true, '#N/A', - true, ], [ + false, 'TRUE', - false, ], [ - true, false, + true, ], [ false, diff --git a/tests/data/Calculation/Functions/IS_EVEN.php b/tests/data/Calculation/Functions/IS_EVEN.php index c0b3191a..29707157 100644 --- a/tests/data/Calculation/Functions/IS_EVEN.php +++ b/tests/data/Calculation/Functions/IS_EVEN.php @@ -5,79 +5,79 @@ return [ '#NAME?', ], [ - null, '#NAME?', + null, ], [ + false, -1, - false, ], [ + true, 0, - true, ], [ + false, 9, - false, ], [ + false, 1.25, - false, ], [ + false, 1.5, - false, ], [ + true, 2.25, - true, ], [ + true, 2.5, - true, ], [ + '#VALUE!', '', - '#VALUE!', ], [ + false, '-1', - false, ], [ + true, '2', - true, ], [ + false, '-1.5', - false, ], [ + true, '2.5', - true, ], [ + '#VALUE!', 'ABC', - '#VALUE!', ], [ '#VALUE!', '#VALUE!', ], [ + '#VALUE!', '#N/A', - '#VALUE!', ], [ + '#VALUE!', 'TRUE', - '#VALUE!', ], [ + '#VALUE!', true, - '#VALUE!', ], [ - false, '#VALUE!', + false, ], ]; diff --git a/tests/data/Calculation/Functions/IS_LOGICAL.php b/tests/data/Calculation/Functions/IS_LOGICAL.php index fb8c1951..e38cbf8b 100644 --- a/tests/data/Calculation/Functions/IS_LOGICAL.php +++ b/tests/data/Calculation/Functions/IS_LOGICAL.php @@ -5,63 +5,63 @@ return [ false, ], [ + false, null, - false, ], [ + false, -1, - false, ], [ + false, 0, - false, ], [ + false, 9, - false, ], [ + false, 1.5, - false, ], [ + false, '', - false, ], [ + false, '-1', - false, ], [ + false, '2', - false, ], [ + false, '-1.5', - false, ], [ + false, 'ABC', - false, ], [ + false, '#VALUE!', - false, ], [ + false, '#N/A', - false, ], [ + false, 'TRUE', - false, ], [ true, true, ], [ - false, true, + false, ], ]; diff --git a/tests/data/Calculation/Functions/IS_NA.php b/tests/data/Calculation/Functions/IS_NA.php index dc08d1a8..4e95ce2c 100644 --- a/tests/data/Calculation/Functions/IS_NA.php +++ b/tests/data/Calculation/Functions/IS_NA.php @@ -5,60 +5,60 @@ return [ false, ], [ + false, null, - false, ], [ + false, -1, - false, ], [ + false, 0, - false, ], [ + false, 9, - false, ], [ + false, 1.5, - false, ], [ + false, '', - false, ], [ + false, '-1', - false, ], [ + false, '2', - false, ], [ + false, '-1.5', - false, ], [ + false, 'ABC', - false, ], [ + false, '#VALUE!', - false, ], [ + true, '#N/A', - true, ], [ + false, 'TRUE', - false, ], [ - true, false, + true, ], [ false, diff --git a/tests/data/Calculation/Functions/IS_NONTEXT.php b/tests/data/Calculation/Functions/IS_NONTEXT.php index 91c7988c..96650ad4 100644 --- a/tests/data/Calculation/Functions/IS_NONTEXT.php +++ b/tests/data/Calculation/Functions/IS_NONTEXT.php @@ -5,63 +5,63 @@ return [ true, ], [ + true, null, - true, ], [ + true, -1, - true, ], [ + true, 0, - true, ], [ + true, 9, - true, ], [ + true, 1.5, - true, ], [ + false, '', - false, ], [ + false, '-1', - false, ], [ + false, '2', - false, ], [ + false, '-1.5', - false, ], [ + false, 'ABC', - false, ], [ + true, '#VALUE!', - true, ], [ + true, '#N/A', - true, ], [ + false, 'TRUE', - false, ], [ true, true, ], [ - false, true, + false, ], ]; diff --git a/tests/data/Calculation/Functions/IS_NUMBER.php b/tests/data/Calculation/Functions/IS_NUMBER.php index 51b9b943..6e6815be 100644 --- a/tests/data/Calculation/Functions/IS_NUMBER.php +++ b/tests/data/Calculation/Functions/IS_NUMBER.php @@ -5,60 +5,60 @@ return [ false, ], [ + false, null, - false, ], [ + true, -1, - true, ], [ + true, 0, - true, ], [ + true, 9, - true, ], [ + true, 1.5, - true, ], [ + false, '', - false, ], [ + false, '-1', - false, ], [ + false, '2', - false, ], [ + false, '-1.5', - false, ], [ + false, 'ABC', - false, ], [ + false, '#VALUE!', - false, ], [ + false, '#N/A', - false, ], [ + false, 'TRUE', - false, ], [ - true, false, + true, ], [ false, diff --git a/tests/data/Calculation/Functions/IS_ODD.php b/tests/data/Calculation/Functions/IS_ODD.php index 252a2ba5..a12b8cfa 100644 --- a/tests/data/Calculation/Functions/IS_ODD.php +++ b/tests/data/Calculation/Functions/IS_ODD.php @@ -5,79 +5,79 @@ return [ '#NAME?', ], [ - null, '#NAME?', + null, ], [ + true, -1, - true, ], [ + false, 0, - false, ], [ + true, 9, - true, ], [ + true, 1.25, - true, ], [ + true, 1.5, - true, ], [ + false, 2.25, - false, ], [ + false, 2.5, - false, ], [ + '#VALUE!', '', - '#VALUE!', ], [ + true, '-1', - true, ], [ + false, '2', - false, ], [ + true, '-1.5', - true, ], [ + false, '2.5', - false, ], [ + '#VALUE!', 'ABC', - '#VALUE!', ], [ '#VALUE!', '#VALUE!', ], [ + '#VALUE!', '#N/A', - '#VALUE!', ], [ + '#VALUE!', 'TRUE', - '#VALUE!', ], [ + '#VALUE!', true, - '#VALUE!', ], [ - false, '#VALUE!', + false, ], ]; diff --git a/tests/data/Calculation/Functions/IS_TEXT.php b/tests/data/Calculation/Functions/IS_TEXT.php index 59b90fd9..a33b2a29 100644 --- a/tests/data/Calculation/Functions/IS_TEXT.php +++ b/tests/data/Calculation/Functions/IS_TEXT.php @@ -5,60 +5,60 @@ return [ false, ], [ + false, null, - false, ], [ + false, -1, - false, ], [ + false, 0, - false, ], [ + false, 9, - false, ], [ + false, 1.5, - false, ], [ + true, '', - true, ], [ + true, '-1', - true, ], [ + true, '2', - true, ], [ + true, '-1.5', - true, ], [ + true, 'ABC', - true, ], [ + false, '#VALUE!', - false, ], [ + false, '#N/A', - false, ], [ + true, 'TRUE', - true, ], [ - true, false, + true, ], [ false, diff --git a/tests/data/Calculation/Functions/N.php b/tests/data/Calculation/Functions/N.php index bdbf8545..a5c344b2 100644 --- a/tests/data/Calculation/Functions/N.php +++ b/tests/data/Calculation/Functions/N.php @@ -5,36 +5,36 @@ return [ 0, ], [ + 0, null, + ], + [ + -1, + -1, + ], + [ + 1.25, + 1.25, + ], + [ 0, - ], - [ - -1, - -1, - ], - [ - 1.25, - 1.25, - ], - [ '', - 0, ], [ + 0, '2.5', - 0, ], [ + 0, 'TRUE', - 0, ], [ + 0, 'ABCDE', - 0, ], [ - true, 1, + true, ], [ '#DIV/0!', @@ -45,58 +45,59 @@ return [ '#NUM!', ], [ + 0, [ null, ], - 0, ], [ + 123, [ 123, ], - 123, ], [ + 123, [ [ 123, 456, ], ], - 123, ], [ + 123, [ [ 123, 'A', ], ], - 123, ], [ - [ - [ - 'A', - 123, - ], - ], 0, - ], - [ [ [ 'A', 123, ], - [ - 456, - 789, - ], ], + ], + [ 0, + [ + [ + 'A', + 123, + ], + [ + 456, + 789, + ], + ], ], [ + 123, [ [ 123, @@ -107,9 +108,9 @@ return [ 789, ], ], - 123, ], [ + 123, [ [ 123, @@ -120,9 +121,9 @@ return [ 789, ], ], - 123, ], [ + 123, [ [ 123, @@ -133,6 +134,5 @@ return [ 'A', ], ], - 123, ], ]; diff --git a/tests/data/Calculation/Functions/TYPE.php b/tests/data/Calculation/Functions/TYPE.php index b86d86eb..d029d32a 100644 --- a/tests/data/Calculation/Functions/TYPE.php +++ b/tests/data/Calculation/Functions/TYPE.php @@ -5,66 +5,67 @@ return [ 1, ], [ + 1, null, - 1, ], [ + 1, -1, - 1, ], [ + 1, 1.25, - 1, ], [ + 2, '', - 2, ], [ + 2, '2.5', - 2, ], [ + 2, 'TRUE', - 2, ], [ + 2, 'ABCDE', - 2, ], [ - true, 4, + true, ], [ + 16, '#DIV/0!', - 16, ], [ + 16, '#NUM!', - 16, ], [ + 1, [ null, ], - 1, ], [ + 1, [ 1, ], - 1, ], [ + 64, [ 1, 2, 3, ], - 64, ], [ + 64, [ [ 1, @@ -82,9 +83,9 @@ return [ 9, ], ], - 64, ], [ + 64, [ [ null, @@ -95,6 +96,5 @@ return [ null, ], ], - 64, ], ]; diff --git a/tests/data/Calculation/Logical/AND.php b/tests/data/Calculation/Logical/AND.php index a0e0cd2c..69e16671 100644 --- a/tests/data/Calculation/Logical/AND.php +++ b/tests/data/Calculation/Logical/AND.php @@ -7,20 +7,20 @@ return [ ], // NULL [ - null, true, + null, ], // Boolean TRUE and NULL [ true, - null, true, + null, ], // Boolean FALSE and NULL [ false, - null, false, + null, ], // Both TRUE Booleans [ @@ -30,15 +30,15 @@ return [ ], // Mixed Booleans [ - true, false, + true, false, ], // Mixed Booleans [ false, - true, false, + true, ], // Both FALSE Booleans [ @@ -48,9 +48,9 @@ return [ ], // Multiple Mixed Booleans [ - true, - true, false, + true, + true, false, ], // Multiple TRUE Booleans @@ -69,56 +69,56 @@ return [ false, ], [ + true, -1, -2, - true, ], [ - 0, - 0, false, + 0, + 0, ], [ + false, 0, 1, - false, ], [ - 1, - 1, true, + 1, + 1, ], [ + '#VALUE!', '1', 1, - '#VALUE!', ], // 'TRUE' String [ + true, 'TRUE', 1, - true, ], // 'FALSE' String [ + false, 'FALSE', true, - false, ], // Non-numeric String [ + '#VALUE!', 'ABCD', 1, - '#VALUE!', ], [ + true, -2, 1, - true, ], [ + false, -2, 0, - false, ], ]; diff --git a/tests/data/Calculation/Logical/IF.php b/tests/data/Calculation/Logical/IF.php index 821f7857..99f9d7a3 100644 --- a/tests/data/Calculation/Logical/IF.php +++ b/tests/data/Calculation/Logical/IF.php @@ -5,33 +5,33 @@ return [ 0, ], [ - true, 0, + true, ], [ false, false, ], [ + 'ABC', true, 'ABC', - 'ABC', ], [ false, - 'ABC', false, + 'ABC', ], [ + 'ABC', true, 'ABC', 'XYZ', - 'ABC', ], [ + 'XYZ', false, 'ABC', 'XYZ', - 'XYZ', ], ]; diff --git a/tests/data/Calculation/Logical/IFERROR.php b/tests/data/Calculation/Logical/IFERROR.php index db5d3d6a..3f890eaa 100644 --- a/tests/data/Calculation/Logical/IFERROR.php +++ b/tests/data/Calculation/Logical/IFERROR.php @@ -3,42 +3,42 @@ return [ [ null, - 'Error', null, + 'Error', ], [ true, - 'Error', true, + 'Error', ], [ 42, - 'Error', 42, + 'Error', ], [ '', - 'Error', '', + 'Error', ], [ + 'ABC', 'ABC', 'Error', - 'ABC', ], [ + 'Error', '#VALUE!', 'Error', - 'Error', ], [ + 'Error', '#NAME?', 'Error', - 'Error', ], [ - '#N/A', 'Error', + '#N/A', 'Error', ], ]; diff --git a/tests/data/Calculation/Logical/NOT.php b/tests/data/Calculation/Logical/NOT.php index 0557d924..f5e5c95a 100644 --- a/tests/data/Calculation/Logical/NOT.php +++ b/tests/data/Calculation/Logical/NOT.php @@ -5,79 +5,79 @@ return [ true, ], [ + true, null, - true, ], [ + false, -1, - false, ], [ + true, 0, - true, ], [ + false, 1, - false, ], [ + false, 2, - false, ], [ + false, -1.5, - false, ], [ + false, 1.5, - false, ], [ + '#VALUE!', '-1', - '#VALUE!', ], [ + '#VALUE!', '0', - '#VALUE!', ], [ + '#VALUE!', '1', - '#VALUE!', ], [ + '#VALUE!', '2', - '#VALUE!', ], [ + '#VALUE!', '-1.5', - '#VALUE!', ], [ + '#VALUE!', '1.5', - '#VALUE!', ], [ + '#VALUE!', '', - '#VALUE!', ], [ + '#VALUE!', 'ABC', - '#VALUE!', ], [ + true, 'FALSE', - true, ], [ + false, 'TRUE', - false, - ], - [ - true, - false, ], [ false, true, ], + [ + true, + false, + ], ]; diff --git a/tests/data/Calculation/Logical/OR.php b/tests/data/Calculation/Logical/OR.php index f43e52fe..11e70b31 100644 --- a/tests/data/Calculation/Logical/OR.php +++ b/tests/data/Calculation/Logical/OR.php @@ -7,20 +7,20 @@ return [ ], // NULL [ - null, false, + null, ], // Boolean TRUE and NULL [ true, - null, true, + null, ], // Boolean FALSE and NULL [ false, - null, false, + null, ], // Both TRUE Booleans [ @@ -31,13 +31,13 @@ return [ // Mixed Booleans [ true, - false, true, + false, ], // Mixed Booleans [ - false, true, + false, true, ], // Both FALSE Booleans @@ -50,8 +50,8 @@ return [ [ true, true, - false, true, + false, ], // Multiple TRUE Booleans [ @@ -69,51 +69,51 @@ return [ false, ], [ + true, -1, -2, - true, ], [ - 0, - 0, false, + 0, + 0, ], [ + true, 0, 1, - true, ], [ - 1, - 1, true, + 1, + 1, ], // 'TRUE' String [ + true, 'TRUE', 1, - true, ], // 'FALSE' String [ - 'FALSE', true, + 'FALSE', true, ], // Non-numeric String [ + '#VALUE!', 'ABCD', 1, - '#VALUE!', ], [ + true, -2, 1, - true, ], [ + true, -2, 0, - true, ], ]; diff --git a/tests/data/Calculation/LookupRef/HLOOKUP.php b/tests/data/Calculation/LookupRef/HLOOKUP.php index 8e055316..8733fa78 100644 --- a/tests/data/Calculation/LookupRef/HLOOKUP.php +++ b/tests/data/Calculation/LookupRef/HLOOKUP.php @@ -2,6 +2,7 @@ return [ [ + 16.800000000000001, 10251, [ [ @@ -34,9 +35,9 @@ return [ ], 2, false, - 16.800000000000001, ], [ + 6.0, 10251, [ [ @@ -69,9 +70,9 @@ return [ ], 3, false, - 6.0, ], [ + '#N/A', 10248, [ [ @@ -104,9 +105,9 @@ return [ ], 2, false, - '#N/A', ], [ + 14.0, 10248, [ [ @@ -139,9 +140,9 @@ return [ ], 2, true, - 14.0, ], [ + 4, 'Axles', [ [ @@ -167,9 +168,9 @@ return [ ], 2, true, - 4, ], [ + 7, 'Bearings', [ [ @@ -195,9 +196,9 @@ return [ ], 3, false, - 7, ], [ + 5, 'B', [ [ @@ -223,9 +224,9 @@ return [ ], 3, true, - 5, ], [ + 11, 'Bolts', [ [ @@ -250,9 +251,9 @@ return [ ], ], 4, - 11, ], [ + 'c', 3, [ [ @@ -273,6 +274,5 @@ return [ ], 2, true, - 'c', ], ]; diff --git a/tests/data/Calculation/LookupRef/VLOOKUP.php b/tests/data/Calculation/LookupRef/VLOOKUP.php index 69f2e37e..2ef64d06 100644 --- a/tests/data/Calculation/LookupRef/VLOOKUP.php +++ b/tests/data/Calculation/LookupRef/VLOOKUP.php @@ -2,6 +2,7 @@ return [ [ + '#N/A', 1, [ [ @@ -57,9 +58,9 @@ return [ ], 2, false, - '#N/A', ], [ + 100, 1, [ [ @@ -115,9 +116,9 @@ return [ ], 3, true, - 100, ], [ + '#N/A', 0.69999999999999996, [ [ @@ -173,9 +174,9 @@ return [ ], 3, false, - '#N/A', ], [ + '#N/A', 0.10000000000000001, [ [ @@ -231,9 +232,9 @@ return [ ], 2, true, - '#N/A', ], [ + 1.71, 2, [ [ @@ -289,6 +290,5 @@ return [ ], 2, true, - 1.71, ], ]; diff --git a/tests/data/Calculation/MathTrig/ATAN2.php b/tests/data/Calculation/MathTrig/ATAN2.php index 13a9fb64..19e6b552 100644 --- a/tests/data/Calculation/MathTrig/ATAN2.php +++ b/tests/data/Calculation/MathTrig/ATAN2.php @@ -4,83 +4,83 @@ return [ [ - 0, - 0, '#DIV/0!', + 0, + 0, ], [ - 1, - 1, 0.78539816339699997, + 1, + 1, ], [ - -1, - -1, -2.3561944901919998, + -1, + -1, ], [ - -1, - 1, 2.3561944901919998, + -1, + 1, ], [ + -0.78539816339699997, 1, -1, - -0.78539816339699997, ], [ + 1.107148717794, 0.5, 1, - 1.107148717794, ], [ + 1.8157749899219999, -0.5, 2, - 1.8157749899219999, ], [ + 0.67474094222400005, 1, 0.80000000000000004, - 0.67474094222400005, ], [ + -0.64350110879300004, 0.80000000000000004, -0.59999999999999998, - -0.64350110879300004, ], [ + -1.460139105621, 1, -9, - -1.460139105621, ], [ + 0.0, 0.20000000000000001, 0, - 0.0, ], [ + 1.107148717794, 0.10000000000000001, 0.20000000000000001, - 1.107148717794, ], [ + 1.570796326795, 0, 0.20000000000000001, - 1.570796326795, ], [ + '#VALUE!', 'A', 0.20000000000000001, - '#VALUE!', ], [ + 0.78539816339699997, true, 1, - 0.78539816339699997, ], [ + -1.570796326795, false, -2.5, - -1.570796326795, ], ]; diff --git a/tests/data/Calculation/MathTrig/CEILING.php b/tests/data/Calculation/MathTrig/CEILING.php index 3e395830..4005f12b 100644 --- a/tests/data/Calculation/MathTrig/CEILING.php +++ b/tests/data/Calculation/MathTrig/CEILING.php @@ -4,101 +4,101 @@ return [ [ + 3.0, 2.5, 1, - 3.0, ], [ + -4.0, -2.5, -2, - -4.0, ], [ + 1.5, 1.5, 0.10000000000000001, - 1.5, ], [ + 0.23999999999999999, 0.23400000000000001, 0.01, - 0.23999999999999999, ], [ + -2.3999999999999999, -2.3410000000000002, -0.10000000000000001, - -2.3999999999999999, ], [ + 0.0, 8, 0, - 0.0, ], [ - 8, - 1.5, 9.0, + 8, + 1.5, ], [ + '#NUM!', 8, -1.5, - '#NUM!', ], [ + '#NUM!', -8, 1.5, - '#NUM!', ], [ + -9.0, -8, -1.5, - -9.0, ], [ + 8.3000000000000007, 8.2599999999999998, 0.050000000000000003, - 8.3000000000000007, ], [ + 2.3500000000000001, 2.3410000000000002, 0.050000000000000003, - 2.3500000000000001, ], [ + '#VALUE!', 123.456, - '#VALUE!', ], [ + '#VALUE!', 'PhpSpreadsheet', - '#VALUE!', ], [ + 211.0, 210.66999999999999, 1, - 211.0, ], [ + 210.69999999999999, 210.66999999999999, 0.050000000000000003, - 210.69999999999999, ], [ + 210.65000000000001, 210.63, 0.050000000000000003, - 210.65000000000001, ], [ + 4.0, 2.98, 2, - 4.0, ], [ + '#NUM!', -2.98, 2, - '#NUM!', ], [ + -5.0, -4.5, -1, - -5.0, ], ]; diff --git a/tests/data/Calculation/MathTrig/COMBIN.php b/tests/data/Calculation/MathTrig/COMBIN.php index 69d40536..f5e36a75 100644 --- a/tests/data/Calculation/MathTrig/COMBIN.php +++ b/tests/data/Calculation/MathTrig/COMBIN.php @@ -4,49 +4,54 @@ return [ [ + 35, 7, 3, - 35, ], [ + 28, 8, 2, - 28, ], [ + 56, 8, 3, - 56, ], [ + 70, 8, 4, - 70, ], [ + 161700, 100, 3, - 161700, ], [ + '#NUM!', -7, -10, - '#NUM!', ], [ + '#NUM!', -7, 10, - '#NUM!', ], [ + '#NUM!', 7, -10, - '#NUM!', ], [ + '#NUM!', 2, 3, - '#NUM!', + ], + [ + 1, + 2, + 2, ], [ 2, @@ -54,73 +59,68 @@ return [ 1, ], [ - 2, 1, 2, - ], - [ - 2, 0, - 1, ], [ + 1, 2.5, 2, - 1, ], [ + '#VALUE!', 'ABCD', 'EFGH', - '#VALUE!', ], [ + 252, 10, 5, - 252, ], [ + 120, 10, 3, - 120, ], [ + 20349, 21, 5, - 20349, ], [ + 6, 6, 1, - 6, ], [ + 15, 6, 2, - 15, ], [ + 20, 6, 3, - 20, ], [ + 15, 6, 4, - 15, ], [ + 6, 6, 5, - 6, ], [ - 6, - 6, 1, + 6, + 6, ], [ + '#NUM!', 6, 7, - '#NUM!', ], ]; diff --git a/tests/data/Calculation/MathTrig/EVEN.php b/tests/data/Calculation/MathTrig/EVEN.php index 83d2e4c9..887c0707 100644 --- a/tests/data/Calculation/MathTrig/EVEN.php +++ b/tests/data/Calculation/MathTrig/EVEN.php @@ -2,28 +2,28 @@ return [ [ + 0, null, - 0, ], [ - 5.4000000000000004, 6, + 5.4000000000000004, ], [ - -5.4000000000000004, -6, + -5.4000000000000004, ], [ + 2, 1.5, - 2, ], [ + 2, 0.10000000000000001, - 2, ], [ + 4, 3, - 4, ], [ 2, @@ -34,36 +34,36 @@ return [ -2, ], [ + -2, -1, - -2, ], [ - 'ABC', '#VALUE!', + 'ABC', ], [ - true, 2, + true, ], [ + 0, false, - 0, ], [ 0, 0, ], [ - 210.61000000000001, 212, + 210.61000000000001, ], [ - 2.98, 4, + 2.98, ], [ - -2.98, -4, + -2.98, ], [ 6, diff --git a/tests/data/Calculation/MathTrig/FACT.php b/tests/data/Calculation/MathTrig/FACT.php index 953d0623..331e402d 100644 --- a/tests/data/Calculation/MathTrig/FACT.php +++ b/tests/data/Calculation/MathTrig/FACT.php @@ -2,43 +2,43 @@ return [ [ - 5, 120, + 5, ], [ + 1, 1.8999999999999999, - 1, ], [ + 1, 0, - 1, ], [ - -4, '#NUM!', + -4, ], [ 1, 1, ], [ + 6, 3, - 6, ], [ - 6, 720, - ], - [ - 10, - 3628800, - ], - [ - 3.2000000000000002, 6, ], [ - 'ABC', + 3628800, + 10, + ], + [ + 6, + 3.2000000000000002, + ], + [ '#VALUE!', + 'ABC', ], ]; diff --git a/tests/data/Calculation/MathTrig/FACTDOUBLE.php b/tests/data/Calculation/MathTrig/FACTDOUBLE.php index d0813f48..34a3403f 100644 --- a/tests/data/Calculation/MathTrig/FACTDOUBLE.php +++ b/tests/data/Calculation/MathTrig/FACTDOUBLE.php @@ -2,35 +2,35 @@ return [ [ - 0, 1, + 0, ], [ - 6, 48, + 6, ], [ - 7, 105, + 7, ], [ - 5, 15, + 5, ], [ - 8, 384, + 8, ], [ - 13, 135135, + 13, ], [ - -1, '#NUM!', + -1, ], [ - 'ABC', '#VALUE!', + 'ABC', ], ]; diff --git a/tests/data/Calculation/MathTrig/FLOOR.php b/tests/data/Calculation/MathTrig/FLOOR.php index 324fcf45..4b2bd4a2 100644 --- a/tests/data/Calculation/MathTrig/FLOOR.php +++ b/tests/data/Calculation/MathTrig/FLOOR.php @@ -2,56 +2,56 @@ return [ [ + 2, 2.5, 1, - 2, ], [ - -2.5, -2, + -2.5, -2, ], [ - -2.5, - 2, '#NUM!', + -2.5, + 2, ], [ + '#NUM!', 2.5, -2, - '#NUM!', ], [ + '#DIV/0!', 123.456, 0, - '#DIV/0!', ], [ + 1.5, 1.5, 0.10000000000000001, - 1.5, ], [ + 0.23000000000000001, 0.23400000000000001, 0.01, - 0.23000000000000001, ], [ + '#VALUE!', 123.456, - '#VALUE!', ], [ + '#VALUE!', 'ABC', - '#VALUE!', ], [ + 15, 17, 3, - 15, ], [ + 16, 19, 4, - 16, ], ]; diff --git a/tests/data/Calculation/MathTrig/GCD.php b/tests/data/Calculation/MathTrig/GCD.php index 413f6ae4..61c69336 100644 --- a/tests/data/Calculation/MathTrig/GCD.php +++ b/tests/data/Calculation/MathTrig/GCD.php @@ -2,111 +2,111 @@ return [ [ + 1, 5, 2, - 1, ], [ + 12, 24, 36, - 12, ], [ + 1, 7, 1, - 1, ], [ + 5, 5, 0, - 5, ], [ + 5, 30, 15, 10, - 5, ], [ + 14, 42, 56, 140, - 14, ], [ + 4, 24, 28, 40, - 4, ], [ + 9, 27, 45, 54, - 9, ], [ + 14, 84, 126, 196, - 14, ], [ + 1, 3, 5, 7, - 1, ], [ + 1, 3, 5, 0, - 1, ], [ + '#NUM!', 3, 5, -7, - '#NUM!', ], [ + 3, 3, 6, 12, - 3, ], [ + 3, 3, 6, '12', - 3, ], [ + '#VALUE!', 3, 6, 'ABC', - '#VALUE!', ], [ 3, 3, ], [ + 5, 15, 10, 25, - 5, ], [ + 4, 0, 8, 12, - 4, ], [ + 1, 7, 2, - 1, ], [ 0, diff --git a/tests/data/Calculation/MathTrig/INT.php b/tests/data/Calculation/MathTrig/INT.php index e915800a..1f5cfacf 100644 --- a/tests/data/Calculation/MathTrig/INT.php +++ b/tests/data/Calculation/MathTrig/INT.php @@ -2,32 +2,32 @@ return [ [ + 0, null, - 0, ], [ - 5.4000000000000004, 5, + 5.4000000000000004, ], [ - -5.4000000000000004, -6, + -5.4000000000000004, ], [ + -4, -3.2000000000000002, - -4, ], [ + 1, 1.5, - 1, ], [ + 0, 0.10000000000000001, - 0, ], [ + -1, -0.10000000000000001, - -1, ], [ 3, @@ -38,8 +38,8 @@ return [ 2, ], [ - -2.0099999999999998, -3, + -2.0099999999999998, ], [ -2, @@ -50,31 +50,31 @@ return [ -1, ], [ - 'ABC', '#VALUE!', + 'ABC', ], [ - true, 1, + true, ], [ + 0, false, - 0, ], [ 0, 0, ], [ - '-3.5', -4, + '-3.5', ], [ - 8.9000000000000004, 8, + 8.9000000000000004, ], [ - -8.9000000000000004, -9, + -8.9000000000000004, ], ]; diff --git a/tests/data/Calculation/MathTrig/LCM.php b/tests/data/Calculation/MathTrig/LCM.php index 9072d8a6..9f12ec95 100644 --- a/tests/data/Calculation/MathTrig/LCM.php +++ b/tests/data/Calculation/MathTrig/LCM.php @@ -2,67 +2,67 @@ return [ [ + 10, 5, 2, - 10, ], [ + 72, 24, 36, - 72, ], [ + 84, 3, 7, 12, - 84, ], [ + 72, 24.899999999999999, 36.899999999999999, - 72, ], [ + 726, 6, 22, 121, - 726, ], [ + '#VALUE!', 6, 'ABC', - '#VALUE!', ], [ + '#NUM!', 24, -12, - '#NUM!', ], [ + 0, 3, 0, - 0, ], [ + 5, 1, 5, - 5, ], [ + 150, 15, 10, 25, - 150, ], [ + 24, 1, 8, 12, - 24, ], [ + 14, 7, 2, - 14, ], ]; diff --git a/tests/data/Calculation/MathTrig/LOG.php b/tests/data/Calculation/MathTrig/LOG.php index add80f9c..ee938f85 100644 --- a/tests/data/Calculation/MathTrig/LOG.php +++ b/tests/data/Calculation/MathTrig/LOG.php @@ -4,341 +4,341 @@ return [ [ + '#VALUE!', 'ABC', - '#VALUE!', ], [ + '#VALUE!', '123ABC', - '#VALUE!', ], [ - 1.2344999999999999, 0.091491094267951101, + 1.2344999999999999, ], [ + '#NUM!', -1.5, -0.75, - '#NUM!', ], [ + '#NUM!', 0, -0.75, - '#NUM!', ], [ + '#NUM!', 3.75, -0.75, - '#NUM!', ], [ + '#NUM!', -1.5, 0, - '#NUM!', ], [ - 0, - 0, '#NUM!', + 0, + 0, ], [ + '#NUM!', 3.75, 0, - '#NUM!', ], [ + '#NUM!', -0.75, 0.75, - '#NUM!', ], [ + '#NUM!', 0, 0.75, - '#NUM!', ], [ - 0.75, - 0.75, 1.0, + 0.75, + 0.75, ], [ - 1.5, - 0.75, -1.40942083965321, + 1.5, + 0.75, ], [ - 2.25, - 0.75, -2.8188416793064199, + 2.25, + 0.75, ], [ - 3, - 0.75, -3.8188416793064199, + 3, + 0.75, ], [ - 3.75, - 0.75, -4.5945019399978904, + 3.75, + 0.75, ], [ - 4.5, - 0.75, -5.2282625189596299, + 4.5, + 0.75, ], [ + '#NUM!', -0.75, 1.5, - '#NUM!', ], [ + '#NUM!', 0, 1.5, - '#NUM!', ], [ - 0.75, - 1.5, -0.70951129135145496, + 0.75, + 1.5, ], [ - 1.5, - 1.5, 1.0, + 1.5, + 1.5, ], [ - 2.25, - 1.5, 2.0, + 2.25, + 1.5, ], [ - 3, - 1.5, 2.7095112913514501, + 3, + 1.5, ], [ - 3.75, - 1.5, 3.25985100456466, + 3.75, + 1.5, ], [ - 4.5, - 1.5, 3.7095112913514501, + 4.5, + 1.5, ], [ + '#NUM!', -0.75, 2.25, - '#NUM!', ], [ + '#NUM!', 0, 2.25, - '#NUM!', ], [ - 0.75, - 2.25, -0.35475564567572698, + 0.75, + 2.25, ], [ - 1.5, - 2.25, 0.5, + 1.5, + 2.25, ], [ - 2.25, - 2.25, 1.0, + 2.25, + 2.25, ], [ - 3, - 2.25, 1.3547556456757299, + 3, + 2.25, ], [ - 3.75, - 2.25, 1.62992550228233, + 3.75, + 2.25, ], [ - 4.5, - 2.25, 1.8547556456757299, + 4.5, + 2.25, ], [ + '#NUM!', -0.75, 3, - '#NUM!', ], [ + '#NUM!', 0, 3, - '#NUM!', ], [ - 0.75, - 3, -0.261859507142915, + 0.75, + 3, ], [ - 1.5, - 3, 0.36907024642854303, + 1.5, + 3, ], [ - 2.25, - 3, 0.73814049285708505, + 2.25, + 3, ], [ - 3, - 3, 1.0, + 3, + 3, ], [ - 3.75, - 3, 1.20311401357501, + 3.75, + 3, ], [ - 4.5, - 3, 1.36907024642854, + 4.5, + 3, ], [ + '#NUM!', -0.75, 3.75, - '#NUM!', ], [ + '#NUM!', 0, 3.75, - '#NUM!', ], [ - 0.75, - 3.75, -0.21765144798273001, + 0.75, + 3.75, ], [ + 0.306762486567556, 1.5, 3.75, - 0.306762486567556, ], [ + 0.61352497313511101, 2.25, 3.75, - 0.61352497313511101, ], [ + 0.83117642111784096, 3, 3.75, - 0.83117642111784096, ], [ - 3.75, - 3.75, 1.0, + 3.75, + 3.75, ], [ + 1.1379389076854001, 4.5, 3.75, - 1.1379389076854001, ], [ + '#NUM!', -0.75, 4.5, - '#NUM!', ], [ + '#NUM!', 0, 4.5, - '#NUM!', ], [ + -0.19126813092755501, 0.75, 4.5, - -0.19126813092755501, ], [ + 0.26957728969081501, 1.5, 4.5, - 0.26957728969081501, ], [ + 0.53915457938163003, 2.25, 4.5, - 0.53915457938163003, ], [ + 0.73042271030918504, 3, 4.5, - 0.73042271030918504, ], [ + 0.87878179860642203, 3.75, 4.5, - 0.87878179860642203, ], [ - 4.5, - 4.5, 1.0, + 4.5, + 4.5, ], [ + 6, 64, 2, - 6, ], [ - 100, 2, + 100, ], [ + -2, 4, 0.5, - -2, ], [ - 500, 2.6989700043360001, + 500, ], [ - 10, 1, + 10, ], [ + 3, 8, 2, - 3, ], [ + 4.454347342888, 86, 2.7182818000000002, - 4.454347342888, ], [ - 20, 1.3010299956639999, + 20, ], [ + 1.3010299956639999, 20, 10, - 1.3010299956639999, ], [ + 0.93067655807299998, 20, 25, - 0.93067655807299998, ], [ + 1.9756909715740001, 25, 5.0999999999999996, - 1.9756909715740001, ], [ + 4.82273630215, 200, 3, - 4.82273630215, ], ]; diff --git a/tests/data/Calculation/MathTrig/MDETERM.php b/tests/data/Calculation/MathTrig/MDETERM.php index 961ebf70..10a3d806 100644 --- a/tests/data/Calculation/MathTrig/MDETERM.php +++ b/tests/data/Calculation/MathTrig/MDETERM.php @@ -2,6 +2,7 @@ return [ [ + 0, [ [ 1, @@ -19,9 +20,9 @@ return [ 9, ], ], - 0, ], [ + 0, [ [ 1.1, @@ -39,9 +40,9 @@ return [ 9.9, ], ], - 0, ], [ + 0, [ [ 10, @@ -59,9 +60,9 @@ return [ 90, ], ], - 0, ], [ + -360.0, [ [ 8, @@ -79,9 +80,9 @@ return [ 2, ], ], - -360.0, ], [ + -9, [ [ 5, @@ -92,9 +93,9 @@ return [ 1, ], ], - -9, ], [ + 40, [ [ 6, @@ -112,9 +113,9 @@ return [ 4, ], ], - 40, ], [ + 1.81, [ [ 0.2, @@ -125,9 +126,9 @@ return [ 10.8, ], ], - 1.81, ], [ + '#VALUE!', [ [ 0.2, @@ -145,22 +146,22 @@ return [ null, ], ], - '#VALUE!', ], [ - [ - [ - 1, - 2, - ], - [ - 3, - 4, - ], - ], -2, + [ + [ + 1, + 2, + ], + [ + 3, + 4, + ], + ], ], [ + -3, [ [ 1, @@ -178,9 +179,9 @@ return [ 2, ], ], - -3, ], [ + 88, [ [ 1, @@ -207,9 +208,9 @@ return [ 2, ], ], - 88, ], [ + 1, [ [ 3, @@ -227,9 +228,9 @@ return [ 2, ], ], - 1, ], [ + -3, [ [ 3, @@ -240,9 +241,9 @@ return [ 1, ], ], - -3, ], [ + '#VALUE!', [ [ 1, @@ -257,6 +258,5 @@ return [ 1, ], ], - '#VALUE!', ], ]; diff --git a/tests/data/Calculation/MathTrig/MOD.php b/tests/data/Calculation/MathTrig/MOD.php index 3aded00a..aabfb26b 100644 --- a/tests/data/Calculation/MathTrig/MOD.php +++ b/tests/data/Calculation/MathTrig/MOD.php @@ -2,53 +2,53 @@ return [ [ + 2, 19, 17, - 2, ], [ + -7, 19, -13, - -7, ], [ + 0, 34, 17, - 0, ], [ + '#DIV/0!', 34, 0, - '#DIV/0!', ], [ + 1, 3, 2, - 1, ], [ + 1, -3, 2, - 1, ], [ + -1, 3, -2, - -1, ], [ + -1, -3, -2, - -1, ], [ + 1.2, 2.5, 1.3, - 1.2, ], [ + 0, '', 1, - 0, ], ]; diff --git a/tests/data/Calculation/MathTrig/MROUND.php b/tests/data/Calculation/MathTrig/MROUND.php index 36ffc5e9..38017b65 100644 --- a/tests/data/Calculation/MathTrig/MROUND.php +++ b/tests/data/Calculation/MathTrig/MROUND.php @@ -2,58 +2,58 @@ return [ [ + 9, 10, 3, - 9, ], [ + -9, -10, -3, - -9, ], [ + 1.3999999999999999, 1.3, 0.20000000000000001, - 1.3999999999999999, ], [ + 0, 5, 0, - 0, ], [ + 3.1419999999999999, 3.1415899999999999, 0.002, - 3.1419999999999999, ], [ + -3.1400000000000001, -3.1415899999999999, -0.02, - -3.1400000000000001, ], [ + 31420, 31415.92654, 10, - 31420, ], [ + 31416, 31415.92654, 1, - 31416, ], [ + '#NUM!', 5, -2, - '#NUM!', ], [ + '#VALUE!', 'ABC', 1, - '#VALUE!', ], [ + '#VALUE!', 1.234, 'ABC', - '#VALUE!', ], ]; diff --git a/tests/data/Calculation/MathTrig/MULTINOMIAL.php b/tests/data/Calculation/MathTrig/MULTINOMIAL.php index 3acf01f4..1293a017 100644 --- a/tests/data/Calculation/MathTrig/MULTINOMIAL.php +++ b/tests/data/Calculation/MathTrig/MULTINOMIAL.php @@ -2,16 +2,16 @@ return [ [ + 1260, 2, 3, 4, - 1260, ], [ + 27720, 3, 1, 2, 5, - 27720, ], ]; diff --git a/tests/data/Calculation/MathTrig/ODD.php b/tests/data/Calculation/MathTrig/ODD.php index 706bd46b..7fa0e6f8 100644 --- a/tests/data/Calculation/MathTrig/ODD.php +++ b/tests/data/Calculation/MathTrig/ODD.php @@ -2,55 +2,55 @@ return [ [ + 1, null, - 1, ], [ - 5.4000000000000004, 7, + 5.4000000000000004, ], [ - -5.4000000000000004, -7, + -5.4000000000000004, ], [ + 3, 1.5, - 3, ], [ + 1, 0.10000000000000001, - 1, ], [ 3, 3, ], [ + 3, 2, - 3, ], [ - -2, -3, + -2, ], [ -1, -1, ], [ - 'ABC', '#VALUE!', + 'ABC', ], [ + 1, true, - 1, ], [ + 1, false, - 1, ], [ - 0, 1, + 0, ], ]; diff --git a/tests/data/Calculation/MathTrig/POWER.php b/tests/data/Calculation/MathTrig/POWER.php index 3110460f..e21dd721 100644 --- a/tests/data/Calculation/MathTrig/POWER.php +++ b/tests/data/Calculation/MathTrig/POWER.php @@ -2,408 +2,408 @@ return [ [ - -1.5, - -1.5, '#NUM!', + -1.5, + -1.5, ], [ + '#NUM!', -0.75, -1.5, - '#NUM!', ], [ + '#DIV/0!', 0, -1.5, - '#DIV/0!', ], [ - 0.75, - -1.5, 1.5396007178390001, + 0.75, + -1.5, ], [ + 0.54433105395182002, 1.5, -1.5, - 0.54433105395182002, ], [ - 2.25, - -1.5, 0.2962962962963, + 2.25, + -1.5, ], [ - 3, - -1.5, 0.19245008972988001, + 3, + -1.5, ], [ - 3.75, - -1.5, 0.13770607453181999, + 3.75, + -1.5, ], [ - 4.5, - -1.5, 0.10475656017579001, + 4.5, + -1.5, ], [ + '#NUM!', -1.5, -0.75, - '#NUM!', ], [ - -0.75, - -0.75, '#NUM!', + -0.75, + -0.75, ], [ - 0, - -0.75, '#DIV/0!', + 0, + -0.75, ], [ - 0.75, - -0.75, 1.2408064788027999, + 0.75, + -0.75, ], [ - 1.5, - -0.75, 0.73778794646687995, + 1.5, + -0.75, ], [ - 2.25, - -0.75, 0.54433105395182002, + 2.25, + -0.75, ], [ - 3, - -0.75, 0.43869133765083002, + 3, + -0.75, ], [ - 3.75, - -0.75, 0.37108769116182999, + 3.75, + -0.75, ], [ - 4.5, - -0.75, 0.32366118113822001, + 4.5, + -0.75, ], [ + 1, -1.5, 0, - 1, ], [ + 1, -0.75, 0, - 1, ], [ - 0, - 0, '#NUM!', + 0, + 0, ], [ + 1, 0.75, 0, - 1, ], [ + 1, 1.5, 0, - 1, ], [ + 1, 2.25, 0, - 1, ], [ + 1, 3, 0, - 1, ], [ + 1, 3.75, 0, - 1, ], [ + 1, 4.5, 0, - 1, ], [ + '#NUM!', -1.5, 0.75, - '#NUM!', ], [ + '#NUM!', -0.75, 0.75, - '#NUM!', ], [ 0, - 0.75, 0, + 0.75, ], [ - 0.75, - 0.75, 0.80592744886765999, + 0.75, + 0.75, ], [ - 1.5, - 0.75, 1.3554030054147701, + 1.5, + 0.75, ], [ + 1.8371173070873801, 2.25, 0.75, - 1.8371173070873801, ], [ - 3, - 0.75, 2.2795070569547802, + 3, + 0.75, ], [ - 3.75, - 0.75, 2.6947808397231299, + 3.75, + 0.75, ], [ - 4.5, - 0.75, 3.0896507158606799, + 4.5, + 0.75, ], [ + '#NUM!', -1.5, 1.5, - '#NUM!', ], [ + '#NUM!', -0.75, 1.5, - '#NUM!', ], [ 0, - 1.5, 0, + 1.5, ], [ - 0.75, - 1.5, 0.64951905283833, + 0.75, + 1.5, ], [ - 1.5, - 1.5, 1.8371173070873801, + 1.5, + 1.5, ], [ + 3.375, 2.25, 1.5, - 3.375, ], [ - 3, - 1.5, 5.1961524227066302, + 3, + 1.5, ], [ - 3.75, - 1.5, 7.2618437741389101, + 3.75, + 1.5, ], [ - 4.5, - 1.5, 9.5459415460183905, + 4.5, + 1.5, ], [ + '#NUM!', -1.5, 2.25, - '#NUM!', ], [ + '#NUM!', -0.75, 2.25, - '#NUM!', ], [ 0, - 2.25, 0, + 2.25, ], [ - 0.75, - 2.25, 0.52346523324492999, + 0.75, + 2.25, ], [ - 1.5, - 2.25, 2.4900343193257202, + 1.5, + 2.25, ], [ - 2.25, - 2.25, 6.2002709114199197, + 2.25, + 2.25, ], [ - 3, - 2.25, 11.8446661165724, + 3, + 2.25, ], [ - 3.75, - 2.25, 19.569077463612199, + 3.75, + 2.25, ], [ - 4.5, - 2.25, 29.4936251312199, + 4.5, + 2.25, ], [ - -1.5, - 3, -3.375, + -1.5, + 3, ], [ - -0.75, - 3, -0.421875, + -0.75, + 3, ], [ 0, - 3, 0, + 3, ], [ - 0.75, - 3, 0.421875, + 0.75, + 3, ], [ - 1.5, - 3, 3.375, + 1.5, + 3, ], [ - 2.25, - 3, 11.390625, + 2.25, + 3, ], [ - 3, - 3, 27, + 3, + 3, ], [ - 3.75, - 3, 52.734375, + 3.75, + 3, ], [ - 4.5, - 3, 91.125, + 4.5, + 3, ], [ + '#NUM!', -1.5, 3.75, - '#NUM!', ], [ + '#NUM!', -0.75, 3.75, - '#NUM!', ], [ 0, - 3.75, 0, + 3.75, ], [ - 0.75, - 3.75, 0.34000064249104001, + 0.75, + 3.75, ], [ + 4.5744851432748401, 1.5, 3.75, - 4.5744851432748401, ], [ + 20.9259143260422, 2.25, 3.75, - 20.9259143260422, ], [ + 61.546690537779, 3, 3.75, - 61.546690537779, ], [ - 3.75, - 3.75, 142.10758334477501, + 3.75, + 3.75, ], [ + 281.54442148280401, 4.5, 3.75, - 281.54442148280401, ], [ + '#NUM!', -1.5, 4.5, - '#NUM!', ], [ + '#NUM!', -0.75, 4.5, - '#NUM!', ], [ + 0, 0, 4.5, - 0, ], [ + 0.27401585041616999, 0.75, 4.5, - 0.27401585041616999, ], [ + 6.2002709114199197, 1.5, 4.5, - 6.2002709114199197, ], [ + 38.443359375, 2.25, 4.5, - 38.443359375, ], [ + 140.29611541307901, 3, 4.5, - 140.29611541307901, ], [ + 382.94879277685698, 3.75, 4.5, - 382.94879277685698, ], [ - 4.5, - 4.5, 869.87392338092604, + 4.5, + 4.5, ], ]; diff --git a/tests/data/Calculation/MathTrig/PRODUCT.php b/tests/data/Calculation/MathTrig/PRODUCT.php index 5c6af778..294d29f5 100644 --- a/tests/data/Calculation/MathTrig/PRODUCT.php +++ b/tests/data/Calculation/MathTrig/PRODUCT.php @@ -2,50 +2,50 @@ return [ [ + 2250, 5, 15, 30, - 2250, ], [ + 4500, 5, 15, 30, 2, - 4500, ], [ + 1440, 3, 6, 2, 8, 5, - 1440, ], [ + 12, 3, 4, - 12, ], [ + 54, 3, 4, 4.5, - 54, ], [ + -366.12, 3, 4, 4.5, -6.7800000000000002, - -366.12, ], [ + 732.24000000000001, 3, 4, 4.5, -6.7800000000000002, -2, - 732.24000000000001, ], ]; diff --git a/tests/data/Calculation/MathTrig/QUOTIENT.php b/tests/data/Calculation/MathTrig/QUOTIENT.php index 3561b066..26806356 100644 --- a/tests/data/Calculation/MathTrig/QUOTIENT.php +++ b/tests/data/Calculation/MathTrig/QUOTIENT.php @@ -2,33 +2,33 @@ return [ [ + 2, 5, 2, - 2, ], [ + 1, 4.5, 3.1000000000000001, - 1, ], [ + -3, -10, 3, - -3, ], [ + 4, 10, 2.2000000000000002, - 4, ], [ + 2, 5.5, 2.6669999999999998, - 2, ], [ + -3, -7, 2, - -3, ], ]; diff --git a/tests/data/Calculation/MathTrig/ROMAN.php b/tests/data/Calculation/MathTrig/ROMAN.php index c8770d5c..ddde4ce5 100644 --- a/tests/data/Calculation/MathTrig/ROMAN.php +++ b/tests/data/Calculation/MathTrig/ROMAN.php @@ -2,23 +2,23 @@ return [ [ - 49, 'XLIX', + 49, ], [ - 50, 'L', + 50, ], [ - 2012, 'MMXII', + 2012, ], [ - 999, 'CMXCIX', + 999, ], [ - 499, 'CDXCIX', + 499, ], ]; diff --git a/tests/data/Calculation/MathTrig/ROUNDDOWN.php b/tests/data/Calculation/MathTrig/ROUNDDOWN.php index 878fb050..e8bb7c32 100644 --- a/tests/data/Calculation/MathTrig/ROUNDDOWN.php +++ b/tests/data/Calculation/MathTrig/ROUNDDOWN.php @@ -2,73 +2,73 @@ return [ [ + 662, 662.78999999999996, 0, - 662, ], [ + 662.70000000000005, 662.78999999999996, 1, - 662.70000000000005, ], [ + 50, 54.100000000000001, -1, - 50, ], [ + 50, 55.100000000000001, -1, - 50, ], [ + -23.600000000000001, -23.670000000000002, 1, - -23.600000000000001, ], [ + 3, 3.2000000000000002, 0, - 3, ], [ + 3, 3.2000000000000002, 0.01, - 3, ], [ + 76, 76.900000000000006, 0, - 76, ], [ + 3.141, 3.1415899999999999, 3, - 3.141, ], [ + -3.1000000000000001, -3.1415899999999999, 1, - -3.1000000000000001, ], [ + 31400, 31415.92654, -2, - 31400, ], [ + 31410, 31415.92654, -1, - 31410, ], [ + '#VALUE!', 'ABC', 1, - '#VALUE!', ], [ + '#VALUE!', 1.234, 'ABC', - '#VALUE!', ], ]; diff --git a/tests/data/Calculation/MathTrig/ROUNDUP.php b/tests/data/Calculation/MathTrig/ROUNDUP.php index badcd020..caa7ce37 100644 --- a/tests/data/Calculation/MathTrig/ROUNDUP.php +++ b/tests/data/Calculation/MathTrig/ROUNDUP.php @@ -2,73 +2,73 @@ return [ [ + 663, 662.78999999999996, 0, - 663, ], [ + 662.79999999999995, 662.78999999999996, 1, - 662.79999999999995, ], [ + 60, 54.100000000000001, -1, - 60, ], [ + 60, 55.100000000000001, -1, - 60, ], [ + -23.699999999999999, -23.620000000000001, 1, - -23.699999999999999, ], [ + 4, 3.2000000000000002, 0, - 4, ], [ + 4, 3.2000000000000002, 0.01, - 4, ], [ + 77, 76.900000000000006, 0, - 77, ], [ + 3.1419999999999999, 3.1415899999999999, 3, - 3.1419999999999999, ], [ + -3.2000000000000002, -3.1415899999999999, 1, - -3.2000000000000002, ], [ + 31500, 31415.92654, -2, - 31500, ], [ + 31420, 31415.92654, -1, - 31420, ], [ + '#VALUE!', 'ABC', 1, - '#VALUE!', ], [ + '#VALUE!', 1.234, 'ABC', - '#VALUE!', ], ]; diff --git a/tests/data/Calculation/MathTrig/SERIESSUM.php b/tests/data/Calculation/MathTrig/SERIESSUM.php index c9e22018..4ea9e746 100644 --- a/tests/data/Calculation/MathTrig/SERIESSUM.php +++ b/tests/data/Calculation/MathTrig/SERIESSUM.php @@ -2,6 +2,7 @@ return [ [ + 3905, 5, 1, 1, @@ -14,9 +15,9 @@ return [ 1, ], ], - 3905, ], [ + 3186, 2, 1, 2, @@ -29,6 +30,5 @@ return [ 5, ], ], - 3186, ], ]; diff --git a/tests/data/Calculation/MathTrig/SIGN.php b/tests/data/Calculation/MathTrig/SIGN.php index 9f30b27a..fc6b532e 100644 --- a/tests/data/Calculation/MathTrig/SIGN.php +++ b/tests/data/Calculation/MathTrig/SIGN.php @@ -2,55 +2,55 @@ return [ [ + -1, -1.5, - -1, ], [ -1, -1, ], [ + -1, -0.5, - -1, ], [ 0, 0, ], [ + 1, 0.5, - 1, ], [ 1, 1, ], [ + 1, 1.5, - 1, ], [ + 1, 2, - 1, ], [ + 1, 2.5, - 1, ], [ - 'ABC', '#VALUE!', + 'ABC', ], [ - true, 1, + true, ], [ - false, 0, + false, ], [ - '-3.5', -1, + '-3.5', ], ]; diff --git a/tests/data/Calculation/MathTrig/SQRTPI.php b/tests/data/Calculation/MathTrig/SQRTPI.php index ec5be7ed..8962bd64 100644 --- a/tests/data/Calculation/MathTrig/SQRTPI.php +++ b/tests/data/Calculation/MathTrig/SQRTPI.php @@ -2,63 +2,63 @@ return [ [ - 'ABC', '#VALUE!', + 'ABC', ], [ + '#NUM!', -1.5, - '#NUM!', ], [ + '#NUM!', -1, - '#NUM!', ], [ + '#NUM!', -0.5, - '#NUM!', ], [ - 0, 0.0, + 0, ], [ - 0.5, 1.2533141373154999, + 0.5, ], [ - 1, 1.7724538509055201, + 1, ], [ - 1.5, 2.1708037636748001, + 1.5, ], [ - 2, 2.5066282746309998, + 2, ], [ - 2.5, 2.80249560819896, + 2.5, ], [ - 3, 3.0699801238394699, + 3, ], [ - 3.5, 3.31595752197827, + 3.5, ], [ - 4, 3.54490770181103, + 4, ], [ - 4.5, 3.7599424119465001, + 4.5, ], [ - 5, 3.9633272976060101, + 5, ], ]; diff --git a/tests/data/Calculation/MathTrig/SUMIF.php b/tests/data/Calculation/MathTrig/SUMIF.php new file mode 100644 index 00000000..0b94701a --- /dev/null +++ b/tests/data/Calculation/MathTrig/SUMIF.php @@ -0,0 +1,61 @@ +=5', + ], + [ + 10, + [ + ['text'], + [2], + ], + '=text', + [ + [10], + [100], + ], + ], + [ + 10, + [ + ['"text with quotes"'], + [2], + ], + '="text with quotes"', + [ + [10], + [100], + ], + ], + [ + 10, + [ + ['"text with quotes"'], + [''], + ], + '>"', // Compare to the single characater " (double quote) + [ + [10], + [100], + ], + ], + [ + 100, + [ + [''], + ['anything'], + ], + '>"', // Compare to the single characater " (double quote) + [ + [10], + [100], + ], + ], +]; diff --git a/tests/data/Calculation/MathTrig/SUMSQ.php b/tests/data/Calculation/MathTrig/SUMSQ.php index 865a689f..5661f01f 100644 --- a/tests/data/Calculation/MathTrig/SUMSQ.php +++ b/tests/data/Calculation/MathTrig/SUMSQ.php @@ -2,46 +2,46 @@ return [ [ + 25, 3, 4, - 25, ], [ + 39, 5, 2, 1, 3, - 39, ], [ + 66, 5, 2, 1, 6, - 66, ], [ + 10, 1, 3, - 10, ], [ + 30, 1, 3, 2, 4, - 30, ], [ + 83, 3, 5, 7, - 83, ], [ + 14, 1, 2, 3, - 14, ], ]; diff --git a/tests/data/Calculation/MathTrig/TRUNC.php b/tests/data/Calculation/MathTrig/TRUNC.php index 7717225a..14627dbf 100644 --- a/tests/data/Calculation/MathTrig/TRUNC.php +++ b/tests/data/Calculation/MathTrig/TRUNC.php @@ -2,98 +2,98 @@ return [ [ - 3.1415899999999999, - 2, 3.1400000000000001, + 3.1415899999999999, + 2, ], [ + 3.141, 3.1415899999999999, 3, - 3.141, ], [ + -3.1400000000000001, -3.1415899999999999, 2, - -3.1400000000000001, ], [ + -3.141, -3.1415899999999999, 3, - -3.141, ], [ 31415.92654, - 10, 31415.92654, + 10, ], [ + -31415.92654, -31415.92654, 10, - -31415.92654, ], [ + 31415.919999999998, 31415.92654, 2, - 31415.919999999998, ], [ + 31400, 31415.92654, -2, - 31400, ], [ + 0, 31415.92654, -10, - 0, ], [ + 0, -31415.92654, -10, - 0, ], [ + 12000, 12345.678900000001, -3, - 12000, ], [ + 12300, 12345.678900000001, -2, - 12300, ], [ + 12340, 12345.678900000001, -1, - 12340, ], [ + 12345, 12345.678900000001, 0, - 12345, ], [ + 12345.6, 12345.678900000001, 1, - 12345.6, ], [ + 12345.67, 12345.678900000001, 2, - 12345.67, ], [ + 12345.678, 12345.678900000001, 3, - 12345.678, ], [ + '#VALUE!', 'ABC', 2, - '#VALUE!', ], [ + '#VALUE!', 31415.92654, 'ABC', - '#VALUE!', ], ]; diff --git a/tests/data/Calculation/TextData/CHAR.php b/tests/data/Calculation/TextData/CHAR.php index 950e9299..1751699c 100644 --- a/tests/data/Calculation/TextData/CHAR.php +++ b/tests/data/Calculation/TextData/CHAR.php @@ -1,15 +1,48 @@ 19-Dec-1960 05:00:00 UTC - [25569, 'America/New_York', 18000], // 01-Jan-1970 00:00:00 EST => 01-Jan-1970 05:00:00 UTC PHP Base Date - [30292, 'America/New_York', 408085200], // 07-Dec-1982 00:00:00 EST => 07-Dec-1982 05:00:00 UTC - [39611, 'America/New_York', 1213243200], // 12-Jun-2008 00:00:00 EDT => 12-Jun-2008 04:00:00 UTC - [50424, 'America/New_York', 2147490000], // 19-Jan-2038 00:00:00 EST => 19-Jan-2038 05:00:00 UTC PHP 32-bit Latest Date - [22345.56789, 'America/New_York', -278486534], // 05-Mar-1961 13:37:46 EST => 05-Mar-1961 18:37:46 UTC - [22345.6789, 'America/New_York', -278476943], // 05-Mar-1961 16:17:37 EST => 05-Mar-1961 21:17:37 UTC - [0.5, 'America/New_York', 61200], // 12:00:00 EST => 17:00:00 UTC - [0.75, 'America/New_York', 82800], // 18:00.00 EST => 23:00:00 UTC - [0.12345, 'America/New_York', 28666], // 02:57:46 EST => 07:57:46 UTC - [41215, 'America/New_York', 1351828800], // 02-Nov-2012 00:00:00 EDT => 02-Nov-2012 04:00:00 UTC - [22269, 'Pacific/Auckland', -285163200], // 19-Dec-1960 00:00:00 NZST => 18-Dec-1960 12:00:00 UTC - [25569, 'Pacific/Auckland', -43200], // 01-Jan-1970 00:00:00 NZST => 31-Dec-1969 12:00:00 UTC PHP Base Date - [30292, 'Pacific/Auckland', 408020400], // 07-Dec-1982 00:00:00 NZDT => 06-Dec-1982 11:00:00 UTC - [39611, 'Pacific/Auckland', 1213185600], // 12-Jun-2008 00:00:00 NZST => 11-Jun-2008 12:00:00 UTC - [50423.5, 'Pacific/Auckland', 2147382000], // 18-Jan-2038 12:00:00 NZDT => 17-Jan-2038 23:00:00 UTC PHP 32-bit Latest Date - [22345.56789, 'Pacific/Auckland', -278547734], // 05-Mar-1961 13:37:46 NZST => 05-Mar-1961 01:37:46 UTC - [22345.6789, 'Pacific/Auckland', -278538143], // 05-Mar-1961 16:17:37 NZST => 05-Mar-1961 04:17:37 UTC - [0.5, 'Pacific/Auckland', 0], // 12:00:00 NZST => 00:00:00 UTC - [0.75, 'Pacific/Auckland', 21600], // 18:00.00 NZST => 06:00:00 UTC - [0.12345, 'Pacific/Auckland', -32534], // 02:57:46 NZST => 14:57:46 UTC - [41215, 'Pacific/Auckland', 1351767600], // 02-Nov-2012 00:00:00 NZDT => 01-Nov-2012 11:00:00 UTC + // 19-Dec-1960 00:00:00 EST => 19-Dec-1960 05:00:00 UTC + [ + -285102000, + 22269, + 'America/New_York', + ], + // 01-Jan-1970 00:00:00 EST => 01-Jan-1970 05:00:00 UTC PHP Base Date + [ + 18000, + 25569, + 'America/New_York', + ], + // 07-Dec-1982 00:00:00 EST => 07-Dec-1982 05:00:00 UTC + [ + 408085200, + 30292, + 'America/New_York', + ], + // 12-Jun-2008 00:00:00 EDT => 12-Jun-2008 04:00:00 UTC + [ + 1213243200, + 39611, + 'America/New_York', + ], + // 19-Jan-2038 00:00:00 EST => 19-Jan-2038 05:00:00 UTC PHP 32-bit Latest Date + [ + 2147490000, + 50424, + 'America/New_York', + ], + // 05-Mar-1961 13:37:46 EST => 05-Mar-1961 18:37:46 UTC + [ + -278486534, + 22345.56789, + 'America/New_York', + ], + // 05-Mar-1961 16:17:37 EST => 05-Mar-1961 21:17:37 UTC + [ + -278476943, + 22345.6789, + 'America/New_York', + ], + // 12:00:00 EST => 17:00:00 UTC + [ + 61200, + 0.5, + 'America/New_York', + ], + // 18:00.00 EST => 23:00:00 UTC + [ + 82800, + 0.75, + 'America/New_York', + ], + // 02:57:46 EST => 07:57:46 UTC + [ + 28666, + 0.12345, + 'America/New_York', + ], + // 02-Nov-2012 00:00:00 EDT => 02-Nov-2012 04:00:00 UTC + [ + 1351828800, + 41215, + 'America/New_York', + ], + // 19-Dec-1960 00:00:00 NZST => 18-Dec-1960 12:00:00 UTC + [ + -285163200, + 22269, + 'Pacific/Auckland', + ], + // 01-Jan-1970 00:00:00 NZST => 31-Dec-1969 12:00:00 UTC PHP Base Date + [ + -43200, + 25569, + 'Pacific/Auckland', + ], + // 07-Dec-1982 00:00:00 NZDT => 06-Dec-1982 11:00:00 UTC + [ + 408020400, + 30292, + 'Pacific/Auckland', + ], + // 12-Jun-2008 00:00:00 NZST => 11-Jun-2008 12:00:00 UTC + [ + 1213185600, + 39611, + 'Pacific/Auckland', + ], + // 18-Jan-2038 12:00:00 NZDT => 17-Jan-2038 23:00:00 UTC PHP 32-bit Latest Date + [ + 2147382000, + 50423.5, + 'Pacific/Auckland', + ], + // 05-Mar-1961 13:37:46 NZST => 05-Mar-1961 01:37:46 UTC + [ + -278547734, + 22345.56789, + 'Pacific/Auckland', + ], + // 05-Mar-1961 16:17:37 NZST => 05-Mar-1961 04:17:37 UTC + [ + -278538143, + 22345.6789, + 'Pacific/Auckland', + ], + // 12:00:00 NZST => 00:00:00 UTC + [ + 0, + 0.5, + 'Pacific/Auckland', + ], + // 18:00.00 NZST => 06:00:00 UTC + [ + 21600, + 0.75, + 'Pacific/Auckland', + ], + // 02:57:46 NZST => 14:57:46 UTC + [ + -32534, + 0.12345, + 'Pacific/Auckland', + ], + // 02-Nov-2012 00:00:00 NZDT => 01-Nov-2012 11:00:00 UTC + [ + 1351767600, + 41215, + 'Pacific/Auckland', + ], ]; diff --git a/tests/data/Shared/Date/ExcelToTimestamp1904.php b/tests/data/Shared/Date/ExcelToTimestamp1904.php index 30ef1ae9..e0f30754 100644 --- a/tests/data/Shared/Date/ExcelToTimestamp1904.php +++ b/tests/data/Shared/Date/ExcelToTimestamp1904.php @@ -1,14 +1,45 @@