Fix unit tests
This commit is contained in:
parent
09eb05f367
commit
54efe8824e
|
@ -3942,7 +3942,7 @@ class Calculation
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process the argument with the appropriate function call
|
// Process the argument with the appropriate function call
|
||||||
$args = $this->addCellReference($args, $passCellReference, $pCell, $functionCall);
|
$args = $this->addCellReference($args, $passCellReference, $functionCall, $pCell);
|
||||||
|
|
||||||
if (!is_array($functionCall)) {
|
if (!is_array($functionCall)) {
|
||||||
foreach ($args as &$arg) {
|
foreach ($args as &$arg) {
|
||||||
|
@ -4440,14 +4440,15 @@ class Calculation
|
||||||
*
|
*
|
||||||
* @param array $args
|
* @param array $args
|
||||||
* @param bool $passCellReference
|
* @param bool $passCellReference
|
||||||
* @param Cell $pCell
|
* @param array|string $functionCall
|
||||||
* @param array $functionCall
|
* @param null|Cell $pCell
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
private function addCellReference(array $args, $passCellReference, Cell $pCell, array $functionCall)
|
private function addCellReference(array $args, $passCellReference, $functionCall, Cell $pCell = null)
|
||||||
{
|
{
|
||||||
if ($passCellReference) {
|
if ($passCellReference) {
|
||||||
|
if (is_array($functionCall)) {
|
||||||
$className = $functionCall[0];
|
$className = $functionCall[0];
|
||||||
$methodName = $functionCall[1];
|
$methodName = $functionCall[1];
|
||||||
|
|
||||||
|
@ -4456,6 +4457,7 @@ class Calculation
|
||||||
while (count($args) < $argumentCount - 1) {
|
while (count($args) < $argumentCount - 1) {
|
||||||
$args[] = null;
|
$args[] = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$args[] = $pCell;
|
$args[] = $pCell;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue