PSR2 Fixes

This commit is contained in:
Progi1984 2015-05-17 15:00:02 +02:00
parent 1d842ed218
commit 09352e3e80
52 changed files with 3250 additions and 3204 deletions

View File

@ -387,7 +387,8 @@ class PHPExcel_Reader_CSV extends PHPExcel_Reader_Abstract implements PHPExcel_R
*
* @return boolean
*/
public function getContiguous(){
public function getContiguous()
{
return $this->_contiguous;
}
}

View File

@ -998,16 +998,14 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
// Standard filters are always an OR join, so no join rule needs to be set
// Entries can be either filter elements
foreach ($filters->filter as $filterRule) {
$column->createRule()->setRule(
null,// Operator is undefined, but always treated as EQUAL
(string) $filterRule["val"]
)
->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_FILTER);
// Operator is undefined, but always treated as EQUAL
$column->createRule()->setRule(null, (string) $filterRule["val"])->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_FILTER);
}
// Or Date Group elements
foreach ($filters->dateGroupItem as $dateGroupItem) {
$column->createRule()->setRule(
null,// Operator is undefined, but always treated as EQUAL
// Operator is undefined, but always treated as EQUAL
null,
array(
'year' => (string) $dateGroupItem["year"],
'month' => (string) $dateGroupItem["month"],
@ -1044,7 +1042,8 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
// We should only ever have one dynamic filter
foreach ($filterColumn->dynamicFilter as $filterRule) {
$column->createRule()->setRule(
null,// Operator is undefined, but always treated as EQUAL
// Operator is undefined, but always treated as EQUAL
null,
(string) $filterRule["val"],
(string) $filterRule["type"]
)

View File

@ -559,7 +559,6 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
// Parse the individual sheets
foreach ($this->_sheets as $sheet) {
if ($sheet['sheetType'] != 0x00) {
// 0x00: Worksheet
// 0x02: Chart
@ -1185,7 +1184,6 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
$explodes = explode('!', $range);
if (count($explodes) == 2) {
if ($docSheet = $this->_phpExcel->getSheetByName($explodes[0])) {
$extractedRange = $explodes[1];
$extractedRange = str_replace('$', '', $extractedRange);
@ -1965,12 +1963,16 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
// bit: 0; mask 0x0001; bold (redundant in BIFF5-BIFF8)
// bit: 1; mask 0x0002; italic
$isItalic = (0x0002 & self::_GetInt2d($recordData, 2)) >> 1;
if ($isItalic) $objFont->setItalic(true);
if ($isItalic) {
$objFont->setItalic(true);
}
// bit: 2; mask 0x0004; underlined (redundant in BIFF5-BIFF8)
// bit: 3; mask 0x0008; strike
$isStrike = (0x0008 & self::_GetInt2d($recordData, 2)) >> 3;
if ($isStrike) $objFont->setStrikethrough(true);
if ($isStrike) {
$objFont->setStrikethrough(true);
}
// offset: 4; size: 2; colour index
$colorIndex = self::_GetInt2d($recordData, 4);
@ -2891,7 +2893,6 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
// loop through the Unicode strings (16-bit length)
for ($i = 0; $i < $nm; ++$i) {
// number of characters in the Unicode string
$numChars = self::_GetInt2d($recordData, $pos);
$pos += 2;
@ -3923,21 +3924,18 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
} elseif ((ord($recordData{6}) == 1)
&& (ord($recordData{12}) == 255)
&& (ord($recordData{13}) == 255)) {
// Boolean formula. Result is in +2; 0=false, 1=true
$dataType = PHPExcel_Cell_DataType::TYPE_BOOL;
$value = (bool) ord($recordData{8});
} elseif ((ord($recordData{6}) == 2)
&& (ord($recordData{12}) == 255)
&& (ord($recordData{13}) == 255)) {
// Error formula. Error code is in +2
$dataType = PHPExcel_Cell_DataType::TYPE_ERROR;
$value = self::_mapErrorCode(ord($recordData{8}));
} elseif ((ord($recordData{6}) == 3)
&& (ord($recordData{12}) == 255)
&& (ord($recordData{13}) == 255)) {
// Formula result is a null string
$dataType = PHPExcel_Cell_DataType::TYPE_NULL;
$value = '';
@ -4352,7 +4350,8 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
/**
* Read PLV Record(Created by Excel2007 or upper)
*/
private function _readPageLayoutView() {
private function _readPageLayoutView()
{
$length = self::_GetInt2d($this->_data, $this->_pos + 2);
$recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length);
@ -4620,8 +4619,9 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
// offset: var; size: $us; character array of the URL, no Unicode string header, always 16-bit characters, zero-terminated
$url = self::_encodeUTF16(substr($recordData, $offset, $us - 2), false);
$nullOffset = strpos($url, 0x00);
if ($nullOffset)
if ($nullOffset) {
$url = substr($url, 0, $nullOffset);
}
$url .= $hasText ? '#' : '';
$offset += $us;
break;

View File

@ -467,7 +467,7 @@ class PHPExcel_Reader_Gnumeric extends PHPExcel_Reader_Abstract implements PHPEx
}
if ((!$this->_readDataOnly) && (isset($sheet->Objects))) {
foreach ($sheet->Objects->children('gnm',TRUE) as $key => $comment) {
foreach ($sheet->Objects->children('gnm', true) as $key => $comment) {
$commentAttributes = $comment->attributes();
// Only comment objects are handled at the moment
if ($commentAttributes->Text) {
@ -481,7 +481,6 @@ class PHPExcel_Reader_Gnumeric extends PHPExcel_Reader_Abstract implements PHPEx
$styleAttributes = $styleRegion->attributes();
if (($styleAttributes['startRow'] <= $maxRow) &&
($styleAttributes['startCol'] <= $maxCol)) {
$startColumn = PHPExcel_Cell::stringFromColumnIndex((int) $styleAttributes['startCol']);
$startRow = $styleAttributes['startRow'] + 1;
@ -767,7 +766,7 @@ class PHPExcel_Reader_Gnumeric extends PHPExcel_Reader_Abstract implements PHPEx
}
$range = explode('!', $range);
$range[0] = trim($range[0],"'");;
$range[0] = trim($range[0], "'");
if ($worksheet = $objPHPExcel->getSheetByName($range[0])) {
$extractedRange = str_replace('$', '', $range[1]);
$objPHPExcel->addNamedRange(new PHPExcel_NamedRange($name, $worksheet, $extractedRange));
@ -844,7 +843,8 @@ class PHPExcel_Reader_Gnumeric extends PHPExcel_Reader_Abstract implements PHPEx
return $value;
}
private static function _parseGnumericColour($gnmColour) {
private static function _parseGnumericColour($gnmColour)
{
list($gnmR, $gnmG, $gnmB) = explode(':', $gnmColour);
$gnmR = substr(str_pad($gnmR, 4, '0', STR_PAD_RIGHT), 0, 2);
$gnmG = substr(str_pad($gnmG, 4, '0', STR_PAD_RIGHT), 0, 2);

View File

@ -54,7 +54,8 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
/**
* Create a new PHPExcel_Reader_OOCalc
*/
public function __construct() {
public function __construct()
{
$this->_readFilter = new PHPExcel_Reader_DefaultReadFilter();
}
@ -473,8 +474,7 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
}
case 'table-row':
$rowDataTableAttributes = $rowData->attributes($namespacesContent['table']);
$rowRepeats = (isset($rowDataTableAttributes['number-rows-repeated'])) ?
$rowDataTableAttributes['number-rows-repeated'] : 1;
$rowRepeats = (isset($rowDataTableAttributes['number-rows-repeated'])) ? $rowDataTableAttributes['number-rows-repeated'] : 1;
$columnID = 'A';
foreach ($rowData as $key => $cellData) {
if ($this->getReadFilter() !== null) {
@ -484,9 +484,7 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
}
// echo '<b>'.$columnID.$rowID.'</b><br />';
$cellDataText = (isset($namespacesContent['text'])) ?
$cellData->children($namespacesContent['text']) :
'';
$cellDataText = (isset($namespacesContent['text'])) ? $cellData->children($namespacesContent['text']) : '';
$cellDataOffice = $cellData->children($namespacesContent['office']);
$cellDataOfficeAttributes = $cellData->attributes($namespacesContent['office']);
$cellDataTableAttributes = $cellData->attributes($namespacesContent['table']);
@ -522,9 +520,8 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
}
$text = implode("\n", $textArray);
// echo $text, '<br />';
$objPHPExcel->getActiveSheet()->getComment( $columnID.$rowID )
$objPHPExcel->getActiveSheet()->getComment($columnID.$rowID)->setText($this->_parseRichText($text));
// ->setAuthor( $author )
->setText($this->_parseRichText($text) );
}
if (isset($cellDataText->p)) {
@ -583,11 +580,12 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
$dataValue = (float) $cellDataOfficeAttributes['value'];
if (floor($dataValue) == $dataValue) {
if ($dataValue == (integer) $dataValue)
if ($dataValue == (integer) $dataValue) {
$dataValue = (integer) $dataValue;
else
} else {
$dataValue = (float) $dataValue;
}
}
break;
case 'date':
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;

View File

@ -176,8 +176,16 @@ class PHPExcel_Shared_JAMA_Matrix
//A($i0...; $j0...)
case 'integer,integer':
list($i0, $j0) = $args;
if ($i0 >= 0) { $m = $this->m - $i0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
if ($j0 >= 0) { $n = $this->n - $j0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
if ($i0 >= 0) {
$m = $this->m - $i0;
} else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
}
if ($j0 >= 0) {
$n = $this->n - $j0;
} else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
}
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
for ($i = $i0; $i < $this->m; ++$i) {
for ($j = $j0; $j < $this->n; ++$j) {
@ -189,8 +197,12 @@ class PHPExcel_Shared_JAMA_Matrix
//A($i0...$iF; $j0...$jF)
case 'integer,integer,integer,integer':
list($i0, $iF, $j0, $jF) = $args;
if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) { $m = $iF - $i0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
if (($jF > $j0) && ($this->n >= $jF) && ($j0 >= 0)) { $n = $jF - $j0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) {
$m = $iF - $i0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
}
if (($jF > $j0) && ($this->n >= $jF) && ($j0 >= 0)) {
$n = $jF - $j0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
}
$R = new PHPExcel_Shared_JAMA_Matrix($m+1, $n+1);
for ($i = $i0; $i <= $iF; ++$i) {
for ($j = $j0; $j <= $jF; ++$j) {
@ -202,8 +214,16 @@ class PHPExcel_Shared_JAMA_Matrix
//$R = array of row indices; $C = array of column indices
case 'array,array':
list($RL, $CL) = $args;
if (count($RL) > 0) { $m = count($RL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
if (count($CL) > 0) { $n = count($CL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
if (count($RL) > 0) {
$m = count($RL);
} else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
}
if (count($CL) > 0) {
$n = count($CL);
} else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
}
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
for ($i = 0; $i < $m; ++$i) {
for ($j = 0; $j < $n; ++$j) {
@ -215,8 +235,16 @@ class PHPExcel_Shared_JAMA_Matrix
//$RL = array of row indices; $CL = array of column indices
case 'array,array':
list($RL, $CL) = $args;
if (count($RL) > 0) { $m = count($RL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
if (count($CL) > 0) { $n = count($CL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
if (count($RL) > 0) {
$m = count($RL);
} else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
}
if (count($CL) > 0) {
$n = count($CL);
} else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
}
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
for ($i = 0; $i < $m; ++$i) {
for ($j = 0; $j < $n; ++$j) {
@ -228,8 +256,16 @@ class PHPExcel_Shared_JAMA_Matrix
//A($i0...$iF); $CL = array of column indices
case 'integer,integer,array':
list($i0, $iF, $CL) = $args;
if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) { $m = $iF - $i0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
if (count($CL) > 0) { $n = count($CL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) {
$m = $iF - $i0;
} else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
}
if (count($CL) > 0) {
$n = count($CL);
} else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
}
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
for ($i = $i0; $i < $iF; ++$i) {
for ($j = 0; $j < $n; ++$j) {
@ -241,8 +277,16 @@ class PHPExcel_Shared_JAMA_Matrix
//$RL = array of row indices
case 'array,integer,integer':
list($RL, $j0, $jF) = $args;
if (count($RL) > 0) { $m = count($RL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
if (($jF >= $j0) && ($this->n >= $jF) && ($j0 >= 0)) { $n = $jF - $j0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
if (count($RL) > 0) {
$m = count($RL);
} else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
}
if (($jF >= $j0) && ($this->n >= $jF) && ($j0 >= 0)) {
$n = $jF - $j0;
} else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
}
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n+1);
for ($i = 0; $i < $m; ++$i) {
for ($j = $j0; $j <= $jF; ++$j) {

View File

@ -233,4 +233,3 @@ class PHPExcel_Shared_JAMA_QRDecomposition
}
} // function solve()
}

View File

@ -3458,7 +3458,6 @@ class PclZip
}
if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) {
// ----- Change the file status
$p_entry['status'] = "path_creation_fail";

View File

@ -25,7 +25,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DATE'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerDATE()
@ -38,7 +38,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
$result = PHPExcel_Calculation_DateTime::DATE(2012,1,31);
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
$this->assertEquals(1327968000, $result, NULL, 1E-8);
$this->assertEquals(1327968000, $result, null, 1E-8);
}
public function testDATEtoPHPObject()
@ -78,7 +78,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DATEVALUE'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerDATEVALUE()
@ -91,7 +91,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
$result = PHPExcel_Calculation_DateTime::DATEVALUE('2012-1-31');
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
$this->assertEquals(1327968000, $result, NULL, 1E-8);
$this->assertEquals(1327968000, $result, null, 1E-8);
}
public function testDATEVALUEtoPHPObject()
@ -115,7 +115,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','YEAR'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerYEAR()
@ -131,7 +131,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','MONTHOFYEAR'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerMONTH()
@ -147,7 +147,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','WEEKOFYEAR'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerWEEKNUM()
@ -163,7 +163,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DAYOFWEEK'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerWEEKDAY()
@ -179,7 +179,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DAYOFMONTH'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerDAY()
@ -195,7 +195,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','TIME'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerTIME()
@ -208,7 +208,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
$result = PHPExcel_Calculation_DateTime::TIME(7,30,20);
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
$this->assertEquals(27020, $result, NULL, 1E-8);
$this->assertEquals(27020, $result, null, 1E-8);
}
public function testTIMEtoPHPObject()
@ -232,7 +232,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','TIMEVALUE'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerTIMEVALUE()
@ -245,7 +245,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
$result = PHPExcel_Calculation_DateTime::TIMEVALUE('7:30:20');
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
$this->assertEquals(23420, $result, NULL, 1E-8);
$this->assertEquals(23420, $result, null, 1E-8);
}
public function testTIMEVALUEtoPHPObject()
@ -269,7 +269,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','HOUROFDAY'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerHOUR()
@ -285,7 +285,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','MINUTEOFHOUR'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerMINUTE()
@ -301,7 +301,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','SECONDOFMINUTE'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerSECOND()
@ -317,7 +317,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','NETWORKDAYS'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerNETWORKDAYS()
@ -333,7 +333,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','WORKDAY'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerWORKDAY()
@ -349,7 +349,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','EDATE'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerEDATE()
@ -362,7 +362,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
$result = PHPExcel_Calculation_DateTime::EDATE('2012-1-26',-1);
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
$this->assertEquals(1324857600, $result, NULL, 1E-8);
$this->assertEquals(1324857600, $result, null, 1E-8);
}
public function testEDATEtoPHPObject()
@ -386,7 +386,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','EOMONTH'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerEOMONTH()
@ -399,7 +399,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
$result = PHPExcel_Calculation_DateTime::EOMONTH('2012-1-26',-1);
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
$this->assertEquals(1325289600, $result, NULL, 1E-8);
$this->assertEquals(1325289600, $result, null, 1E-8);
}
public function testEOMONTHtoPHPObject()
@ -423,7 +423,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DATEDIF'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerDATEDIF()
@ -439,7 +439,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DAYS360'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerDAYS360()
@ -455,7 +455,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','YEARFRAC'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerYEARFRAC()

View File

@ -29,7 +29,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELI'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerBESSELI()
@ -45,7 +45,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELJ'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerBESSELJ()
@ -61,7 +61,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELK'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerBESSELK()
@ -77,7 +77,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELY'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerBESSELY()
@ -109,7 +109,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMAGINARY'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerIMAGINARY()
@ -125,7 +125,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMREAL'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerIMREAL()
@ -141,7 +141,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMABS'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerIMABS()
@ -157,7 +157,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMARGUMENT'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerIMARGUMENT()
@ -407,7 +407,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','ERF'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerERF()
@ -423,7 +423,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','ERFC'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerERFC()
@ -487,7 +487,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOBIN'),$args);
$this->assertEquals($expectedResult, $result, NULL);
$this->assertEquals($expectedResult, $result, null);
}
public function providerDEC2BIN()
@ -503,7 +503,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOHEX'),$args);
$this->assertEquals($expectedResult, $result, NULL);
$this->assertEquals($expectedResult, $result, null);
}
public function providerDEC2HEX()
@ -519,7 +519,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOOCT'),$args);
$this->assertEquals($expectedResult, $result, NULL);
$this->assertEquals($expectedResult, $result, null);
}
public function providerDEC2OCT()
@ -535,7 +535,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTOBIN'),$args);
$this->assertEquals($expectedResult, $result, NULL);
$this->assertEquals($expectedResult, $result, null);
}
public function providerHEX2BIN()
@ -551,7 +551,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTODEC'),$args);
$this->assertEquals($expectedResult, $result, NULL);
$this->assertEquals($expectedResult, $result, null);
}
public function providerHEX2DEC()
@ -567,7 +567,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTOOCT'),$args);
$this->assertEquals($expectedResult, $result, NULL);
$this->assertEquals($expectedResult, $result, null);
}
public function providerHEX2OCT()
@ -583,7 +583,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTOBIN'),$args);
$this->assertEquals($expectedResult, $result, NULL);
$this->assertEquals($expectedResult, $result, null);
}
public function providerOCT2BIN()
@ -599,7 +599,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTODEC'),$args);
$this->assertEquals($expectedResult, $result, NULL);
$this->assertEquals($expectedResult, $result, null);
}
public function providerOCT2DEC()
@ -615,7 +615,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTOHEX'),$args);
$this->assertEquals($expectedResult, $result, NULL);
$this->assertEquals($expectedResult, $result, null);
}
public function providerOCT2HEX()
@ -631,7 +631,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DELTA'),$args);
$this->assertEquals($expectedResult, $result, NULL);
$this->assertEquals($expectedResult, $result, null);
}
public function providerDELTA()
@ -647,7 +647,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','GESTEP'),$args);
$this->assertEquals($expectedResult, $result, NULL);
$this->assertEquals($expectedResult, $result, null);
}
public function providerGESTEP()
@ -687,7 +687,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','CONVERTUOM'),$args);
$this->assertEquals($expectedResult, $result, NULL);
$this->assertEquals($expectedResult, $result, null);
}
public function providerCONVERTUOM()

View File

@ -25,7 +25,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','ACCRINT'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerACCRINT()
@ -41,7 +41,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','ACCRINTM'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerACCRINTM()
@ -57,7 +57,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','AMORDEGRC'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerAMORDEGRC()
@ -73,7 +73,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','AMORLINC'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerAMORLINC()
@ -89,7 +89,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYBS'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerCOUPDAYBS()
@ -105,7 +105,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYS'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerCOUPDAYS()
@ -121,7 +121,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYSNC'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerCOUPDAYSNC()
@ -137,7 +137,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPNCD'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerCOUPNCD()
@ -153,7 +153,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPNUM'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerCOUPNUM()
@ -169,7 +169,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPPCD'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerCOUPPCD()
@ -185,7 +185,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','CUMIPMT'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerCUMIPMT()
@ -201,7 +201,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','CUMPRINC'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerCUMPRINC()
@ -217,7 +217,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','DB'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerDB()
@ -233,7 +233,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','DDB'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerDDB()
@ -249,7 +249,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','DISC'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerDISC()
@ -265,7 +265,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','DOLLARDE'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerDOLLARDE()
@ -281,7 +281,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','DOLLARFR'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerDOLLARFR()
@ -297,7 +297,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','EFFECT'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerEFFECT()
@ -313,7 +313,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','FV'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerFV()
@ -329,7 +329,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','FVSCHEDULE'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerFVSCHEDULE()
@ -345,7 +345,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','INTRATE'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerINTRATE()
@ -361,7 +361,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','IPMT'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerIPMT()
@ -377,7 +377,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','IRR'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerIRR()
@ -393,7 +393,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','ISPMT'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerISPMT()
@ -409,7 +409,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','MIRR'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerMIRR()
@ -425,7 +425,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','NOMINAL'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerNOMINAL()
@ -441,7 +441,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','NPER'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerNPER()
@ -457,7 +457,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','NPV'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerNPV()
@ -473,7 +473,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','PRICE'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerPRICE()
@ -489,7 +489,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','RATE'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerRATE()
@ -505,7 +505,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','XIRR'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerXIRR()

View File

@ -55,7 +55,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
public function testNULL()
{
$result = PHPExcel_Calculation_Functions::NULL();
$result = PHPExcel_Calculation_Functions::null();
$this->assertEquals('#NULL!', $result);
}
@ -73,7 +73,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_BLANK'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerIS_BLANK()
@ -89,7 +89,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ERR'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerIS_ERR()
@ -105,7 +105,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ERROR'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerIS_ERROR()
@ -121,7 +121,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','ERROR_TYPE'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerERROR_TYPE()
@ -137,7 +137,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_LOGICAL'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerIS_LOGICAL()
@ -153,7 +153,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NA'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerIS_NA()
@ -169,7 +169,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NUMBER'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerIS_NUMBER()
@ -185,7 +185,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_TEXT'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerIS_TEXT()
@ -201,7 +201,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NONTEXT'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerIS_NONTEXT()
@ -217,7 +217,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_EVEN'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerIS_EVEN()
@ -233,7 +233,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ODD'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerIS_ODD()
@ -249,7 +249,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','TYPE'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerTYPE()
@ -265,7 +265,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','N'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerN()

View File

@ -20,13 +20,13 @@ class LogicalTest extends PHPUnit_Framework_TestCase
public function testTRUE()
{
$result = PHPExcel_Calculation_Logical::TRUE();
$this->assertEquals(TRUE, $result);
$this->assertEquals(true, $result);
}
public function testFALSE()
{
$result = PHPExcel_Calculation_Logical::FALSE();
$this->assertEquals(FALSE, $result);
$this->assertEquals(false, $result);
}
/**

View File

@ -25,7 +25,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ATAN2'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerATAN2()
@ -41,7 +41,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','CEILING'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerCEILING()
@ -57,7 +57,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','COMBIN'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerCOMBIN()
@ -73,7 +73,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','EVEN'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerEVEN()
@ -89,7 +89,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ODD'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerODD()
@ -105,7 +105,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','FACT'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerFACT()
@ -121,7 +121,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','FACTDOUBLE'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerFACTDOUBLE()
@ -137,7 +137,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','FLOOR'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerFLOOR()
@ -153,7 +153,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','GCD'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerGCD()
@ -169,7 +169,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','LCM'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerLCM()
@ -201,7 +201,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SIGN'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerSIGN()
@ -217,7 +217,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','POWER'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerPOWER()
@ -233,7 +233,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','LOG_BASE'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerLOG()
@ -249,7 +249,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MOD'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerMOD()
@ -265,7 +265,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MDETERM'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerMDETERM()
@ -281,7 +281,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MINVERSE'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerMINVERSE()
@ -297,7 +297,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MMULT'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerMMULT()
@ -313,7 +313,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MULTINOMIAL'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerMULTINOMIAL()
@ -331,7 +331,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
PHPExcel_Calculation::setArrayReturnType(PHPExcel_Calculation::RETURN_ARRAY_AS_VALUE);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MROUND'),$args);
PHPExcel_Calculation::setArrayReturnType(PHPExcel_Calculation::RETURN_ARRAY_AS_ARRAY);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerMROUND()
@ -347,7 +347,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','PRODUCT'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerPRODUCT()
@ -363,7 +363,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','QUOTIENT'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerQUOTIENT()
@ -379,7 +379,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ROUNDUP'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerROUNDUP()
@ -395,7 +395,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ROUNDDOWN'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerROUNDDOWN()
@ -411,7 +411,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SERIESSUM'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerSERIESSUM()
@ -427,7 +427,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SUMSQ'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerSUMSQ()
@ -443,7 +443,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','TRUNC'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerTRUNC()
@ -475,7 +475,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SQRTPI'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerSQRTPI()
@ -491,7 +491,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig', 'SUMIF'), $args);
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
public function providerSUMIF()

View File

@ -354,7 +354,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','VALUE'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
public function providerVALUE()

View File

@ -64,7 +64,7 @@ class AdvancedValueBinderTest extends PHPUnit_Framework_TestCase
PHPExcel_Shared_String::setDecimalSeparator($decimalSeparator);
PHPExcel_Shared_String::setThousandsSeparator($thousandsSeparator);
$cell = new PHPExcel_Cell(NULL, PHPExcel_Cell_DataType::TYPE_STRING, $sheet);
$cell = new PHPExcel_Cell(null, PHPExcel_Cell_DataType::TYPE_STRING, $sheet);
$binder = new PHPExcel_Cell_AdvancedValueBinder();
$binder->bindValue($cell, $value);

View File

@ -40,7 +40,7 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase
{
$tooltipValue = 'PHPExcel Web Site';
$testInstance = new PHPExcel_Cell_Hyperlink(NULL, $tooltipValue);
$testInstance = new PHPExcel_Cell_Hyperlink(null, $tooltipValue);
$result = $testInstance->getTooltip();
$this->assertEquals($tooltipValue,$result);
@ -51,7 +51,7 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase
$initialTooltipValue = 'PHPExcel Web Site';
$newTooltipValue = 'PHPExcel Repository on Github';
$testInstance = new PHPExcel_Cell_Hyperlink(NULL, $initialTooltipValue);
$testInstance = new PHPExcel_Cell_Hyperlink(null, $initialTooltipValue);
$result = $testInstance->setTooltip($newTooltipValue);
$this->assertTrue($result instanceof PHPExcel_Cell_Hyperlink);

View File

@ -97,8 +97,8 @@ class LegendTest extends PHPUnit_Framework_TestCase
public function testSetOverlay()
{
$overlayValues = array(
TRUE,
FALSE,
true,
false,
);
$testInstance = new PHPExcel_Chart_Legend;
@ -122,7 +122,7 @@ class LegendTest extends PHPUnit_Framework_TestCase
public function testGetOverlay()
{
$OverlayValue = TRUE;
$OverlayValue = true;
$testInstance = new PHPExcel_Chart_Legend;
$setValue = $testInstance->setOverlay($OverlayValue);

View File

@ -71,7 +71,7 @@ class DateTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Shared_Date','PHPToExcel'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-5);
$this->assertEquals($expectedResult, $result, null, 1E-5);
}
public function providerDateTimePHPToExcel1900()
@ -92,7 +92,7 @@ class DateTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Shared_Date','FormattedPHPToExcel'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-5);
$this->assertEquals($expectedResult, $result, null, 1E-5);
}
public function providerDateTimeFormattedPHPToExcel1900()
@ -137,7 +137,7 @@ class DateTest extends PHPUnit_Framework_TestCase
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Shared_Date','PHPToExcel'),$args);
$this->assertEquals($expectedResult, $result, NULL, 1E-5);
$this->assertEquals($expectedResult, $result, null, 1E-5);
}
public function providerDateTimePHPToExcel1904()

View File

@ -25,8 +25,8 @@ class FileTest extends PHPUnit_Framework_TestCase
public function testSetUseUploadTempDirectory()
{
$useUploadTempDirectoryValues = array(
TRUE,
FALSE,
true,
false,
);
foreach ($useUploadTempDirectoryValues as $useUploadTempDirectoryValue) {

View File

@ -85,13 +85,14 @@ class testDataFileIterator implements Iterator
return $data;
}
private function _parseDataValue($dataValue) {
private function _parseDataValue($dataValue)
{
// discard any white space
$dataValue = trim($dataValue);
// test for the required datatype and convert accordingly
if (!is_numeric($dataValue)) {
if($dataValue == '') {
$dataValue = NULL;
$dataValue = null;
} elseif($dataValue == '""') {
$dataValue = '';
} elseif(($dataValue[0] == '"') && ($dataValue[strlen($dataValue)-1] == '"')) {
@ -99,7 +100,7 @@ class testDataFileIterator implements Iterator
} elseif(($dataValue[0] == '{') && ($dataValue[strlen($dataValue)-1] == '}')) {
$dataValue = explode(';',substr($dataValue,1,-1));
foreach ($dataValue as &$dataRow) {
if (strpos($dataRow,'|') !== FALSE) {
if (strpos($dataRow,'|') !== false) {
$dataRow = explode('|',$dataRow);
foreach ($dataRow as &$dataCell) {
$dataCell = $this->_parseDataValue($dataCell);
@ -112,13 +113,19 @@ class testDataFileIterator implements Iterator
unset($dataRow);
} else {
switch (strtoupper($dataValue)) {
case 'NULL' : $dataValue = NULL; break;
case 'TRUE' : $dataValue = TRUE; break;
case 'FALSE' : $dataValue = FALSE; break;
case 'NULL':
$dataValue = null;
break;
case 'TRUE':
$dataValue = true;
break;
case 'FALSE':
$dataValue = false;
break;
}
}
} else {
if (strpos($dataValue,'.') !== FALSE) {
if (strpos($dataValue,'.') !== false) {
$dataValue = (float) $dataValue;
} else {
$dataValue = (int) $dataValue;
@ -127,5 +134,4 @@ class testDataFileIterator implements Iterator
return $dataValue;
}
}