PhpSpreadsheet/tests/data/Calculation
Mark Baker a911e9bb7b
Calculation engine empty arguments (#2143)
* Initia work on differentiating between empty arguments and null arguments passed to Excel functions

Previously we always passed a null value for an empty argument (i.e. where there was an argument separator in the function call without an argument.... PHP doesn't support empty arguments, so we needed to provide some value but then it wasn't possible to differentiate between a genuine null argument (either a literal null, or a null cell value) and the null that we were passing to represent an empty argument value.

This change evaluates empty arguments within the calculation engine, and instead of passing a null, it reads the signature of the required Excel function, and passes the default value for that argument; so now a null argument really does mean a null value argument.

* If the Excel function implementation doesn't accept any arguments; or once we reach a variadic argument, or try to pass more arguments than the method supports in its signature, then there's no point in checking for defaults, and to do so will lead to PHP errors, so break out of the default replacement loop
2021-06-10 08:49:53 +02:00
..
DateTime Calculation engine empty arguments (#2143) 2021-06-10 08:49:53 +02:00
DefinedNames Named formula implementation, and improved handling of Defined Names generally (#1535) 2020-07-26 12:00:06 +02:00
Engineering New Bessel Algorithm, providing a higher degree of accuracy and precision (#1946) 2021-03-24 13:29:54 +01:00
Financial Error in COUPNCD (#2119) 2021-05-29 12:02:36 +02:00
Functions Fixed Functions->ifCondition for allowing <> and empty condition 2019-11-17 21:03:11 +01:00
Logical Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
LookupRef Typehinting to keep phpstan happy 2021-05-29 13:35:42 +02:00
MathTrig Fix for Issue 2042 (SUM Partially Broken) (#2045) 2021-05-03 18:31:01 +02:00
Statistical A couple of extra unit tests 2021-05-14 14:35:23 +02:00
TextData Additional language data, and improved automated build of translation files for Calculation Engine locale 2021-05-20 20:41:09 +02:00
Web Initial implementation of the URLENCODE() web function (#2031) 2021-04-28 17:10:36 +02:00
Calculation.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
FunctionsAsString.php MATCH with a static array should return the position of the found value based on the values submitted. 2020-04-26 22:09:31 +09:00
Translations.php Additional language data, and improved automated build of translation files for Calculation Engine locale 2021-05-20 20:41:09 +02:00