Array-enable the ISFORMULA() function (#2610)
Implement Array-enabled for ERROR.TYPE() function Extract ERROR.TYPE() function tests into separate test file Extract error function tests into separate test files And thus complete the implemented Information functions
This commit is contained in:
parent
35b65bef8c
commit
0ee4d96576
|
|
@ -131,23 +131,6 @@ class Functions
|
||||||
return '#Not Yet Implemented';
|
return '#Not Yet Implemented';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* NULL.
|
|
||||||
*
|
|
||||||
* Returns the error value #NULL!
|
|
||||||
*
|
|
||||||
* @Deprecated 1.23.0
|
|
||||||
*
|
|
||||||
* @return string #NULL!
|
|
||||||
*
|
|
||||||
*@see Information\ExcelError::null()
|
|
||||||
* Use the null() method in the Information\Error class instead
|
|
||||||
*/
|
|
||||||
public static function null()
|
|
||||||
{
|
|
||||||
return Information\ExcelError::null();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function isMatrixValue($idx)
|
public static function isMatrixValue($idx)
|
||||||
{
|
{
|
||||||
return (substr_count($idx, '.') <= 1) || (preg_match('/\.[A-Z]/', $idx) > 0);
|
return (substr_count($idx, '.') <= 1) || (preg_match('/\.[A-Z]/', $idx) > 0);
|
||||||
|
|
@ -215,6 +198,23 @@ class Functions
|
||||||
return $operand;
|
return $operand;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NULL.
|
||||||
|
*
|
||||||
|
* Returns the error value #NULL!
|
||||||
|
*
|
||||||
|
* @Deprecated 1.23.0
|
||||||
|
*
|
||||||
|
* @return string #NULL!
|
||||||
|
*
|
||||||
|
*@see Information\ExcelError::null()
|
||||||
|
* Use the null() method in the Information\Error class instead
|
||||||
|
*/
|
||||||
|
public static function null()
|
||||||
|
{
|
||||||
|
return Information\ExcelError::null();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NaN.
|
* NaN.
|
||||||
*
|
*
|
||||||
|
|
@ -326,7 +326,7 @@ class Functions
|
||||||
*
|
*
|
||||||
* @Deprecated 1.23.0
|
* @Deprecated 1.23.0
|
||||||
*
|
*
|
||||||
* @return int|string
|
* @return array|int|string
|
||||||
*
|
*
|
||||||
* @see Information\ExcelError::type()
|
* @see Information\ExcelError::type()
|
||||||
* Use the type() method in the Information\Error class instead
|
* Use the type() method in the Information\Error class instead
|
||||||
|
|
@ -668,7 +668,7 @@ class Functions
|
||||||
* @param mixed $cellReference The cell to check
|
* @param mixed $cellReference The cell to check
|
||||||
* @param ?Cell $cell The current cell (containing this formula)
|
* @param ?Cell $cell The current cell (containing this formula)
|
||||||
*
|
*
|
||||||
* @return bool|string
|
* @return array|bool|string
|
||||||
*/
|
*/
|
||||||
public static function isFormula($cellReference = '', ?Cell $cell = null)
|
public static function isFormula($cellReference = '', ?Cell $cell = null)
|
||||||
{
|
{
|
||||||
|
|
@ -698,4 +698,13 @@ class Functions
|
||||||
{
|
{
|
||||||
return Worksheet::pregReplace('/:[\\w\$]+$/', '', $coordinate);
|
return Worksheet::pregReplace('/:[\\w\$]+$/', '', $coordinate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function trimSheetFromCellReference(string $coordinate): string
|
||||||
|
{
|
||||||
|
while (strpos($coordinate, '!') !== false) {
|
||||||
|
$coordinate = substr($coordinate, strpos($coordinate, '!') + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $coordinate;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,12 @@
|
||||||
|
|
||||||
namespace PhpOffice\PhpSpreadsheet\Calculation\Information;
|
namespace PhpOffice\PhpSpreadsheet\Calculation\Information;
|
||||||
|
|
||||||
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
use PhpOffice\PhpSpreadsheet\Calculation\ArrayEnabled;
|
||||||
|
|
||||||
class ExcelError
|
class ExcelError
|
||||||
{
|
{
|
||||||
|
use ArrayEnabled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of error codes.
|
* List of error codes.
|
||||||
*
|
*
|
||||||
|
|
@ -27,11 +29,13 @@ class ExcelError
|
||||||
*
|
*
|
||||||
* @param mixed $value Value to check
|
* @param mixed $value Value to check
|
||||||
*
|
*
|
||||||
* @return int|string
|
* @return array|int|string
|
||||||
*/
|
*/
|
||||||
public static function type($value = '')
|
public static function type($value = '')
|
||||||
{
|
{
|
||||||
$value = Functions::flattenSingleValue($value);
|
if (is_array($value)) {
|
||||||
|
return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $value);
|
||||||
|
}
|
||||||
|
|
||||||
$i = 1;
|
$i = 1;
|
||||||
foreach (self::$errorCodes as $errorCode) {
|
foreach (self::$errorCodes as $errorCode) {
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ use PhpOffice\PhpSpreadsheet\Calculation\ArrayEnabled;
|
||||||
use PhpOffice\PhpSpreadsheet\Calculation\Calculation;
|
use PhpOffice\PhpSpreadsheet\Calculation\Calculation;
|
||||||
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
||||||
use PhpOffice\PhpSpreadsheet\Cell\Cell;
|
use PhpOffice\PhpSpreadsheet\Cell\Cell;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Cell\Coordinate;
|
||||||
|
|
||||||
class Value
|
class Value
|
||||||
{
|
{
|
||||||
|
|
@ -170,26 +171,36 @@ class Value
|
||||||
* @param mixed $cellReference The cell to check
|
* @param mixed $cellReference The cell to check
|
||||||
* @param ?Cell $cell The current cell (containing this formula)
|
* @param ?Cell $cell The current cell (containing this formula)
|
||||||
*
|
*
|
||||||
* @return bool|string
|
* @return array|bool|string
|
||||||
*/
|
*/
|
||||||
public static function isFormula($cellReference = '', ?Cell $cell = null)
|
public static function isFormula($cellReference = '', ?Cell $cell = null)
|
||||||
{
|
{
|
||||||
if ($cell === null) {
|
if ($cell === null) {
|
||||||
return ExcelError::REF();
|
return ExcelError::REF();
|
||||||
}
|
}
|
||||||
$cellReference = Functions::expandDefinedName((string) $cellReference, $cell);
|
|
||||||
$cellReference = Functions::trimTrailingRange($cellReference);
|
|
||||||
|
|
||||||
preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellReference, $matches);
|
$fullCellReference = Functions::expandDefinedName((string) $cellReference, $cell);
|
||||||
|
|
||||||
$cellReference = $matches[6] . $matches[7];
|
if (strpos($cellReference, '!') !== false) {
|
||||||
|
$cellReference = Functions::trimSheetFromCellReference($cellReference);
|
||||||
|
$cellReferences = Coordinate::extractAllCellReferencesInRange($cellReference);
|
||||||
|
if (count($cellReferences) > 1) {
|
||||||
|
return self::evaluateArrayArgumentsSubset([self::class, __FUNCTION__], 1, $cellReferences, $cell);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$fullCellReference = Functions::trimTrailingRange($fullCellReference);
|
||||||
|
|
||||||
|
preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $fullCellReference, $matches);
|
||||||
|
|
||||||
|
$fullCellReference = $matches[6] . $matches[7];
|
||||||
$worksheetName = str_replace("''", "'", trim($matches[2], "'"));
|
$worksheetName = str_replace("''", "'", trim($matches[2], "'"));
|
||||||
|
|
||||||
$worksheet = (!empty($worksheetName))
|
$worksheet = (!empty($worksheetName))
|
||||||
? $cell->getWorksheet()->getParent()->getSheetByName($worksheetName)
|
? $cell->getWorksheet()->getParent()->getSheetByName($worksheetName)
|
||||||
: $cell->getWorksheet();
|
: $cell->getWorksheet();
|
||||||
|
|
||||||
return ($worksheet !== null) ? $worksheet->getCell($cellReference)->isFormula() : ExcelError::REF();
|
return ($worksheet !== null) ? $worksheet->getCell($fullCellReference)->isFormula() : ExcelError::REF();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -280,7 +280,7 @@ class Cell
|
||||||
*/
|
*/
|
||||||
public function getCalculatedValue($resetLog = true)
|
public function getCalculatedValue($resetLog = true)
|
||||||
{
|
{
|
||||||
if ($this->dataType == DataType::TYPE_FORMULA) {
|
if ($this->dataType === DataType::TYPE_FORMULA) {
|
||||||
try {
|
try {
|
||||||
$index = $this->getWorksheet()->getParent()->getActiveSheetIndex();
|
$index = $this->getWorksheet()->getParent()->getActiveSheetIndex();
|
||||||
$selected = $this->getWorksheet()->getSelectedCells();
|
$selected = $this->getWorksheet()->getSelectedCells();
|
||||||
|
|
@ -379,20 +379,16 @@ class Cell
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Identify if the cell contains a formula.
|
* Identify if the cell contains a formula.
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
*/
|
||||||
public function isFormula()
|
public function isFormula(): bool
|
||||||
{
|
{
|
||||||
return $this->dataType == DataType::TYPE_FORMULA;
|
return $this->dataType === DataType::TYPE_FORMULA && $this->getStyle()->getQuotePrefix() === false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Does this cell contain Data validation rules?
|
* Does this cell contain Data validation rules?
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
*/
|
||||||
public function hasDataValidation()
|
public function hasDataValidation(): bool
|
||||||
{
|
{
|
||||||
if (!isset($this->parent)) {
|
if (!isset($this->parent)) {
|
||||||
throw new Exception('Cannot check for data validation when cell is not bound to a worksheet');
|
throw new Exception('Cannot check for data validation when cell is not bound to a worksheet');
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information;
|
||||||
|
|
||||||
|
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
class Div0Test extends TestCase
|
||||||
|
{
|
||||||
|
public function testDIV0(): void
|
||||||
|
{
|
||||||
|
$result = ExcelError::DIV0();
|
||||||
|
self::assertEquals('#DIV/0!', $result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information;
|
||||||
|
|
||||||
|
use PhpOffice\PhpSpreadsheet\Calculation\Calculation;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
class ErrorTypeTest extends TestCase
|
||||||
|
{
|
||||||
|
public function testErrorTypeNoArgument(): void
|
||||||
|
{
|
||||||
|
$result = Functions::errorType();
|
||||||
|
self::assertSame(ExcelError::NA(), $result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dataProvider providerErrorType
|
||||||
|
*
|
||||||
|
* @param int|string $expectedResult
|
||||||
|
* @param mixed $value
|
||||||
|
*/
|
||||||
|
public function testErrorType($expectedResult, $value): void
|
||||||
|
{
|
||||||
|
$result = Functions::errorType($value);
|
||||||
|
self::assertSame($expectedResult, $result);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function providerErrorType(): array
|
||||||
|
{
|
||||||
|
return require 'tests/data/Calculation/Information/ERROR_TYPE.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dataProvider providerErrorTypeArray
|
||||||
|
*/
|
||||||
|
public function testErrorTypeArray(array $expectedResult, string $values): void
|
||||||
|
{
|
||||||
|
$calculation = Calculation::getInstance();
|
||||||
|
|
||||||
|
$formula = "=ERROR.TYPE({$values})";
|
||||||
|
$result = $calculation->_calculateFormulaValue($formula);
|
||||||
|
self::assertEquals($expectedResult, $result);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function providerErrorTypeArray(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'vector' => [
|
||||||
|
[[2, 4, 7, ExcelError::NA(), ExcelError::NA(), ExcelError::NA(), 5]],
|
||||||
|
'{5/0, "#REF!", "#N/A", 1.2, TRUE, "PHP", "#NAME?"}',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -46,8 +46,8 @@ class IsErrorTest extends TestCase
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'vector' => [
|
'vector' => [
|
||||||
[[true, true, true, false, false, false]],
|
[[true, true, true, false, false, false, false]],
|
||||||
'{5/0, "#REF!", "#N/A", 1.2, TRUE, "PHP"}',
|
'{5/0, "#REF!", "#N/A", 1.2, TRUE, "PHP", null}',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace PhpOffice\PhpSpreadsheetTests\Calculation;
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information;
|
||||||
|
|
||||||
|
use PhpOffice\PhpSpreadsheet\Calculation\Calculation;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Cell\DataType;
|
||||||
use PhpOffice\PhpSpreadsheet\NamedRange as NamedRange;
|
use PhpOffice\PhpSpreadsheet\NamedRange as NamedRange;
|
||||||
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
@ -87,4 +89,26 @@ class IsFormulaTest extends TestCase
|
||||||
|
|
||||||
$spreadsheet->disconnectWorksheets();
|
$spreadsheet->disconnectWorksheets();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testIsFormulaArray(): void
|
||||||
|
{
|
||||||
|
$spreadsheet = new Spreadsheet();
|
||||||
|
$sheet = $spreadsheet->getActiveSheet();
|
||||||
|
$sheet->getCell('A1')->setValue('=5/2');
|
||||||
|
$sheet->getCell('A2')->setValueExplicit('=5/2', DataType::TYPE_STRING);
|
||||||
|
$sheet->getCell('A3')->setValue('=5/0');
|
||||||
|
$sheet->getCell('A4')->setValue(2.5);
|
||||||
|
$sheet->getCell('A5')->setValue('=NA()');
|
||||||
|
$sheet->getCell('A6')->setValue(true);
|
||||||
|
$sheet->getCell('A7')->setValue('=5/0');
|
||||||
|
$sheet->getCell('A7')->getStyle()->setQuotePrefix(true);
|
||||||
|
|
||||||
|
$calculation = Calculation::getInstance($spreadsheet);
|
||||||
|
|
||||||
|
$formula = '=ISFORMULA(A1:A7)';
|
||||||
|
$result = $calculation->_calculateFormulaValue($formula, 'C1', $sheet->getCell('C1'));
|
||||||
|
self::assertEquals([true, false, true, false, true, false, false], $result);
|
||||||
|
|
||||||
|
$spreadsheet->disconnectWorksheets();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information;
|
||||||
|
|
||||||
|
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
class NaTest extends TestCase
|
||||||
|
{
|
||||||
|
public function testNA(): void
|
||||||
|
{
|
||||||
|
$result = ExcelError::NA();
|
||||||
|
self::assertEquals('#N/A', $result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information;
|
||||||
|
|
||||||
|
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
class NameTest extends TestCase
|
||||||
|
{
|
||||||
|
public function testNAME(): void
|
||||||
|
{
|
||||||
|
$result = ExcelError::NAME();
|
||||||
|
self::assertEquals('#NAME?', $result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information;
|
||||||
|
|
||||||
|
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
class NanTest extends TestCase
|
||||||
|
{
|
||||||
|
public function testNAN(): void
|
||||||
|
{
|
||||||
|
$result = ExcelError::NAN();
|
||||||
|
self::assertEquals('#NUM!', $result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information;
|
||||||
|
|
||||||
|
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
class NullTest extends TestCase
|
||||||
|
{
|
||||||
|
public function testNULL(): void
|
||||||
|
{
|
||||||
|
$result = Functions::null();
|
||||||
|
self::assertEquals('#NULL!', $result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information;
|
||||||
|
|
||||||
|
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
class RefTest extends TestCase
|
||||||
|
{
|
||||||
|
public function testREF(): void
|
||||||
|
{
|
||||||
|
$result = ExcelError::REF();
|
||||||
|
self::assertEquals('#REF!', $result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information;
|
||||||
|
|
||||||
|
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
class ValueTest extends TestCase
|
||||||
|
{
|
||||||
|
public function testVALUE(): void
|
||||||
|
{
|
||||||
|
$result = ExcelError::VALUE();
|
||||||
|
self::assertEquals('#VALUE!', $result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -74,64 +74,6 @@ class FunctionsTest extends TestCase
|
||||||
self::assertEquals('#Not Yet Implemented', $result);
|
self::assertEquals('#Not Yet Implemented', $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDIV0(): void
|
|
||||||
{
|
|
||||||
$result = ExcelError::DIV0();
|
|
||||||
self::assertEquals('#DIV/0!', $result);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testNA(): void
|
|
||||||
{
|
|
||||||
$result = ExcelError::NA();
|
|
||||||
self::assertEquals('#N/A', $result);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testNAN(): void
|
|
||||||
{
|
|
||||||
$result = ExcelError::NAN();
|
|
||||||
self::assertEquals('#NUM!', $result);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testNAME(): void
|
|
||||||
{
|
|
||||||
$result = ExcelError::NAME();
|
|
||||||
self::assertEquals('#NAME?', $result);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testREF(): void
|
|
||||||
{
|
|
||||||
$result = ExcelError::REF();
|
|
||||||
self::assertEquals('#REF!', $result);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testNULL(): void
|
|
||||||
{
|
|
||||||
$result = Functions::null();
|
|
||||||
self::assertEquals('#NULL!', $result);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testVALUE(): void
|
|
||||||
{
|
|
||||||
$result = ExcelError::VALUE();
|
|
||||||
self::assertEquals('#VALUE!', $result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @dataProvider providerErrorType
|
|
||||||
*
|
|
||||||
* @param mixed $expectedResult
|
|
||||||
*/
|
|
||||||
public function testErrorType($expectedResult, ...$args): void
|
|
||||||
{
|
|
||||||
$result = Functions::errorType(...$args);
|
|
||||||
self::assertEqualsWithDelta($expectedResult, $result, 1E-8);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function providerErrorType(): array
|
|
||||||
{
|
|
||||||
return require 'tests/data/Calculation/Functions/ERROR_TYPE.php';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider providerIfCondition
|
* @dataProvider providerIfCondition
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
[
|
|
||||||
'#N/A',
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
'#N/A',
|
'#N/A',
|
||||||
null,
|
null,
|
||||||
Loading…
Reference in New Issue