diff --git a/src/PhpSpreadsheet/Calculation/Calculation.php b/src/PhpSpreadsheet/Calculation/Calculation.php index 00b8c22e..eee4a41f 100644 --- a/src/PhpSpreadsheet/Calculation/Calculation.php +++ b/src/PhpSpreadsheet/Calculation/Calculation.php @@ -2314,7 +2314,7 @@ class Calculation ], 'SUM' => [ 'category' => Category::CATEGORY_MATH_AND_TRIG, - 'functionCall' => [MathTrig\Sum::class, 'funcSumNoStrings'], + 'functionCall' => [MathTrig\Sum::class, 'sumErroringStrings'], 'argumentCount' => '1+', ], 'SUMIF' => [ diff --git a/src/PhpSpreadsheet/Calculation/Database/DSum.php b/src/PhpSpreadsheet/Calculation/Database/DSum.php index e7e28a4a..03841c4e 100644 --- a/src/PhpSpreadsheet/Calculation/Database/DSum.php +++ b/src/PhpSpreadsheet/Calculation/Database/DSum.php @@ -38,7 +38,7 @@ class DSum extends DatabaseAbstract return null; } - return MathTrig\Sum::funcSum( + return MathTrig\Sum::sumIgnoringStrings( self::getFilteredColumn($database, $field, $criteria) ); } diff --git a/src/PhpSpreadsheet/Calculation/MathTrig.php b/src/PhpSpreadsheet/Calculation/MathTrig.php index 8c26ec70..0ad590e2 100644 --- a/src/PhpSpreadsheet/Calculation/MathTrig.php +++ b/src/PhpSpreadsheet/Calculation/MathTrig.php @@ -771,8 +771,8 @@ class MathTrig * * @Deprecated 1.18.0 * - * @See MathTrig\Sum::funcSumNoStrings() - * Use the funcSumNoStrings method in the MathTrig\Sum class instead + * @See MathTrig\Sum::sumErroringStrings() + * Use the sumErroringStrings method in the MathTrig\Sum class instead * * Excel Function: * SUM(value1[,value2[, ...]]) @@ -783,7 +783,7 @@ class MathTrig */ public static function SUM(...$args) { - return MathTrig\Sum::funcSum(...$args); + return MathTrig\Sum::sumIgnoringStrings(...$args); } /** diff --git a/src/PhpSpreadsheet/Calculation/MathTrig/Subtotal.php b/src/PhpSpreadsheet/Calculation/MathTrig/Subtotal.php index 0700a5d8..c60842f7 100644 --- a/src/PhpSpreadsheet/Calculation/MathTrig/Subtotal.php +++ b/src/PhpSpreadsheet/Calculation/MathTrig/Subtotal.php @@ -60,7 +60,7 @@ class Subtotal [Product::class, 'evaluate'], // 6 [Statistical\StandardDeviations::class, 'STDEV'], // 7 [Statistical\StandardDeviations::class, 'STDEVP'], // 8 - [Sum::class, 'funcSum'], // 9 + [Sum::class, 'sumIgnoringStrings'], // 9 [Statistical\Variances::class, 'VAR'], // 10 [Statistical\Variances::class, 'VARP'], // 11 ]; diff --git a/src/PhpSpreadsheet/Calculation/MathTrig/Sum.php b/src/PhpSpreadsheet/Calculation/MathTrig/Sum.php index 8a3223b1..cffa68c5 100644 --- a/src/PhpSpreadsheet/Calculation/MathTrig/Sum.php +++ b/src/PhpSpreadsheet/Calculation/MathTrig/Sum.php @@ -18,7 +18,7 @@ class Sum * * @return float|string */ - public static function funcSum(...$args) + public static function sumIgnoringStrings(...$args) { $returnValue = 0; @@ -47,7 +47,7 @@ class Sum * * @return float|string */ - public static function funcSumNoStrings(...$args) + public static function sumErroringStrings(...$args) { $returnValue = 0; // Loop through the arguments