PSR2 Fixes
This commit is contained in:
parent
1d842ed218
commit
09352e3e80
|
@ -387,7 +387,8 @@ class PHPExcel_Reader_CSV extends PHPExcel_Reader_Abstract implements PHPExcel_R
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function getContiguous(){
|
public function getContiguous()
|
||||||
|
{
|
||||||
return $this->_contiguous;
|
return $this->_contiguous;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
// Standard filters are always an OR join, so no join rule needs to be set
|
||||||
// Entries can be either filter elements
|
// Entries can be either filter elements
|
||||||
foreach ($filters->filter as $filterRule) {
|
foreach ($filters->filter as $filterRule) {
|
||||||
$column->createRule()->setRule(
|
// Operator is undefined, but always treated as EQUAL
|
||||||
null,// Operator is undefined, but always treated as EQUAL
|
$column->createRule()->setRule(null, (string) $filterRule["val"])->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_FILTER);
|
||||||
(string) $filterRule["val"]
|
|
||||||
)
|
|
||||||
->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_FILTER);
|
|
||||||
}
|
}
|
||||||
// Or Date Group elements
|
// Or Date Group elements
|
||||||
foreach ($filters->dateGroupItem as $dateGroupItem) {
|
foreach ($filters->dateGroupItem as $dateGroupItem) {
|
||||||
$column->createRule()->setRule(
|
$column->createRule()->setRule(
|
||||||
null,// Operator is undefined, but always treated as EQUAL
|
// Operator is undefined, but always treated as EQUAL
|
||||||
|
null,
|
||||||
array(
|
array(
|
||||||
'year' => (string) $dateGroupItem["year"],
|
'year' => (string) $dateGroupItem["year"],
|
||||||
'month' => (string) $dateGroupItem["month"],
|
'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
|
// We should only ever have one dynamic filter
|
||||||
foreach ($filterColumn->dynamicFilter as $filterRule) {
|
foreach ($filterColumn->dynamicFilter as $filterRule) {
|
||||||
$column->createRule()->setRule(
|
$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["val"],
|
||||||
(string) $filterRule["type"]
|
(string) $filterRule["type"]
|
||||||
)
|
)
|
||||||
|
|
|
@ -81,21 +81,21 @@ class PHPExcel_Reader_Excel2007_Chart
|
||||||
foreach ($chartDetails as $chartDetailKey => $chartDetail) {
|
foreach ($chartDetails as $chartDetailKey => $chartDetail) {
|
||||||
switch ($chartDetailKey) {
|
switch ($chartDetailKey) {
|
||||||
case "layout":
|
case "layout":
|
||||||
$plotAreaLayout = self::_chartLayoutDetails($chartDetail, $namespacesChartMeta,'plotArea');
|
$plotAreaLayout = self::_chartLayoutDetails($chartDetail, $namespacesChartMeta, 'plotArea');
|
||||||
break;
|
break;
|
||||||
case "catAx":
|
case "catAx":
|
||||||
if (isset($chartDetail->title)) {
|
if (isset($chartDetail->title)) {
|
||||||
$XaxisLabel = self::_chartTitle($chartDetail->title->children($namespacesChartMeta['c']), $namespacesChartMeta,'cat');
|
$XaxisLabel = self::_chartTitle($chartDetail->title->children($namespacesChartMeta['c']), $namespacesChartMeta, 'cat');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "dateAx":
|
case "dateAx":
|
||||||
if (isset($chartDetail->title)) {
|
if (isset($chartDetail->title)) {
|
||||||
$XaxisLabel = self::_chartTitle($chartDetail->title->children($namespacesChartMeta['c']), $namespacesChartMeta,'cat');
|
$XaxisLabel = self::_chartTitle($chartDetail->title->children($namespacesChartMeta['c']), $namespacesChartMeta, 'cat');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "valAx":
|
case "valAx":
|
||||||
if (isset($chartDetail->title)) {
|
if (isset($chartDetail->title)) {
|
||||||
$YaxisLabel = self::_chartTitle($chartDetail->title->children($namespacesChartMeta['c']), $namespacesChartMeta,'cat');
|
$YaxisLabel = self::_chartTitle($chartDetail->title->children($namespacesChartMeta['c']), $namespacesChartMeta, 'cat');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "barChart":
|
case "barChart":
|
||||||
|
@ -173,7 +173,7 @@ class PHPExcel_Reader_Excel2007_Chart
|
||||||
$dispBlanksAs = self::_getAttribute($chartDetails, 'val', 'string');
|
$dispBlanksAs = self::_getAttribute($chartDetails, 'val', 'string');
|
||||||
break;
|
break;
|
||||||
case "title":
|
case "title":
|
||||||
$title = self::_chartTitle($chartDetails, $namespacesChartMeta,'title');
|
$title = self::_chartTitle($chartDetails, $namespacesChartMeta, 'title');
|
||||||
break;
|
break;
|
||||||
case "legend":
|
case "legend":
|
||||||
$legendPos = 'r';
|
$legendPos = 'r';
|
||||||
|
@ -188,7 +188,7 @@ class PHPExcel_Reader_Excel2007_Chart
|
||||||
$legendOverlay = self::_getAttribute($chartDetail, 'val', 'boolean');
|
$legendOverlay = self::_getAttribute($chartDetail, 'val', 'boolean');
|
||||||
break;
|
break;
|
||||||
case "layout":
|
case "layout":
|
||||||
$legendLayout = self::_chartLayoutDetails($chartDetail, $namespacesChartMeta,'legend');
|
$legendLayout = self::_chartLayoutDetails($chartDetail, $namespacesChartMeta, 'legend');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -239,7 +239,7 @@ class PHPExcel_Reader_Excel2007_Chart
|
||||||
}
|
}
|
||||||
$layout = array();
|
$layout = array();
|
||||||
foreach ($details as $detailKey => $detail) {
|
foreach ($details as $detailKey => $detail) {
|
||||||
// echo $detailKey,' => ',self::_getAttribute($detail, 'val', 'string'),PHP_EOL;
|
// echo $detailKey, ' => ',self::_getAttribute($detail, 'val', 'string'),PHP_EOL;
|
||||||
$layout[$detailKey] = self::_getAttribute($detail, 'val', 'string');
|
$layout[$detailKey] = self::_getAttribute($detail, 'val', 'string');
|
||||||
}
|
}
|
||||||
return new PHPExcel_Chart_Layout($layout);
|
return new PHPExcel_Chart_Layout($layout);
|
||||||
|
@ -300,7 +300,7 @@ class PHPExcel_Reader_Excel2007_Chart
|
||||||
{
|
{
|
||||||
if (isset($seriesDetail->strRef)) {
|
if (isset($seriesDetail->strRef)) {
|
||||||
$seriesSource = (string) $seriesDetail->strRef->f;
|
$seriesSource = (string) $seriesDetail->strRef->f;
|
||||||
$seriesData = self::_chartDataSeriesValues($seriesDetail->strRef->strCache->children($namespacesChartMeta['c']),'s');
|
$seriesData = self::_chartDataSeriesValues($seriesDetail->strRef->strCache->children($namespacesChartMeta['c']), 's');
|
||||||
|
|
||||||
return new PHPExcel_Chart_DataSeriesValues('String', $seriesSource, $seriesData['formatCode'], $seriesData['pointCount'], $seriesData['dataValues'], $marker, $smoothLine);
|
return new PHPExcel_Chart_DataSeriesValues('String', $seriesSource, $seriesData['formatCode'], $seriesData['pointCount'], $seriesData['dataValues'], $marker, $smoothLine);
|
||||||
} elseif (isset($seriesDetail->numRef)) {
|
} elseif (isset($seriesDetail->numRef)) {
|
||||||
|
@ -310,13 +310,13 @@ class PHPExcel_Reader_Excel2007_Chart
|
||||||
return new PHPExcel_Chart_DataSeriesValues('Number', $seriesSource, $seriesData['formatCode'], $seriesData['pointCount'], $seriesData['dataValues'], $marker, $smoothLine);
|
return new PHPExcel_Chart_DataSeriesValues('Number', $seriesSource, $seriesData['formatCode'], $seriesData['pointCount'], $seriesData['dataValues'], $marker, $smoothLine);
|
||||||
} elseif (isset($seriesDetail->multiLvlStrRef)) {
|
} elseif (isset($seriesDetail->multiLvlStrRef)) {
|
||||||
$seriesSource = (string) $seriesDetail->multiLvlStrRef->f;
|
$seriesSource = (string) $seriesDetail->multiLvlStrRef->f;
|
||||||
$seriesData = self::_chartDataSeriesValuesMultiLevel($seriesDetail->multiLvlStrRef->multiLvlStrCache->children($namespacesChartMeta['c']),'s');
|
$seriesData = self::_chartDataSeriesValuesMultiLevel($seriesDetail->multiLvlStrRef->multiLvlStrCache->children($namespacesChartMeta['c']), 's');
|
||||||
$seriesData['pointCount'] = count($seriesData['dataValues']);
|
$seriesData['pointCount'] = count($seriesData['dataValues']);
|
||||||
|
|
||||||
return new PHPExcel_Chart_DataSeriesValues('String', $seriesSource, $seriesData['formatCode'], $seriesData['pointCount'], $seriesData['dataValues'], $marker, $smoothLine);
|
return new PHPExcel_Chart_DataSeriesValues('String', $seriesSource, $seriesData['formatCode'], $seriesData['pointCount'], $seriesData['dataValues'], $marker, $smoothLine);
|
||||||
} elseif (isset($seriesDetail->multiLvlNumRef)) {
|
} elseif (isset($seriesDetail->multiLvlNumRef)) {
|
||||||
$seriesSource = (string) $seriesDetail->multiLvlNumRef->f;
|
$seriesSource = (string) $seriesDetail->multiLvlNumRef->f;
|
||||||
$seriesData = self::_chartDataSeriesValuesMultiLevel($seriesDetail->multiLvlNumRef->multiLvlNumCache->children($namespacesChartMeta['c']),'s');
|
$seriesData = self::_chartDataSeriesValuesMultiLevel($seriesDetail->multiLvlNumRef->multiLvlNumCache->children($namespacesChartMeta['c']), 's');
|
||||||
$seriesData['pointCount'] = count($seriesData['dataValues']);
|
$seriesData['pointCount'] = count($seriesData['dataValues']);
|
||||||
|
|
||||||
return new PHPExcel_Chart_DataSeriesValues('String', $seriesSource, $seriesData['formatCode'], $seriesData['pointCount'], $seriesData['dataValues'], $marker, $smoothLine);
|
return new PHPExcel_Chart_DataSeriesValues('String', $seriesSource, $seriesData['formatCode'], $seriesData['pointCount'], $seriesData['dataValues'], $marker, $smoothLine);
|
||||||
|
@ -400,7 +400,7 @@ class PHPExcel_Reader_Excel2007_Chart
|
||||||
|
|
||||||
foreach ($titleDetailPart as $titleDetailElementKey => $titleDetailElement) {
|
foreach ($titleDetailPart as $titleDetailElementKey => $titleDetailElement) {
|
||||||
if (isset($titleDetailElement->t)) {
|
if (isset($titleDetailElement->t)) {
|
||||||
$objText = $value->createTextRun( (string) $titleDetailElement->t );
|
$objText = $value->createTextRun((string) $titleDetailElement->t);
|
||||||
}
|
}
|
||||||
if (isset($titleDetailElement->rPr)) {
|
if (isset($titleDetailElement->rPr)) {
|
||||||
if (isset($titleDetailElement->rPr->rFont["val"])) {
|
if (isset($titleDetailElement->rPr->rFont["val"])) {
|
||||||
|
@ -414,7 +414,7 @@ class PHPExcel_Reader_Excel2007_Chart
|
||||||
|
|
||||||
$fontColor = (self::_getAttribute($titleDetailElement->rPr, 'color', 'string'));
|
$fontColor = (self::_getAttribute($titleDetailElement->rPr, 'color', 'string'));
|
||||||
if (!is_null($fontColor)) {
|
if (!is_null($fontColor)) {
|
||||||
$objText->getFont()->setColor( new PHPExcel_Style_Color( self::_readColor($fontColor) ) );
|
$objText->getFont()->setColor(new PHPExcel_Style_Color(self::_readColor($fontColor)));
|
||||||
}
|
}
|
||||||
|
|
||||||
$bold = self::_getAttribute($titleDetailElement->rPr, 'b', 'boolean');
|
$bold = self::_getAttribute($titleDetailElement->rPr, 'b', 'boolean');
|
||||||
|
@ -495,25 +495,25 @@ class PHPExcel_Reader_Excel2007_Chart
|
||||||
{
|
{
|
||||||
foreach ($plotAttributes as $plotAttributeKey => $plotAttributeValue) {
|
foreach ($plotAttributes as $plotAttributeKey => $plotAttributeValue) {
|
||||||
switch ($plotAttributeKey) {
|
switch ($plotAttributeKey) {
|
||||||
case 'showLegendKey' :
|
case 'showLegendKey':
|
||||||
$plotArea->setShowLegendKey($plotAttributeValue);
|
$plotArea->setShowLegendKey($plotAttributeValue);
|
||||||
break;
|
break;
|
||||||
case 'showVal' :
|
case 'showVal':
|
||||||
$plotArea->setShowVal($plotAttributeValue);
|
$plotArea->setShowVal($plotAttributeValue);
|
||||||
break;
|
break;
|
||||||
case 'showCatName' :
|
case 'showCatName':
|
||||||
$plotArea->setShowCatName($plotAttributeValue);
|
$plotArea->setShowCatName($plotAttributeValue);
|
||||||
break;
|
break;
|
||||||
case 'showSerName' :
|
case 'showSerName':
|
||||||
$plotArea->setShowSerName($plotAttributeValue);
|
$plotArea->setShowSerName($plotAttributeValue);
|
||||||
break;
|
break;
|
||||||
case 'showPercent' :
|
case 'showPercent':
|
||||||
$plotArea->setShowPercent($plotAttributeValue);
|
$plotArea->setShowPercent($plotAttributeValue);
|
||||||
break;
|
break;
|
||||||
case 'showBubbleSize' :
|
case 'showBubbleSize':
|
||||||
$plotArea->setShowBubbleSize($plotAttributeValue);
|
$plotArea->setShowBubbleSize($plotAttributeValue);
|
||||||
break;
|
break;
|
||||||
case 'showLeaderLines' :
|
case 'showLeaderLines':
|
||||||
$plotArea->setShowLeaderLines($plotAttributeValue);
|
$plotArea->setShowLeaderLines($plotAttributeValue);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -559,7 +559,6 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
|
|
||||||
// Parse the individual sheets
|
// Parse the individual sheets
|
||||||
foreach ($this->_sheets as $sheet) {
|
foreach ($this->_sheets as $sheet) {
|
||||||
|
|
||||||
if ($sheet['sheetType'] != 0x00) {
|
if ($sheet['sheetType'] != 0x00) {
|
||||||
// 0x00: Worksheet
|
// 0x00: Worksheet
|
||||||
// 0x02: Chart
|
// 0x02: Chart
|
||||||
|
@ -811,7 +810,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
// Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in formula
|
// Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in formula
|
||||||
// cells... during the load, all formulae should be correct, and we're simply bringing the worksheet
|
// cells... during the load, all formulae should be correct, and we're simply bringing the worksheet
|
||||||
// name in line with the formula, not the reverse
|
// name in line with the formula, not the reverse
|
||||||
$this->_phpSheet->setTitle($sheet['name'],false);
|
$this->_phpSheet->setTitle($sheet['name'], false);
|
||||||
$this->_phpSheet->setSheetState($sheet['sheetState']);
|
$this->_phpSheet->setSheetState($sheet['sheetState']);
|
||||||
|
|
||||||
$this->_pos = $sheet['offset'];
|
$this->_pos = $sheet['offset'];
|
||||||
|
@ -1133,7 +1132,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
// echo '<b>Cell annotation ', $note,'</b><br />';
|
// echo '<b>Cell annotation ', $note,'</b><br />';
|
||||||
// var_dump($noteDetails);
|
// var_dump($noteDetails);
|
||||||
// echo '<br />';
|
// echo '<br />';
|
||||||
$cellAddress = str_replace('$','', $noteDetails['cellRef']);
|
$cellAddress = str_replace('$', '', $noteDetails['cellRef']);
|
||||||
$this->_phpSheet->getComment($cellAddress)->setAuthor($noteDetails['author'])->setText($this->_parseRichText($noteDetails['objTextData']['text']));
|
$this->_phpSheet->getComment($cellAddress)->setAuthor($noteDetails['author'])->setText($this->_parseRichText($noteDetails['objTextData']['text']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1185,7 +1184,6 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
$explodes = explode('!', $range);
|
$explodes = explode('!', $range);
|
||||||
if (count($explodes) == 2) {
|
if (count($explodes) == 2) {
|
||||||
if ($docSheet = $this->_phpExcel->getSheetByName($explodes[0])) {
|
if ($docSheet = $this->_phpExcel->getSheetByName($explodes[0])) {
|
||||||
|
|
||||||
$extractedRange = $explodes[1];
|
$extractedRange = $explodes[1];
|
||||||
$extractedRange = str_replace('$', '', $extractedRange);
|
$extractedRange = str_replace('$', '', $extractedRange);
|
||||||
|
|
||||||
|
@ -1213,7 +1211,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
|
|
||||||
if (count($explodes) == 2) {
|
if (count($explodes) == 2) {
|
||||||
if (($docSheet = $this->_phpExcel->getSheetByName($explodes[0])) ||
|
if (($docSheet = $this->_phpExcel->getSheetByName($explodes[0])) ||
|
||||||
($docSheet = $this->_phpExcel->getSheetByName(trim($explodes[0],"'")))) {
|
($docSheet = $this->_phpExcel->getSheetByName(trim($explodes[0], "'")))) {
|
||||||
$extractedRange = $explodes[1];
|
$extractedRange = $explodes[1];
|
||||||
$extractedRange = str_replace('$', '', $extractedRange);
|
$extractedRange = str_replace('$', '', $extractedRange);
|
||||||
|
|
||||||
|
@ -1639,7 +1637,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
}
|
}
|
||||||
// echo 'Note Address=', $cellAddress,'<br />';
|
// echo 'Note Address=', $cellAddress,'<br />';
|
||||||
|
|
||||||
$cellAddress = str_replace('$','', $cellAddress);
|
$cellAddress = str_replace('$', '', $cellAddress);
|
||||||
$noteLength = self::_GetInt2d($recordData, 4);
|
$noteLength = self::_GetInt2d($recordData, 4);
|
||||||
$noteText = trim(substr($recordData, 6));
|
$noteText = trim(substr($recordData, 6));
|
||||||
// echo 'Note Length=', $noteLength,'<br />';
|
// echo 'Note Length=', $noteLength,'<br />';
|
||||||
|
@ -1965,12 +1963,16 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
// bit: 0; mask 0x0001; bold (redundant in BIFF5-BIFF8)
|
// bit: 0; mask 0x0001; bold (redundant in BIFF5-BIFF8)
|
||||||
// bit: 1; mask 0x0002; italic
|
// bit: 1; mask 0x0002; italic
|
||||||
$isItalic = (0x0002 & self::_GetInt2d($recordData, 2)) >> 1;
|
$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: 2; mask 0x0004; underlined (redundant in BIFF5-BIFF8)
|
||||||
// bit: 3; mask 0x0008; strike
|
// bit: 3; mask 0x0008; strike
|
||||||
$isStrike = (0x0008 & self::_GetInt2d($recordData, 2)) >> 3;
|
$isStrike = (0x0008 & self::_GetInt2d($recordData, 2)) >> 3;
|
||||||
if ($isStrike) $objFont->setStrikethrough(true);
|
if ($isStrike) {
|
||||||
|
$objFont->setStrikethrough(true);
|
||||||
|
}
|
||||||
|
|
||||||
// offset: 4; size: 2; colour index
|
// offset: 4; size: 2; colour index
|
||||||
$colorIndex = self::_GetInt2d($recordData, 4);
|
$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)
|
// loop through the Unicode strings (16-bit length)
|
||||||
for ($i = 0; $i < $nm; ++$i) {
|
for ($i = 0; $i < $nm; ++$i) {
|
||||||
|
|
||||||
// number of characters in the Unicode string
|
// number of characters in the Unicode string
|
||||||
$numChars = self::_GetInt2d($recordData, $pos);
|
$numChars = self::_GetInt2d($recordData, $pos);
|
||||||
$pos += 2;
|
$pos += 2;
|
||||||
|
@ -3923,21 +3924,18 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
} elseif ((ord($recordData{6}) == 1)
|
} elseif ((ord($recordData{6}) == 1)
|
||||||
&& (ord($recordData{12}) == 255)
|
&& (ord($recordData{12}) == 255)
|
||||||
&& (ord($recordData{13}) == 255)) {
|
&& (ord($recordData{13}) == 255)) {
|
||||||
|
|
||||||
// Boolean formula. Result is in +2; 0=false, 1=true
|
// Boolean formula. Result is in +2; 0=false, 1=true
|
||||||
$dataType = PHPExcel_Cell_DataType::TYPE_BOOL;
|
$dataType = PHPExcel_Cell_DataType::TYPE_BOOL;
|
||||||
$value = (bool) ord($recordData{8});
|
$value = (bool) ord($recordData{8});
|
||||||
} elseif ((ord($recordData{6}) == 2)
|
} elseif ((ord($recordData{6}) == 2)
|
||||||
&& (ord($recordData{12}) == 255)
|
&& (ord($recordData{12}) == 255)
|
||||||
&& (ord($recordData{13}) == 255)) {
|
&& (ord($recordData{13}) == 255)) {
|
||||||
|
|
||||||
// Error formula. Error code is in +2
|
// Error formula. Error code is in +2
|
||||||
$dataType = PHPExcel_Cell_DataType::TYPE_ERROR;
|
$dataType = PHPExcel_Cell_DataType::TYPE_ERROR;
|
||||||
$value = self::_mapErrorCode(ord($recordData{8}));
|
$value = self::_mapErrorCode(ord($recordData{8}));
|
||||||
} elseif ((ord($recordData{6}) == 3)
|
} elseif ((ord($recordData{6}) == 3)
|
||||||
&& (ord($recordData{12}) == 255)
|
&& (ord($recordData{12}) == 255)
|
||||||
&& (ord($recordData{13}) == 255)) {
|
&& (ord($recordData{13}) == 255)) {
|
||||||
|
|
||||||
// Formula result is a null string
|
// Formula result is a null string
|
||||||
$dataType = PHPExcel_Cell_DataType::TYPE_NULL;
|
$dataType = PHPExcel_Cell_DataType::TYPE_NULL;
|
||||||
$value = '';
|
$value = '';
|
||||||
|
@ -4352,7 +4350,8 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
/**
|
/**
|
||||||
* Read PLV Record(Created by Excel2007 or upper)
|
* Read PLV Record(Created by Excel2007 or upper)
|
||||||
*/
|
*/
|
||||||
private function _readPageLayoutView() {
|
private function _readPageLayoutView()
|
||||||
|
{
|
||||||
$length = self::_GetInt2d($this->_data, $this->_pos + 2);
|
$length = self::_GetInt2d($this->_data, $this->_pos + 2);
|
||||||
$recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length);
|
$recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length);
|
||||||
|
|
||||||
|
@ -4528,7 +4527,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
if ($this->_version == self::XLS_BIFF8 && !$this->_readDataOnly) {
|
if ($this->_version == self::XLS_BIFF8 && !$this->_readDataOnly) {
|
||||||
$cellRangeAddressList = $this->_readBIFF8CellRangeAddressList($recordData);
|
$cellRangeAddressList = $this->_readBIFF8CellRangeAddressList($recordData);
|
||||||
foreach ($cellRangeAddressList['cellRangeAddresses'] as $cellRangeAddress) {
|
foreach ($cellRangeAddressList['cellRangeAddresses'] as $cellRangeAddress) {
|
||||||
if ((strpos($cellRangeAddress,':') !== false) &&
|
if ((strpos($cellRangeAddress, ':') !== false) &&
|
||||||
($this->_includeCellRangeFiltered($cellRangeAddress))) {
|
($this->_includeCellRangeFiltered($cellRangeAddress))) {
|
||||||
$this->_phpSheet->mergeCells($cellRangeAddress);
|
$this->_phpSheet->mergeCells($cellRangeAddress);
|
||||||
}
|
}
|
||||||
|
@ -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
|
// 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);
|
$url = self::_encodeUTF16(substr($recordData, $offset, $us - 2), false);
|
||||||
$nullOffset = strpos($url, 0x00);
|
$nullOffset = strpos($url, 0x00);
|
||||||
if ($nullOffset)
|
if ($nullOffset) {
|
||||||
$url = substr($url,0, $nullOffset);
|
$url = substr($url, 0, $nullOffset);
|
||||||
|
}
|
||||||
$url .= $hasText ? '#' : '';
|
$url .= $hasText ? '#' : '';
|
||||||
$offset += $us;
|
$offset += $us;
|
||||||
break;
|
break;
|
||||||
|
@ -7468,13 +7468,13 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
$mantissa = (0x100000 | ($rknumhigh & 0x000fffff));
|
$mantissa = (0x100000 | ($rknumhigh & 0x000fffff));
|
||||||
$mantissalow1 = ($rknumlow & 0x80000000) >> 31;
|
$mantissalow1 = ($rknumlow & 0x80000000) >> 31;
|
||||||
$mantissalow2 = ($rknumlow & 0x7fffffff);
|
$mantissalow2 = ($rknumlow & 0x7fffffff);
|
||||||
$value = $mantissa / pow(2 , (20 - $exp));
|
$value = $mantissa / pow(2, (20 - $exp));
|
||||||
|
|
||||||
if ($mantissalow1 != 0) {
|
if ($mantissalow1 != 0) {
|
||||||
$value += 1 / pow (2 , (21 - $exp));
|
$value += 1 / pow (2, (21 - $exp));
|
||||||
}
|
}
|
||||||
|
|
||||||
$value += $mantissalow2 / pow (2 , (52 - $exp));
|
$value += $mantissalow2 / pow (2, (52 - $exp));
|
||||||
if ($sign) {
|
if ($sign) {
|
||||||
$value *= -1;
|
$value *= -1;
|
||||||
}
|
}
|
||||||
|
@ -7496,7 +7496,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
$sign = ($rknum & 0x80000000) >> 31;
|
$sign = ($rknum & 0x80000000) >> 31;
|
||||||
$exp = ($rknum & 0x7ff00000) >> 20;
|
$exp = ($rknum & 0x7ff00000) >> 20;
|
||||||
$mantissa = (0x100000 | ($rknum & 0x000ffffc));
|
$mantissa = (0x100000 | ($rknum & 0x000ffffc));
|
||||||
$value = $mantissa / pow(2 , (20- ($exp - 1023)));
|
$value = $mantissa / pow(2, (20- ($exp - 1023)));
|
||||||
if ($sign) {
|
if ($sign) {
|
||||||
$value = -1 * $value;
|
$value = -1 * $value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,7 +115,7 @@ class PHPExcel_Reader_Gnumeric extends PHPExcel_Reader_Abstract implements PHPEx
|
||||||
|
|
||||||
$xml = new XMLReader();
|
$xml = new XMLReader();
|
||||||
$xml->xml($this->securityScanFile('compress.zlib://'.realpath($pFilename)), null, PHPExcel_Settings::getLibXmlLoaderOptions());
|
$xml->xml($this->securityScanFile('compress.zlib://'.realpath($pFilename)), null, PHPExcel_Settings::getLibXmlLoaderOptions());
|
||||||
$xml->setParserProperty(2,true);
|
$xml->setParserProperty(2, true);
|
||||||
|
|
||||||
$worksheetNames = array();
|
$worksheetNames = array();
|
||||||
while ($xml->read()) {
|
while ($xml->read()) {
|
||||||
|
@ -467,7 +467,7 @@ class PHPExcel_Reader_Gnumeric extends PHPExcel_Reader_Abstract implements PHPEx
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!$this->_readDataOnly) && (isset($sheet->Objects))) {
|
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();
|
$commentAttributes = $comment->attributes();
|
||||||
// Only comment objects are handled at the moment
|
// Only comment objects are handled at the moment
|
||||||
if ($commentAttributes->Text) {
|
if ($commentAttributes->Text) {
|
||||||
|
@ -481,7 +481,6 @@ class PHPExcel_Reader_Gnumeric extends PHPExcel_Reader_Abstract implements PHPEx
|
||||||
$styleAttributes = $styleRegion->attributes();
|
$styleAttributes = $styleRegion->attributes();
|
||||||
if (($styleAttributes['startRow'] <= $maxRow) &&
|
if (($styleAttributes['startRow'] <= $maxRow) &&
|
||||||
($styleAttributes['startCol'] <= $maxCol)) {
|
($styleAttributes['startCol'] <= $maxCol)) {
|
||||||
|
|
||||||
$startColumn = PHPExcel_Cell::stringFromColumnIndex((int) $styleAttributes['startCol']);
|
$startColumn = PHPExcel_Cell::stringFromColumnIndex((int) $styleAttributes['startCol']);
|
||||||
$startRow = $styleAttributes['startRow'] + 1;
|
$startRow = $styleAttributes['startRow'] + 1;
|
||||||
|
|
||||||
|
@ -748,7 +747,7 @@ class PHPExcel_Reader_Gnumeric extends PHPExcel_Reader_Abstract implements PHPEx
|
||||||
// Handle Merged Cells in this worksheet
|
// Handle Merged Cells in this worksheet
|
||||||
if (isset($sheet->MergedRegions)) {
|
if (isset($sheet->MergedRegions)) {
|
||||||
foreach ($sheet->MergedRegions->Merge as $mergeCells) {
|
foreach ($sheet->MergedRegions->Merge as $mergeCells) {
|
||||||
if (strpos($mergeCells,':') !== false) {
|
if (strpos($mergeCells, ':') !== false) {
|
||||||
$objPHPExcel->getActiveSheet()->mergeCells($mergeCells);
|
$objPHPExcel->getActiveSheet()->mergeCells($mergeCells);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -767,7 +766,7 @@ class PHPExcel_Reader_Gnumeric extends PHPExcel_Reader_Abstract implements PHPEx
|
||||||
}
|
}
|
||||||
|
|
||||||
$range = explode('!', $range);
|
$range = explode('!', $range);
|
||||||
$range[0] = trim($range[0],"'");;
|
$range[0] = trim($range[0], "'");
|
||||||
if ($worksheet = $objPHPExcel->getSheetByName($range[0])) {
|
if ($worksheet = $objPHPExcel->getSheetByName($range[0])) {
|
||||||
$extractedRange = str_replace('$', '', $range[1]);
|
$extractedRange = str_replace('$', '', $range[1]);
|
||||||
$objPHPExcel->addNamedRange(new PHPExcel_NamedRange($name, $worksheet, $extractedRange));
|
$objPHPExcel->addNamedRange(new PHPExcel_NamedRange($name, $worksheet, $extractedRange));
|
||||||
|
@ -844,7 +843,8 @@ class PHPExcel_Reader_Gnumeric extends PHPExcel_Reader_Abstract implements PHPEx
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function _parseGnumericColour($gnmColour) {
|
private static function _parseGnumericColour($gnmColour)
|
||||||
|
{
|
||||||
list($gnmR, $gnmG, $gnmB) = explode(':', $gnmColour);
|
list($gnmR, $gnmG, $gnmB) = explode(':', $gnmColour);
|
||||||
$gnmR = substr(str_pad($gnmR, 4, '0', STR_PAD_RIGHT), 0, 2);
|
$gnmR = substr(str_pad($gnmR, 4, '0', STR_PAD_RIGHT), 0, 2);
|
||||||
$gnmG = substr(str_pad($gnmG, 4, '0', STR_PAD_RIGHT), 0, 2);
|
$gnmG = substr(str_pad($gnmG, 4, '0', STR_PAD_RIGHT), 0, 2);
|
||||||
|
|
|
@ -54,7 +54,8 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
/**
|
/**
|
||||||
* Create a new PHPExcel_Reader_OOCalc
|
* Create a new PHPExcel_Reader_OOCalc
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct()
|
||||||
|
{
|
||||||
$this->_readFilter = new PHPExcel_Reader_DefaultReadFilter();
|
$this->_readFilter = new PHPExcel_Reader_DefaultReadFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,7 +305,7 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
return $this->loadIntoExisting($pFilename, $objPHPExcel);
|
return $this->loadIntoExisting($pFilename, $objPHPExcel);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function identifyFixedStyleValue($styleList,&$styleAttributeValue)
|
private static function identifyFixedStyleValue($styleList, &$styleAttributeValue)
|
||||||
{
|
{
|
||||||
$styleAttributeValue = strtolower($styleAttributeValue);
|
$styleAttributeValue = strtolower($styleAttributeValue);
|
||||||
foreach ($styleList as $style) {
|
foreach ($styleList as $style) {
|
||||||
|
@ -358,22 +359,22 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
foreach ($officePropertyDC as $propertyName => $propertyValue) {
|
foreach ($officePropertyDC as $propertyName => $propertyValue) {
|
||||||
$propertyValue = (string) $propertyValue;
|
$propertyValue = (string) $propertyValue;
|
||||||
switch ($propertyName) {
|
switch ($propertyName) {
|
||||||
case 'title' :
|
case 'title':
|
||||||
$docProps->setTitle($propertyValue);
|
$docProps->setTitle($propertyValue);
|
||||||
break;
|
break;
|
||||||
case 'subject' :
|
case 'subject':
|
||||||
$docProps->setSubject($propertyValue);
|
$docProps->setSubject($propertyValue);
|
||||||
break;
|
break;
|
||||||
case 'creator' :
|
case 'creator':
|
||||||
$docProps->setCreator($propertyValue);
|
$docProps->setCreator($propertyValue);
|
||||||
$docProps->setLastModifiedBy($propertyValue);
|
$docProps->setLastModifiedBy($propertyValue);
|
||||||
break;
|
break;
|
||||||
case 'date' :
|
case 'date':
|
||||||
$creationDate = strtotime($propertyValue);
|
$creationDate = strtotime($propertyValue);
|
||||||
$docProps->setCreated($creationDate);
|
$docProps->setCreated($creationDate);
|
||||||
$docProps->setModified($creationDate);
|
$docProps->setModified($creationDate);
|
||||||
break;
|
break;
|
||||||
case 'description' :
|
case 'description':
|
||||||
$docProps->setDescription($propertyValue);
|
$docProps->setDescription($propertyValue);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -386,36 +387,36 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
$propertyValueAttributes = $propertyValue->attributes($namespacesMeta['meta']);
|
$propertyValueAttributes = $propertyValue->attributes($namespacesMeta['meta']);
|
||||||
$propertyValue = (string) $propertyValue;
|
$propertyValue = (string) $propertyValue;
|
||||||
switch ($propertyName) {
|
switch ($propertyName) {
|
||||||
case 'initial-creator' :
|
case 'initial-creator':
|
||||||
$docProps->setCreator($propertyValue);
|
$docProps->setCreator($propertyValue);
|
||||||
break;
|
break;
|
||||||
case 'keyword' :
|
case 'keyword':
|
||||||
$docProps->setKeywords($propertyValue);
|
$docProps->setKeywords($propertyValue);
|
||||||
break;
|
break;
|
||||||
case 'creation-date' :
|
case 'creation-date':
|
||||||
$creationDate = strtotime($propertyValue);
|
$creationDate = strtotime($propertyValue);
|
||||||
$docProps->setCreated($creationDate);
|
$docProps->setCreated($creationDate);
|
||||||
break;
|
break;
|
||||||
case 'user-defined' :
|
case 'user-defined':
|
||||||
$propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_STRING;
|
$propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_STRING;
|
||||||
foreach ($propertyValueAttributes as $key => $value) {
|
foreach ($propertyValueAttributes as $key => $value) {
|
||||||
if ($key == 'name') {
|
if ($key == 'name') {
|
||||||
$propertyValueName = (string) $value;
|
$propertyValueName = (string) $value;
|
||||||
} elseif ($key == 'value-type') {
|
} elseif ($key == 'value-type') {
|
||||||
switch ($value) {
|
switch ($value) {
|
||||||
case 'date' :
|
case 'date':
|
||||||
$propertyValue = PHPExcel_DocumentProperties::convertProperty($propertyValue, 'date');
|
$propertyValue = PHPExcel_DocumentProperties::convertProperty($propertyValue, 'date');
|
||||||
$propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_DATE;
|
$propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_DATE;
|
||||||
break;
|
break;
|
||||||
case 'boolean' :
|
case 'boolean':
|
||||||
$propertyValue = PHPExcel_DocumentProperties::convertProperty($propertyValue, 'bool');
|
$propertyValue = PHPExcel_DocumentProperties::convertProperty($propertyValue, 'bool');
|
||||||
$propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_BOOLEAN;
|
$propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_BOOLEAN;
|
||||||
break;
|
break;
|
||||||
case 'float' :
|
case 'float':
|
||||||
$propertyValue = PHPExcel_DocumentProperties::convertProperty($propertyValue, 'r4');
|
$propertyValue = PHPExcel_DocumentProperties::convertProperty($propertyValue, 'r4');
|
||||||
$propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_FLOAT;
|
$propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_FLOAT;
|
||||||
break;
|
break;
|
||||||
default :
|
default:
|
||||||
$propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_STRING;
|
$propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_STRING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -459,7 +460,7 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
// Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in
|
// Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in
|
||||||
// formula cells... during the load, all formulae should be correct, and we're simply
|
// formula cells... during the load, all formulae should be correct, and we're simply
|
||||||
// bringing the worksheet name in line with the formula, not the reverse
|
// bringing the worksheet name in line with the formula, not the reverse
|
||||||
$objPHPExcel->getActiveSheet()->setTitle($worksheetName,false);
|
$objPHPExcel->getActiveSheet()->setTitle($worksheetName, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
$rowID = 1;
|
$rowID = 1;
|
||||||
|
@ -471,10 +472,9 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
$rowData = $cellData;
|
$rowData = $cellData;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'table-row' :
|
case 'table-row':
|
||||||
$rowDataTableAttributes = $rowData->attributes($namespacesContent['table']);
|
$rowDataTableAttributes = $rowData->attributes($namespacesContent['table']);
|
||||||
$rowRepeats = (isset($rowDataTableAttributes['number-rows-repeated'])) ?
|
$rowRepeats = (isset($rowDataTableAttributes['number-rows-repeated'])) ? $rowDataTableAttributes['number-rows-repeated'] : 1;
|
||||||
$rowDataTableAttributes['number-rows-repeated'] : 1;
|
|
||||||
$columnID = 'A';
|
$columnID = 'A';
|
||||||
foreach ($rowData as $key => $cellData) {
|
foreach ($rowData as $key => $cellData) {
|
||||||
if ($this->getReadFilter() !== null) {
|
if ($this->getReadFilter() !== null) {
|
||||||
|
@ -484,9 +484,7 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
}
|
}
|
||||||
|
|
||||||
// echo '<b>'.$columnID.$rowID.'</b><br />';
|
// echo '<b>'.$columnID.$rowID.'</b><br />';
|
||||||
$cellDataText = (isset($namespacesContent['text'])) ?
|
$cellDataText = (isset($namespacesContent['text'])) ? $cellData->children($namespacesContent['text']) : '';
|
||||||
$cellData->children($namespacesContent['text']) :
|
|
||||||
'';
|
|
||||||
$cellDataOffice = $cellData->children($namespacesContent['office']);
|
$cellDataOffice = $cellData->children($namespacesContent['office']);
|
||||||
$cellDataOfficeAttributes = $cellData->attributes($namespacesContent['office']);
|
$cellDataOfficeAttributes = $cellData->attributes($namespacesContent['office']);
|
||||||
$cellDataTableAttributes = $cellData->attributes($namespacesContent['table']);
|
$cellDataTableAttributes = $cellData->attributes($namespacesContent['table']);
|
||||||
|
@ -522,9 +520,8 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
}
|
}
|
||||||
$text = implode("\n", $textArray);
|
$text = implode("\n", $textArray);
|
||||||
// echo $text, '<br />';
|
// echo $text, '<br />';
|
||||||
$objPHPExcel->getActiveSheet()->getComment( $columnID.$rowID )
|
$objPHPExcel->getActiveSheet()->getComment($columnID.$rowID)->setText($this->_parseRichText($text));
|
||||||
// ->setAuthor( $author )
|
// ->setAuthor( $author )
|
||||||
->setText($this->_parseRichText($text) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($cellDataText->p)) {
|
if (isset($cellDataText->p)) {
|
||||||
|
@ -550,7 +547,7 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
|
|
||||||
// echo 'Value Type is '.$cellDataOfficeAttributes['value-type'].'<br />';
|
// echo 'Value Type is '.$cellDataOfficeAttributes['value-type'].'<br />';
|
||||||
switch ($cellDataOfficeAttributes['value-type']) {
|
switch ($cellDataOfficeAttributes['value-type']) {
|
||||||
case 'string' :
|
case 'string':
|
||||||
$type = PHPExcel_Cell_DataType::TYPE_STRING;
|
$type = PHPExcel_Cell_DataType::TYPE_STRING;
|
||||||
$dataValue = $allCellDataText;
|
$dataValue = $allCellDataText;
|
||||||
if (isset($dataValue->a)) {
|
if (isset($dataValue->a)) {
|
||||||
|
@ -559,11 +556,11 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
$hyperlink = $cellXLinkAttributes['href'];
|
$hyperlink = $cellXLinkAttributes['href'];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'boolean' :
|
case 'boolean':
|
||||||
$type = PHPExcel_Cell_DataType::TYPE_BOOL;
|
$type = PHPExcel_Cell_DataType::TYPE_BOOL;
|
||||||
$dataValue = ($allCellDataText == 'TRUE') ? true : false;
|
$dataValue = ($allCellDataText == 'TRUE') ? true : false;
|
||||||
break;
|
break;
|
||||||
case 'percentage' :
|
case 'percentage':
|
||||||
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
|
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
|
||||||
$dataValue = (float) $cellDataOfficeAttributes['value'];
|
$dataValue = (float) $cellDataOfficeAttributes['value'];
|
||||||
if (floor($dataValue) == $dataValue) {
|
if (floor($dataValue) == $dataValue) {
|
||||||
|
@ -571,7 +568,7 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
}
|
}
|
||||||
$formatting = PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00;
|
$formatting = PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00;
|
||||||
break;
|
break;
|
||||||
case 'currency' :
|
case 'currency':
|
||||||
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
|
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
|
||||||
$dataValue = (float) $cellDataOfficeAttributes['value'];
|
$dataValue = (float) $cellDataOfficeAttributes['value'];
|
||||||
if (floor($dataValue) == $dataValue) {
|
if (floor($dataValue) == $dataValue) {
|
||||||
|
@ -579,17 +576,18 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
}
|
}
|
||||||
$formatting = PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE;
|
$formatting = PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE;
|
||||||
break;
|
break;
|
||||||
case 'float' :
|
case 'float':
|
||||||
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
|
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
|
||||||
$dataValue = (float) $cellDataOfficeAttributes['value'];
|
$dataValue = (float) $cellDataOfficeAttributes['value'];
|
||||||
if (floor($dataValue) == $dataValue) {
|
if (floor($dataValue) == $dataValue) {
|
||||||
if ($dataValue == (integer) $dataValue)
|
if ($dataValue == (integer) $dataValue) {
|
||||||
$dataValue = (integer) $dataValue;
|
$dataValue = (integer) $dataValue;
|
||||||
else
|
} else {
|
||||||
$dataValue = (float) $dataValue;
|
$dataValue = (float) $dataValue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'date' :
|
case 'date':
|
||||||
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
|
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
|
||||||
$dateObj = new DateTime($cellDataOfficeAttributes['date-value'], $GMT);
|
$dateObj = new DateTime($cellDataOfficeAttributes['date-value'], $GMT);
|
||||||
$dateObj->setTimeZone($timezoneObj);
|
$dateObj->setTimeZone($timezoneObj);
|
||||||
|
@ -601,9 +599,9 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
$formatting = PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX15;
|
$formatting = PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX15;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'time' :
|
case 'time':
|
||||||
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
|
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
|
||||||
$dataValue = PHPExcel_Shared_Date::PHPToExcel(strtotime('01-01-1970 '.implode(':',sscanf($cellDataOfficeAttributes['time-value'], 'PT%dH%dM%dS'))));
|
$dataValue = PHPExcel_Shared_Date::PHPToExcel(strtotime('01-01-1970 '.implode(':', sscanf($cellDataOfficeAttributes['time-value'], 'PT%dH%dM%dS'))));
|
||||||
$formatting = PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME4;
|
$formatting = PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME4;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -619,7 +617,7 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
if ($hasCalculatedValue) {
|
if ($hasCalculatedValue) {
|
||||||
$type = PHPExcel_Cell_DataType::TYPE_FORMULA;
|
$type = PHPExcel_Cell_DataType::TYPE_FORMULA;
|
||||||
// echo 'Formula: ', $cellDataFormula, PHP_EOL;
|
// echo 'Formula: ', $cellDataFormula, PHP_EOL;
|
||||||
$cellDataFormula = substr($cellDataFormula,strpos($cellDataFormula, ':=')+1);
|
$cellDataFormula = substr($cellDataFormula, strpos($cellDataFormula, ':=')+1);
|
||||||
$temp = explode('"', $cellDataFormula);
|
$temp = explode('"', $cellDataFormula);
|
||||||
$tKey = false;
|
$tKey = false;
|
||||||
foreach ($temp as &$value) {
|
foreach ($temp as &$value) {
|
||||||
|
|
|
@ -269,7 +269,7 @@ class PHPExcel_Reader_SYLK extends PHPExcel_Reader_Abstract implements PHPExcel_
|
||||||
$formatArray['font']['size'] = substr($rowDatum, 1);
|
$formatArray['font']['size'] = substr($rowDatum, 1);
|
||||||
break;
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
$styleSettings = substr($rowDatum,1);
|
$styleSettings = substr($rowDatum, 1);
|
||||||
for ($i=0; $i<strlen($styleSettings); ++$i) {
|
for ($i=0; $i<strlen($styleSettings); ++$i) {
|
||||||
switch ($styleSettings{$i}) {
|
switch ($styleSettings{$i}) {
|
||||||
case 'I':
|
case 'I':
|
||||||
|
|
|
@ -72,7 +72,7 @@ class EigenvalueDecomposition
|
||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
private function tred2 ()
|
private function tred2()
|
||||||
{
|
{
|
||||||
// This is derived from the Algol procedures tred2 by
|
// This is derived from the Algol procedures tred2 by
|
||||||
// Bowdler, Martin, Reinsch, and Wilkinson, Handbook for
|
// Bowdler, Martin, Reinsch, and Wilkinson, Handbook for
|
||||||
|
@ -189,7 +189,7 @@ class EigenvalueDecomposition
|
||||||
$this->e[$this->n-1] = 0.0;
|
$this->e[$this->n-1] = 0.0;
|
||||||
$f = 0.0;
|
$f = 0.0;
|
||||||
$tst1 = 0.0;
|
$tst1 = 0.0;
|
||||||
$eps = pow(2.0,-52.0);
|
$eps = pow(2.0, -52.0);
|
||||||
|
|
||||||
for ($l = 0; $l < $this->n; ++$l) {
|
for ($l = 0; $l < $this->n; ++$l) {
|
||||||
// Find small subdiagonal element
|
// Find small subdiagonal element
|
||||||
|
@ -741,7 +741,7 @@ class EigenvalueDecomposition
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Overflow control
|
// Overflow control
|
||||||
$t = max(abs($this->H[$i][$n-1]),abs($this->H[$i][$n]));
|
$t = max(abs($this->H[$i][$n-1]), abs($this->H[$i][$n]));
|
||||||
if (($eps * $t) * $t > 1) {
|
if (($eps * $t) * $t > 1) {
|
||||||
for ($j = $i; $j <= $n; ++$j) {
|
for ($j = $i; $j <= $n; ++$j) {
|
||||||
$this->H[$j][$n-1] = $this->H[$j][$n-1] / $t;
|
$this->H[$j][$n-1] = $this->H[$j][$n-1] / $t;
|
||||||
|
|
|
@ -95,8 +95,8 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
$this->n = 0;
|
$this->n = 0;
|
||||||
}
|
}
|
||||||
if (($this->m * $this->n) == count($args[0])) {
|
if (($this->m * $this->n) == count($args[0])) {
|
||||||
for($i = 0; $i < $this->m; ++$i) {
|
for ($i = 0; $i < $this->m; ++$i) {
|
||||||
for($j = 0; $j < $this->n; ++$j) {
|
for ($j = 0; $j < $this->n; ++$j) {
|
||||||
$this->A[$i][$j] = $args[0][$i + $j * $this->m];
|
$this->A[$i][$j] = $args[0][$i + $j * $this->m];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -176,11 +176,19 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
//A($i0...; $j0...)
|
//A($i0...; $j0...)
|
||||||
case 'integer,integer':
|
case 'integer,integer':
|
||||||
list($i0, $j0) = $args;
|
list($i0, $j0) = $args;
|
||||||
if ($i0 >= 0) { $m = $this->m - $i0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
if ($i0 >= 0) {
|
||||||
if ($j0 >= 0) { $n = $this->n - $j0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
$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);
|
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
|
||||||
for($i = $i0; $i < $this->m; ++$i) {
|
for ($i = $i0; $i < $this->m; ++$i) {
|
||||||
for($j = $j0; $j < $this->n; ++$j) {
|
for ($j = $j0; $j < $this->n; ++$j) {
|
||||||
$R->set($i, $j, $this->A[$i][$j]);
|
$R->set($i, $j, $this->A[$i][$j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -189,11 +197,15 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
//A($i0...$iF; $j0...$jF)
|
//A($i0...$iF; $j0...$jF)
|
||||||
case 'integer,integer,integer,integer':
|
case 'integer,integer,integer,integer':
|
||||||
list($i0, $iF, $j0, $jF) = $args;
|
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 (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) {
|
||||||
if (($jF > $j0) && ($this->n >= $jF) && ($j0 >= 0)) { $n = $jF - $j0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
$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);
|
$R = new PHPExcel_Shared_JAMA_Matrix($m+1, $n+1);
|
||||||
for($i = $i0; $i <= $iF; ++$i) {
|
for ($i = $i0; $i <= $iF; ++$i) {
|
||||||
for($j = $j0; $j <= $jF; ++$j) {
|
for ($j = $j0; $j <= $jF; ++$j) {
|
||||||
$R->set($i - $i0, $j - $j0, $this->A[$i][$j]);
|
$R->set($i - $i0, $j - $j0, $this->A[$i][$j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -202,11 +214,19 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
//$R = array of row indices; $C = array of column indices
|
//$R = array of row indices; $C = array of column indices
|
||||||
case 'array,array':
|
case 'array,array':
|
||||||
list($RL, $CL) = $args;
|
list($RL, $CL) = $args;
|
||||||
if (count($RL) > 0) { $m = count($RL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
if (count($RL) > 0) {
|
||||||
if (count($CL) > 0) { $n = count($CL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
$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);
|
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
|
||||||
for($i = 0; $i < $m; ++$i) {
|
for ($i = 0; $i < $m; ++$i) {
|
||||||
for($j = 0; $j < $n; ++$j) {
|
for ($j = 0; $j < $n; ++$j) {
|
||||||
$R->set($i - $i0, $j - $j0, $this->A[$RL[$i]][$CL[$j]]);
|
$R->set($i - $i0, $j - $j0, $this->A[$RL[$i]][$CL[$j]]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -215,11 +235,19 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
//$RL = array of row indices; $CL = array of column indices
|
//$RL = array of row indices; $CL = array of column indices
|
||||||
case 'array,array':
|
case 'array,array':
|
||||||
list($RL, $CL) = $args;
|
list($RL, $CL) = $args;
|
||||||
if (count($RL) > 0) { $m = count($RL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
if (count($RL) > 0) {
|
||||||
if (count($CL) > 0) { $n = count($CL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
$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);
|
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
|
||||||
for($i = 0; $i < $m; ++$i) {
|
for ($i = 0; $i < $m; ++$i) {
|
||||||
for($j = 0; $j < $n; ++$j) {
|
for ($j = 0; $j < $n; ++$j) {
|
||||||
$R->set($i, $j, $this->A[$RL[$i]][$CL[$j]]);
|
$R->set($i, $j, $this->A[$RL[$i]][$CL[$j]]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -228,11 +256,19 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
//A($i0...$iF); $CL = array of column indices
|
//A($i0...$iF); $CL = array of column indices
|
||||||
case 'integer,integer,array':
|
case 'integer,integer,array':
|
||||||
list($i0, $iF, $CL) = $args;
|
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 (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) {
|
||||||
if (count($CL) > 0) { $n = count($CL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
$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);
|
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
|
||||||
for($i = $i0; $i < $iF; ++$i) {
|
for ($i = $i0; $i < $iF; ++$i) {
|
||||||
for($j = 0; $j < $n; ++$j) {
|
for ($j = 0; $j < $n; ++$j) {
|
||||||
$R->set($i - $i0, $j, $this->A[$RL[$i]][$j]);
|
$R->set($i - $i0, $j, $this->A[$RL[$i]][$j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -241,11 +277,19 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
//$RL = array of row indices
|
//$RL = array of row indices
|
||||||
case 'array,integer,integer':
|
case 'array,integer,integer':
|
||||||
list($RL, $j0, $jF) = $args;
|
list($RL, $j0, $jF) = $args;
|
||||||
if (count($RL) > 0) { $m = count($RL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
if (count($RL) > 0) {
|
||||||
if (($jF >= $j0) && ($this->n >= $jF) && ($j0 >= 0)) { $n = $jF - $j0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
$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);
|
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n+1);
|
||||||
for($i = 0; $i < $m; ++$i) {
|
for ($i = 0; $i < $m; ++$i) {
|
||||||
for($j = $j0; $j <= $jF; ++$j) {
|
for ($j = $j0; $j <= $jF; ++$j) {
|
||||||
$R->set($i, $j - $j0, $this->A[$RL[$i]][$j]);
|
$R->set($i, $j - $j0, $this->A[$RL[$i]][$j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -320,7 +364,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
public function diagonal($m = null, $n = null, $c = 1)
|
public function diagonal($m = null, $n = null, $c = 1)
|
||||||
{
|
{
|
||||||
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
|
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
|
||||||
for($i = 0; $i < $m; ++$i) {
|
for ($i = 0; $i < $m; ++$i) {
|
||||||
$R->set($i, $i, $c);
|
$R->set($i, $i, $c);
|
||||||
}
|
}
|
||||||
return $R;
|
return $R;
|
||||||
|
@ -377,8 +421,8 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
public function transpose()
|
public function transpose()
|
||||||
{
|
{
|
||||||
$R = new PHPExcel_Shared_JAMA_Matrix($this->n, $this->m);
|
$R = new PHPExcel_Shared_JAMA_Matrix($this->n, $this->m);
|
||||||
for($i = 0; $i < $this->m; ++$i) {
|
for ($i = 0; $i < $this->m; ++$i) {
|
||||||
for($j = 0; $j < $this->n; ++$j) {
|
for ($j = 0; $j < $this->n; ++$j) {
|
||||||
$R->set($j, $i, $this->A[$i][$j]);
|
$R->set($j, $i, $this->A[$i][$j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -395,7 +439,7 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
{
|
{
|
||||||
$s = 0;
|
$s = 0;
|
||||||
$n = min($this->m, $this->n);
|
$n = min($this->m, $this->n);
|
||||||
for($i = 0; $i < $n; ++$i) {
|
for ($i = 0; $i < $n; ++$i) {
|
||||||
$s += $this->A[$i][$i];
|
$s += $this->A[$i][$i];
|
||||||
}
|
}
|
||||||
return $s;
|
return $s;
|
||||||
|
@ -440,8 +484,8 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->checkMatrixDimensions($M);
|
$this->checkMatrixDimensions($M);
|
||||||
for($i = 0; $i < $this->m; ++$i) {
|
for ($i = 0; $i < $this->m; ++$i) {
|
||||||
for($j = 0; $j < $this->n; ++$j) {
|
for ($j = 0; $j < $this->n; ++$j) {
|
||||||
$M->set($i, $j, $M->get($i, $j) + $this->A[$i][$j]);
|
$M->set($i, $j, $M->get($i, $j) + $this->A[$i][$j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -480,16 +524,16 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->checkMatrixDimensions($M);
|
$this->checkMatrixDimensions($M);
|
||||||
for($i = 0; $i < $this->m; ++$i) {
|
for ($i = 0; $i < $this->m; ++$i) {
|
||||||
for($j = 0; $j < $this->n; ++$j) {
|
for ($j = 0; $j < $this->n; ++$j) {
|
||||||
$validValues = true;
|
$validValues = true;
|
||||||
$value = $M->get($i, $j);
|
$value = $M->get($i, $j);
|
||||||
if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) {
|
if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) {
|
||||||
$this->A[$i][$j] = trim($this->A[$i][$j],'"');
|
$this->A[$i][$j] = trim($this->A[$i][$j], '"');
|
||||||
$validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($this->A[$i][$j]);
|
$validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($this->A[$i][$j]);
|
||||||
}
|
}
|
||||||
if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) {
|
if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) {
|
||||||
$value = trim($value,'"');
|
$value = trim($value, '"');
|
||||||
$validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($value);
|
$validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($value);
|
||||||
}
|
}
|
||||||
if ($validValues) {
|
if ($validValues) {
|
||||||
|
@ -534,8 +578,8 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->checkMatrixDimensions($M);
|
$this->checkMatrixDimensions($M);
|
||||||
for($i = 0; $i < $this->m; ++$i) {
|
for ($i = 0; $i < $this->m; ++$i) {
|
||||||
for($j = 0; $j < $this->n; ++$j) {
|
for ($j = 0; $j < $this->n; ++$j) {
|
||||||
$M->set($i, $j, $M->get($i, $j) - $this->A[$i][$j]);
|
$M->set($i, $j, $M->get($i, $j) - $this->A[$i][$j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -574,16 +618,16 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->checkMatrixDimensions($M);
|
$this->checkMatrixDimensions($M);
|
||||||
for($i = 0; $i < $this->m; ++$i) {
|
for ($i = 0; $i < $this->m; ++$i) {
|
||||||
for($j = 0; $j < $this->n; ++$j) {
|
for ($j = 0; $j < $this->n; ++$j) {
|
||||||
$validValues = true;
|
$validValues = true;
|
||||||
$value = $M->get($i, $j);
|
$value = $M->get($i, $j);
|
||||||
if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) {
|
if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) {
|
||||||
$this->A[$i][$j] = trim($this->A[$i][$j],'"');
|
$this->A[$i][$j] = trim($this->A[$i][$j], '"');
|
||||||
$validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($this->A[$i][$j]);
|
$validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($this->A[$i][$j]);
|
||||||
}
|
}
|
||||||
if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) {
|
if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) {
|
||||||
$value = trim($value,'"');
|
$value = trim($value, '"');
|
||||||
$validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($value);
|
$validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($value);
|
||||||
}
|
}
|
||||||
if ($validValues) {
|
if ($validValues) {
|
||||||
|
@ -629,8 +673,8 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->checkMatrixDimensions($M);
|
$this->checkMatrixDimensions($M);
|
||||||
for($i = 0; $i < $this->m; ++$i) {
|
for ($i = 0; $i < $this->m; ++$i) {
|
||||||
for($j = 0; $j < $this->n; ++$j) {
|
for ($j = 0; $j < $this->n; ++$j) {
|
||||||
$M->set($i, $j, $M->get($i, $j) * $this->A[$i][$j]);
|
$M->set($i, $j, $M->get($i, $j) * $this->A[$i][$j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -670,16 +714,16 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->checkMatrixDimensions($M);
|
$this->checkMatrixDimensions($M);
|
||||||
for($i = 0; $i < $this->m; ++$i) {
|
for ($i = 0; $i < $this->m; ++$i) {
|
||||||
for($j = 0; $j < $this->n; ++$j) {
|
for ($j = 0; $j < $this->n; ++$j) {
|
||||||
$validValues = true;
|
$validValues = true;
|
||||||
$value = $M->get($i, $j);
|
$value = $M->get($i, $j);
|
||||||
if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) {
|
if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) {
|
||||||
$this->A[$i][$j] = trim($this->A[$i][$j],'"');
|
$this->A[$i][$j] = trim($this->A[$i][$j], '"');
|
||||||
$validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($this->A[$i][$j]);
|
$validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($this->A[$i][$j]);
|
||||||
}
|
}
|
||||||
if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) {
|
if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) {
|
||||||
$value = trim($value,'"');
|
$value = trim($value, '"');
|
||||||
$validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($value);
|
$validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($value);
|
||||||
}
|
}
|
||||||
if ($validValues) {
|
if ($validValues) {
|
||||||
|
@ -725,16 +769,16 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->checkMatrixDimensions($M);
|
$this->checkMatrixDimensions($M);
|
||||||
for($i = 0; $i < $this->m; ++$i) {
|
for ($i = 0; $i < $this->m; ++$i) {
|
||||||
for($j = 0; $j < $this->n; ++$j) {
|
for ($j = 0; $j < $this->n; ++$j) {
|
||||||
$validValues = true;
|
$validValues = true;
|
||||||
$value = $M->get($i, $j);
|
$value = $M->get($i, $j);
|
||||||
if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) {
|
if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) {
|
||||||
$this->A[$i][$j] = trim($this->A[$i][$j],'"');
|
$this->A[$i][$j] = trim($this->A[$i][$j], '"');
|
||||||
$validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($this->A[$i][$j]);
|
$validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($this->A[$i][$j]);
|
||||||
}
|
}
|
||||||
if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) {
|
if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) {
|
||||||
$value = trim($value,'"');
|
$value = trim($value, '"');
|
||||||
$validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($value);
|
$validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($value);
|
||||||
}
|
}
|
||||||
if ($validValues) {
|
if ($validValues) {
|
||||||
|
@ -786,8 +830,8 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->checkMatrixDimensions($M);
|
$this->checkMatrixDimensions($M);
|
||||||
for($i = 0; $i < $this->m; ++$i) {
|
for ($i = 0; $i < $this->m; ++$i) {
|
||||||
for($j = 0; $j < $this->n; ++$j) {
|
for ($j = 0; $j < $this->n; ++$j) {
|
||||||
$this->A[$i][$j] = $this->A[$i][$j] / $M->get($i, $j);
|
$this->A[$i][$j] = $this->A[$i][$j] / $M->get($i, $j);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -828,8 +872,8 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->checkMatrixDimensions($M);
|
$this->checkMatrixDimensions($M);
|
||||||
for($i = 0; $i < $this->m; ++$i) {
|
for ($i = 0; $i < $this->m; ++$i) {
|
||||||
for($j = 0; $j < $this->n; ++$j) {
|
for ($j = 0; $j < $this->n; ++$j) {
|
||||||
$M->set($i, $j, $M->get($i, $j) / $this->A[$i][$j]);
|
$M->set($i, $j, $M->get($i, $j) / $this->A[$i][$j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -870,8 +914,8 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->checkMatrixDimensions($M);
|
$this->checkMatrixDimensions($M);
|
||||||
for($i = 0; $i < $this->m; ++$i) {
|
for ($i = 0; $i < $this->m; ++$i) {
|
||||||
for($j = 0; $j < $this->n; ++$j) {
|
for ($j = 0; $j < $this->n; ++$j) {
|
||||||
$this->A[$i][$j] = $M->get($i, $j) / $this->A[$i][$j];
|
$this->A[$i][$j] = $M->get($i, $j) / $this->A[$i][$j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -904,14 +948,14 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
}
|
}
|
||||||
if ($this->n == $B->m) {
|
if ($this->n == $B->m) {
|
||||||
$C = new PHPExcel_Shared_JAMA_Matrix($this->m, $B->n);
|
$C = new PHPExcel_Shared_JAMA_Matrix($this->m, $B->n);
|
||||||
for($j = 0; $j < $B->n; ++$j) {
|
for ($j = 0; $j < $B->n; ++$j) {
|
||||||
for ($k = 0; $k < $this->n; ++$k) {
|
for ($k = 0; $k < $this->n; ++$k) {
|
||||||
$Bcolj[$k] = $B->A[$k][$j];
|
$Bcolj[$k] = $B->A[$k][$j];
|
||||||
}
|
}
|
||||||
for($i = 0; $i < $this->m; ++$i) {
|
for ($i = 0; $i < $this->m; ++$i) {
|
||||||
$Arowi = $this->A[$i];
|
$Arowi = $this->A[$i];
|
||||||
$s = 0;
|
$s = 0;
|
||||||
for($k = 0; $k < $this->n; ++$k) {
|
for ($k = 0; $k < $this->n; ++$k) {
|
||||||
$s += $Arowi[$k] * $Bcolj[$k];
|
$s += $Arowi[$k] * $Bcolj[$k];
|
||||||
}
|
}
|
||||||
$C->A[$i][$j] = $s;
|
$C->A[$i][$j] = $s;
|
||||||
|
@ -926,10 +970,10 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
$B = new PHPExcel_Shared_JAMA_Matrix($args[0]);
|
$B = new PHPExcel_Shared_JAMA_Matrix($args[0]);
|
||||||
if ($this->n == $B->m) {
|
if ($this->n == $B->m) {
|
||||||
$C = new PHPExcel_Shared_JAMA_Matrix($this->m, $B->n);
|
$C = new PHPExcel_Shared_JAMA_Matrix($this->m, $B->n);
|
||||||
for($i = 0; $i < $C->m; ++$i) {
|
for ($i = 0; $i < $C->m; ++$i) {
|
||||||
for($j = 0; $j < $C->n; ++$j) {
|
for ($j = 0; $j < $C->n; ++$j) {
|
||||||
$s = "0";
|
$s = "0";
|
||||||
for($k = 0; $k < $C->n; ++$k) {
|
for ($k = 0; $k < $C->n; ++$k) {
|
||||||
$s += $this->A[$i][$k] * $B->A[$k][$j];
|
$s += $this->A[$i][$k] * $B->A[$k][$j];
|
||||||
}
|
}
|
||||||
$C->A[$i][$j] = $s;
|
$C->A[$i][$j] = $s;
|
||||||
|
@ -943,8 +987,8 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
break;
|
break;
|
||||||
case 'integer':
|
case 'integer':
|
||||||
$C = new PHPExcel_Shared_JAMA_Matrix($this->A);
|
$C = new PHPExcel_Shared_JAMA_Matrix($this->A);
|
||||||
for($i = 0; $i < $C->m; ++$i) {
|
for ($i = 0; $i < $C->m; ++$i) {
|
||||||
for($j = 0; $j < $C->n; ++$j) {
|
for ($j = 0; $j < $C->n; ++$j) {
|
||||||
$C->A[$i][$j] *= $args[0];
|
$C->A[$i][$j] *= $args[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -952,8 +996,8 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
break;
|
break;
|
||||||
case 'double':
|
case 'double':
|
||||||
$C = new PHPExcel_Shared_JAMA_Matrix($this->m, $this->n);
|
$C = new PHPExcel_Shared_JAMA_Matrix($this->m, $this->n);
|
||||||
for($i = 0; $i < $C->m; ++$i) {
|
for ($i = 0; $i < $C->m; ++$i) {
|
||||||
for($j = 0; $j < $C->n; ++$j) {
|
for ($j = 0; $j < $C->n; ++$j) {
|
||||||
$C->A[$i][$j] = $args[0] * $this->A[$i][$j];
|
$C->A[$i][$j] = $args[0] * $this->A[$i][$j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -961,8 +1005,8 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
break;
|
break;
|
||||||
case 'float':
|
case 'float':
|
||||||
$C = new PHPExcel_Shared_JAMA_Matrix($this->A);
|
$C = new PHPExcel_Shared_JAMA_Matrix($this->A);
|
||||||
for($i = 0; $i < $C->m; ++$i) {
|
for ($i = 0; $i < $C->m; ++$i) {
|
||||||
for($j = 0; $j < $C->n; ++$j) {
|
for ($j = 0; $j < $C->n; ++$j) {
|
||||||
$C->A[$i][$j] *= $args[0];
|
$C->A[$i][$j] *= $args[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1006,16 +1050,16 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->checkMatrixDimensions($M);
|
$this->checkMatrixDimensions($M);
|
||||||
for($i = 0; $i < $this->m; ++$i) {
|
for ($i = 0; $i < $this->m; ++$i) {
|
||||||
for($j = 0; $j < $this->n; ++$j) {
|
for ($j = 0; $j < $this->n; ++$j) {
|
||||||
$validValues = true;
|
$validValues = true;
|
||||||
$value = $M->get($i, $j);
|
$value = $M->get($i, $j);
|
||||||
if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) {
|
if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) {
|
||||||
$this->A[$i][$j] = trim($this->A[$i][$j],'"');
|
$this->A[$i][$j] = trim($this->A[$i][$j], '"');
|
||||||
$validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($this->A[$i][$j]);
|
$validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($this->A[$i][$j]);
|
||||||
}
|
}
|
||||||
if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) {
|
if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) {
|
||||||
$value = trim($value,'"');
|
$value = trim($value, '"');
|
||||||
$validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($value);
|
$validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($value);
|
||||||
}
|
}
|
||||||
if ($validValues) {
|
if ($validValues) {
|
||||||
|
@ -1059,9 +1103,9 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->checkMatrixDimensions($M);
|
$this->checkMatrixDimensions($M);
|
||||||
for($i = 0; $i < $this->m; ++$i) {
|
for ($i = 0; $i < $this->m; ++$i) {
|
||||||
for($j = 0; $j < $this->n; ++$j) {
|
for ($j = 0; $j < $this->n; ++$j) {
|
||||||
$this->A[$i][$j] = trim($this->A[$i][$j],'"').trim($M->get($i, $j),'"');
|
$this->A[$i][$j] = trim($this->A[$i][$j], '"').trim($M->get($i, $j), '"');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
|
|
|
@ -233,4 +233,3 @@ class PHPExcel_Shared_JAMA_QRDecomposition
|
||||||
}
|
}
|
||||||
} // function solve()
|
} // function solve()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ class PHPExcel_Shared_OLE_PPS_Root extends PHPExcel_Shared_OLE_PPS
|
||||||
$this->_tmp_dir = PHPExcel_Shared_File::sys_get_temp_dir();
|
$this->_tmp_dir = PHPExcel_Shared_File::sys_get_temp_dir();
|
||||||
}
|
}
|
||||||
$this->_tmp_filename = tempnam($this->_tmp_dir, "OLE_PPS_Root");
|
$this->_tmp_filename = tempnam($this->_tmp_dir, "OLE_PPS_Root");
|
||||||
$this->_FILEH_ = fopen($this->_tmp_filename,"w+b");
|
$this->_FILEH_ = fopen($this->_tmp_filename, "w+b");
|
||||||
if ($this->_FILEH_ == false) {
|
if ($this->_FILEH_ == false) {
|
||||||
throw new PHPExcel_Writer_Exception("Can't create temporary file.");
|
throw new PHPExcel_Writer_Exception("Can't create temporary file.");
|
||||||
}
|
}
|
||||||
|
|
|
@ -3458,7 +3458,6 @@ class PclZip
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) {
|
if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) {
|
||||||
|
|
||||||
// ----- Change the file status
|
// ----- Change the file status
|
||||||
$p_entry['status'] = "path_creation_fail";
|
$p_entry['status'] = "path_creation_fail";
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DATE'),$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()
|
public function providerDATE()
|
||||||
|
@ -38,7 +38,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
||||||
$result = PHPExcel_Calculation_DateTime::DATE(2012,1,31);
|
$result = PHPExcel_Calculation_DateTime::DATE(2012,1,31);
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
|
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()
|
public function testDATEtoPHPObject()
|
||||||
|
@ -78,7 +78,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DATEVALUE'),$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()
|
public function providerDATEVALUE()
|
||||||
|
@ -91,7 +91,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
||||||
$result = PHPExcel_Calculation_DateTime::DATEVALUE('2012-1-31');
|
$result = PHPExcel_Calculation_DateTime::DATEVALUE('2012-1-31');
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
|
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()
|
public function testDATEVALUEtoPHPObject()
|
||||||
|
@ -115,7 +115,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','YEAR'),$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()
|
public function providerYEAR()
|
||||||
|
@ -131,7 +131,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','MONTHOFYEAR'),$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()
|
public function providerMONTH()
|
||||||
|
@ -147,7 +147,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','WEEKOFYEAR'),$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()
|
public function providerWEEKNUM()
|
||||||
|
@ -163,7 +163,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DAYOFWEEK'),$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()
|
public function providerWEEKDAY()
|
||||||
|
@ -179,7 +179,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DAYOFMONTH'),$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()
|
public function providerDAY()
|
||||||
|
@ -195,7 +195,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','TIME'),$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()
|
public function providerTIME()
|
||||||
|
@ -208,7 +208,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
||||||
$result = PHPExcel_Calculation_DateTime::TIME(7,30,20);
|
$result = PHPExcel_Calculation_DateTime::TIME(7,30,20);
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
|
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()
|
public function testTIMEtoPHPObject()
|
||||||
|
@ -232,7 +232,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','TIMEVALUE'),$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()
|
public function providerTIMEVALUE()
|
||||||
|
@ -245,7 +245,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
||||||
$result = PHPExcel_Calculation_DateTime::TIMEVALUE('7:30:20');
|
$result = PHPExcel_Calculation_DateTime::TIMEVALUE('7:30:20');
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
|
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()
|
public function testTIMEVALUEtoPHPObject()
|
||||||
|
@ -269,7 +269,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','HOUROFDAY'),$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()
|
public function providerHOUR()
|
||||||
|
@ -285,7 +285,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','MINUTEOFHOUR'),$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()
|
public function providerMINUTE()
|
||||||
|
@ -301,7 +301,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','SECONDOFMINUTE'),$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()
|
public function providerSECOND()
|
||||||
|
@ -317,7 +317,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','NETWORKDAYS'),$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()
|
public function providerNETWORKDAYS()
|
||||||
|
@ -333,7 +333,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','WORKDAY'),$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()
|
public function providerWORKDAY()
|
||||||
|
@ -349,7 +349,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','EDATE'),$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()
|
public function providerEDATE()
|
||||||
|
@ -362,7 +362,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
||||||
$result = PHPExcel_Calculation_DateTime::EDATE('2012-1-26',-1);
|
$result = PHPExcel_Calculation_DateTime::EDATE('2012-1-26',-1);
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
|
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()
|
public function testEDATEtoPHPObject()
|
||||||
|
@ -386,7 +386,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','EOMONTH'),$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()
|
public function providerEOMONTH()
|
||||||
|
@ -399,7 +399,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
||||||
$result = PHPExcel_Calculation_DateTime::EOMONTH('2012-1-26',-1);
|
$result = PHPExcel_Calculation_DateTime::EOMONTH('2012-1-26',-1);
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
|
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()
|
public function testEOMONTHtoPHPObject()
|
||||||
|
@ -423,7 +423,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DATEDIF'),$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()
|
public function providerDATEDIF()
|
||||||
|
@ -439,7 +439,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DAYS360'),$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()
|
public function providerDAYS360()
|
||||||
|
@ -455,7 +455,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','YEARFRAC'),$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()
|
public function providerYEARFRAC()
|
||||||
|
|
|
@ -29,7 +29,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELI'),$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()
|
public function providerBESSELI()
|
||||||
|
@ -45,7 +45,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELJ'),$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()
|
public function providerBESSELJ()
|
||||||
|
@ -61,7 +61,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELK'),$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()
|
public function providerBESSELK()
|
||||||
|
@ -77,7 +77,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELY'),$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()
|
public function providerBESSELY()
|
||||||
|
@ -109,7 +109,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMAGINARY'),$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()
|
public function providerIMAGINARY()
|
||||||
|
@ -125,7 +125,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMREAL'),$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()
|
public function providerIMREAL()
|
||||||
|
@ -141,7 +141,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMABS'),$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()
|
public function providerIMABS()
|
||||||
|
@ -157,7 +157,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMARGUMENT'),$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()
|
public function providerIMARGUMENT()
|
||||||
|
@ -407,7 +407,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','ERF'),$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()
|
public function providerERF()
|
||||||
|
@ -423,7 +423,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','ERFC'),$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()
|
public function providerERFC()
|
||||||
|
@ -487,7 +487,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOBIN'),$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()
|
public function providerDEC2BIN()
|
||||||
|
@ -503,7 +503,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOHEX'),$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()
|
public function providerDEC2HEX()
|
||||||
|
@ -519,7 +519,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOOCT'),$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()
|
public function providerDEC2OCT()
|
||||||
|
@ -535,7 +535,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTOBIN'),$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()
|
public function providerHEX2BIN()
|
||||||
|
@ -551,7 +551,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTODEC'),$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()
|
public function providerHEX2DEC()
|
||||||
|
@ -567,7 +567,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTOOCT'),$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()
|
public function providerHEX2OCT()
|
||||||
|
@ -583,7 +583,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTOBIN'),$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()
|
public function providerOCT2BIN()
|
||||||
|
@ -599,7 +599,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTODEC'),$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()
|
public function providerOCT2DEC()
|
||||||
|
@ -615,7 +615,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTOHEX'),$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()
|
public function providerOCT2HEX()
|
||||||
|
@ -631,7 +631,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DELTA'),$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()
|
public function providerDELTA()
|
||||||
|
@ -647,7 +647,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','GESTEP'),$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()
|
public function providerGESTEP()
|
||||||
|
@ -687,7 +687,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','CONVERTUOM'),$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()
|
public function providerCONVERTUOM()
|
||||||
|
|
|
@ -25,7 +25,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','ACCRINT'),$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()
|
public function providerACCRINT()
|
||||||
|
@ -41,7 +41,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','ACCRINTM'),$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()
|
public function providerACCRINTM()
|
||||||
|
@ -57,7 +57,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','AMORDEGRC'),$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()
|
public function providerAMORDEGRC()
|
||||||
|
@ -73,7 +73,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','AMORLINC'),$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()
|
public function providerAMORLINC()
|
||||||
|
@ -89,7 +89,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYBS'),$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()
|
public function providerCOUPDAYBS()
|
||||||
|
@ -105,7 +105,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYS'),$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()
|
public function providerCOUPDAYS()
|
||||||
|
@ -121,7 +121,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYSNC'),$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()
|
public function providerCOUPDAYSNC()
|
||||||
|
@ -137,7 +137,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPNCD'),$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()
|
public function providerCOUPNCD()
|
||||||
|
@ -153,7 +153,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPNUM'),$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()
|
public function providerCOUPNUM()
|
||||||
|
@ -169,7 +169,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPPCD'),$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()
|
public function providerCOUPPCD()
|
||||||
|
@ -185,7 +185,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','CUMIPMT'),$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()
|
public function providerCUMIPMT()
|
||||||
|
@ -201,7 +201,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','CUMPRINC'),$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()
|
public function providerCUMPRINC()
|
||||||
|
@ -217,7 +217,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','DB'),$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()
|
public function providerDB()
|
||||||
|
@ -233,7 +233,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','DDB'),$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()
|
public function providerDDB()
|
||||||
|
@ -249,7 +249,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','DISC'),$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()
|
public function providerDISC()
|
||||||
|
@ -265,7 +265,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','DOLLARDE'),$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()
|
public function providerDOLLARDE()
|
||||||
|
@ -281,7 +281,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','DOLLARFR'),$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()
|
public function providerDOLLARFR()
|
||||||
|
@ -297,7 +297,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','EFFECT'),$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()
|
public function providerEFFECT()
|
||||||
|
@ -313,7 +313,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','FV'),$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()
|
public function providerFV()
|
||||||
|
@ -329,7 +329,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','FVSCHEDULE'),$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()
|
public function providerFVSCHEDULE()
|
||||||
|
@ -345,7 +345,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','INTRATE'),$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()
|
public function providerINTRATE()
|
||||||
|
@ -361,7 +361,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','IPMT'),$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()
|
public function providerIPMT()
|
||||||
|
@ -377,7 +377,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','IRR'),$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()
|
public function providerIRR()
|
||||||
|
@ -393,7 +393,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','ISPMT'),$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()
|
public function providerISPMT()
|
||||||
|
@ -409,7 +409,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','MIRR'),$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()
|
public function providerMIRR()
|
||||||
|
@ -425,7 +425,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','NOMINAL'),$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()
|
public function providerNOMINAL()
|
||||||
|
@ -441,7 +441,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','NPER'),$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()
|
public function providerNPER()
|
||||||
|
@ -457,7 +457,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','NPV'),$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()
|
public function providerNPV()
|
||||||
|
@ -473,7 +473,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','PRICE'),$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()
|
public function providerPRICE()
|
||||||
|
@ -489,7 +489,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','RATE'),$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()
|
public function providerRATE()
|
||||||
|
@ -505,7 +505,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','XIRR'),$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()
|
public function providerXIRR()
|
||||||
|
|
|
@ -55,7 +55,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
public function testNULL()
|
public function testNULL()
|
||||||
{
|
{
|
||||||
$result = PHPExcel_Calculation_Functions::NULL();
|
$result = PHPExcel_Calculation_Functions::null();
|
||||||
$this->assertEquals('#NULL!', $result);
|
$this->assertEquals('#NULL!', $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_BLANK'),$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()
|
public function providerIS_BLANK()
|
||||||
|
@ -89,7 +89,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ERR'),$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()
|
public function providerIS_ERR()
|
||||||
|
@ -105,7 +105,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ERROR'),$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()
|
public function providerIS_ERROR()
|
||||||
|
@ -121,7 +121,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','ERROR_TYPE'),$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()
|
public function providerERROR_TYPE()
|
||||||
|
@ -137,7 +137,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_LOGICAL'),$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()
|
public function providerIS_LOGICAL()
|
||||||
|
@ -153,7 +153,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NA'),$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()
|
public function providerIS_NA()
|
||||||
|
@ -169,7 +169,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NUMBER'),$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()
|
public function providerIS_NUMBER()
|
||||||
|
@ -185,7 +185,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_TEXT'),$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()
|
public function providerIS_TEXT()
|
||||||
|
@ -201,7 +201,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NONTEXT'),$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()
|
public function providerIS_NONTEXT()
|
||||||
|
@ -217,7 +217,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_EVEN'),$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()
|
public function providerIS_EVEN()
|
||||||
|
@ -233,7 +233,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ODD'),$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()
|
public function providerIS_ODD()
|
||||||
|
@ -249,7 +249,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','TYPE'),$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()
|
public function providerTYPE()
|
||||||
|
@ -265,7 +265,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','N'),$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()
|
public function providerN()
|
||||||
|
|
|
@ -20,13 +20,13 @@ class LogicalTest extends PHPUnit_Framework_TestCase
|
||||||
public function testTRUE()
|
public function testTRUE()
|
||||||
{
|
{
|
||||||
$result = PHPExcel_Calculation_Logical::TRUE();
|
$result = PHPExcel_Calculation_Logical::TRUE();
|
||||||
$this->assertEquals(TRUE, $result);
|
$this->assertEquals(true, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testFALSE()
|
public function testFALSE()
|
||||||
{
|
{
|
||||||
$result = PHPExcel_Calculation_Logical::FALSE();
|
$result = PHPExcel_Calculation_Logical::FALSE();
|
||||||
$this->assertEquals(FALSE, $result);
|
$this->assertEquals(false, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -25,7 +25,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ATAN2'),$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()
|
public function providerATAN2()
|
||||||
|
@ -41,7 +41,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','CEILING'),$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()
|
public function providerCEILING()
|
||||||
|
@ -57,7 +57,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','COMBIN'),$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()
|
public function providerCOMBIN()
|
||||||
|
@ -73,7 +73,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','EVEN'),$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()
|
public function providerEVEN()
|
||||||
|
@ -89,7 +89,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ODD'),$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()
|
public function providerODD()
|
||||||
|
@ -105,7 +105,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','FACT'),$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()
|
public function providerFACT()
|
||||||
|
@ -121,7 +121,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','FACTDOUBLE'),$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()
|
public function providerFACTDOUBLE()
|
||||||
|
@ -137,7 +137,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','FLOOR'),$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()
|
public function providerFLOOR()
|
||||||
|
@ -153,7 +153,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','GCD'),$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()
|
public function providerGCD()
|
||||||
|
@ -169,7 +169,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','LCM'),$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()
|
public function providerLCM()
|
||||||
|
@ -201,7 +201,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SIGN'),$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()
|
public function providerSIGN()
|
||||||
|
@ -217,7 +217,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','POWER'),$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()
|
public function providerPOWER()
|
||||||
|
@ -233,7 +233,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','LOG_BASE'),$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()
|
public function providerLOG()
|
||||||
|
@ -249,7 +249,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MOD'),$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()
|
public function providerMOD()
|
||||||
|
@ -265,7 +265,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MDETERM'),$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()
|
public function providerMDETERM()
|
||||||
|
@ -281,7 +281,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MINVERSE'),$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()
|
public function providerMINVERSE()
|
||||||
|
@ -297,7 +297,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MMULT'),$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()
|
public function providerMMULT()
|
||||||
|
@ -313,7 +313,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MULTINOMIAL'),$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()
|
public function providerMULTINOMIAL()
|
||||||
|
@ -331,7 +331,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
PHPExcel_Calculation::setArrayReturnType(PHPExcel_Calculation::RETURN_ARRAY_AS_VALUE);
|
PHPExcel_Calculation::setArrayReturnType(PHPExcel_Calculation::RETURN_ARRAY_AS_VALUE);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MROUND'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MROUND'),$args);
|
||||||
PHPExcel_Calculation::setArrayReturnType(PHPExcel_Calculation::RETURN_ARRAY_AS_ARRAY);
|
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()
|
public function providerMROUND()
|
||||||
|
@ -347,7 +347,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','PRODUCT'),$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()
|
public function providerPRODUCT()
|
||||||
|
@ -363,7 +363,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','QUOTIENT'),$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()
|
public function providerQUOTIENT()
|
||||||
|
@ -379,7 +379,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ROUNDUP'),$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()
|
public function providerROUNDUP()
|
||||||
|
@ -395,7 +395,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ROUNDDOWN'),$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()
|
public function providerROUNDDOWN()
|
||||||
|
@ -411,7 +411,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SERIESSUM'),$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()
|
public function providerSERIESSUM()
|
||||||
|
@ -427,7 +427,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SUMSQ'),$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()
|
public function providerSUMSQ()
|
||||||
|
@ -443,7 +443,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','TRUNC'),$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()
|
public function providerTRUNC()
|
||||||
|
@ -475,7 +475,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SQRTPI'),$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()
|
public function providerSQRTPI()
|
||||||
|
@ -491,7 +491,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig', 'SUMIF'), $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()
|
public function providerSUMIF()
|
||||||
|
|
|
@ -354,7 +354,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','VALUE'),$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()
|
public function providerVALUE()
|
||||||
|
|
|
@ -64,7 +64,7 @@ class AdvancedValueBinderTest extends PHPUnit_Framework_TestCase
|
||||||
PHPExcel_Shared_String::setDecimalSeparator($decimalSeparator);
|
PHPExcel_Shared_String::setDecimalSeparator($decimalSeparator);
|
||||||
PHPExcel_Shared_String::setThousandsSeparator($thousandsSeparator);
|
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 = new PHPExcel_Cell_AdvancedValueBinder();
|
||||||
$binder->bindValue($cell, $value);
|
$binder->bindValue($cell, $value);
|
||||||
|
|
|
@ -40,7 +40,7 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
$tooltipValue = 'PHPExcel Web Site';
|
$tooltipValue = 'PHPExcel Web Site';
|
||||||
|
|
||||||
$testInstance = new PHPExcel_Cell_Hyperlink(NULL, $tooltipValue);
|
$testInstance = new PHPExcel_Cell_Hyperlink(null, $tooltipValue);
|
||||||
|
|
||||||
$result = $testInstance->getTooltip();
|
$result = $testInstance->getTooltip();
|
||||||
$this->assertEquals($tooltipValue,$result);
|
$this->assertEquals($tooltipValue,$result);
|
||||||
|
@ -51,7 +51,7 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase
|
||||||
$initialTooltipValue = 'PHPExcel Web Site';
|
$initialTooltipValue = 'PHPExcel Web Site';
|
||||||
$newTooltipValue = 'PHPExcel Repository on Github';
|
$newTooltipValue = 'PHPExcel Repository on Github';
|
||||||
|
|
||||||
$testInstance = new PHPExcel_Cell_Hyperlink(NULL, $initialTooltipValue);
|
$testInstance = new PHPExcel_Cell_Hyperlink(null, $initialTooltipValue);
|
||||||
$result = $testInstance->setTooltip($newTooltipValue);
|
$result = $testInstance->setTooltip($newTooltipValue);
|
||||||
$this->assertTrue($result instanceof PHPExcel_Cell_Hyperlink);
|
$this->assertTrue($result instanceof PHPExcel_Cell_Hyperlink);
|
||||||
|
|
||||||
|
|
|
@ -186,7 +186,7 @@ class CellTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Cell','splitRange'),$args);
|
$result = call_user_func_array(array('PHPExcel_Cell','splitRange'),$args);
|
||||||
foreach($result as $key => $split) {
|
foreach ($result as $key => $split) {
|
||||||
if (!is_array($expectedResult[$key])) {
|
if (!is_array($expectedResult[$key])) {
|
||||||
$this->assertEquals($expectedResult[$key], $split[0]);
|
$this->assertEquals($expectedResult[$key], $split[0]);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -22,7 +22,7 @@ class DataSeriesValuesTest extends PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
$testInstance = new PHPExcel_Chart_DataSeriesValues;
|
$testInstance = new PHPExcel_Chart_DataSeriesValues;
|
||||||
|
|
||||||
foreach($dataTypeValues as $dataTypeValue) {
|
foreach ($dataTypeValues as $dataTypeValue) {
|
||||||
$result = $testInstance->setDataType($dataTypeValue);
|
$result = $testInstance->setDataType($dataTypeValue);
|
||||||
$this->assertTrue($result instanceof PHPExcel_Chart_DataSeriesValues);
|
$this->assertTrue($result instanceof PHPExcel_Chart_DataSeriesValues);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ class LegendTest extends PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
$testInstance = new PHPExcel_Chart_Legend;
|
$testInstance = new PHPExcel_Chart_Legend;
|
||||||
|
|
||||||
foreach($positionValues as $positionValue) {
|
foreach ($positionValues as $positionValue) {
|
||||||
$result = $testInstance->setPosition($positionValue);
|
$result = $testInstance->setPosition($positionValue);
|
||||||
$this->assertTrue($result);
|
$this->assertTrue($result);
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ class LegendTest extends PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
$testInstance = new PHPExcel_Chart_Legend;
|
$testInstance = new PHPExcel_Chart_Legend;
|
||||||
|
|
||||||
foreach($positionValues as $positionValue) {
|
foreach ($positionValues as $positionValue) {
|
||||||
$result = $testInstance->setPositionXL($positionValue);
|
$result = $testInstance->setPositionXL($positionValue);
|
||||||
$this->assertTrue($result);
|
$this->assertTrue($result);
|
||||||
}
|
}
|
||||||
|
@ -97,13 +97,13 @@ class LegendTest extends PHPUnit_Framework_TestCase
|
||||||
public function testSetOverlay()
|
public function testSetOverlay()
|
||||||
{
|
{
|
||||||
$overlayValues = array(
|
$overlayValues = array(
|
||||||
TRUE,
|
true,
|
||||||
FALSE,
|
false,
|
||||||
);
|
);
|
||||||
|
|
||||||
$testInstance = new PHPExcel_Chart_Legend;
|
$testInstance = new PHPExcel_Chart_Legend;
|
||||||
|
|
||||||
foreach($overlayValues as $overlayValue) {
|
foreach ($overlayValues as $overlayValue) {
|
||||||
$result = $testInstance->setOverlay($overlayValue);
|
$result = $testInstance->setOverlay($overlayValue);
|
||||||
$this->assertTrue($result);
|
$this->assertTrue($result);
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,7 @@ class LegendTest extends PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
public function testGetOverlay()
|
public function testGetOverlay()
|
||||||
{
|
{
|
||||||
$OverlayValue = TRUE;
|
$OverlayValue = true;
|
||||||
|
|
||||||
$testInstance = new PHPExcel_Chart_Legend;
|
$testInstance = new PHPExcel_Chart_Legend;
|
||||||
$setValue = $testInstance->setOverlay($OverlayValue);
|
$setValue = $testInstance->setOverlay($OverlayValue);
|
||||||
|
|
|
@ -27,7 +27,7 @@ class XEEValidatorTest extends PHPUnit_Framework_TestCase
|
||||||
public function providerInvalidXML()
|
public function providerInvalidXML()
|
||||||
{
|
{
|
||||||
$tests = [];
|
$tests = [];
|
||||||
foreach(glob('rawTestData/Reader/XEETestInvalid*.xml') as $file) {
|
foreach (glob('rawTestData/Reader/XEETestInvalid*.xml') as $file) {
|
||||||
$tests[] = [realpath($file), true];
|
$tests[] = [realpath($file), true];
|
||||||
}
|
}
|
||||||
return $tests;
|
return $tests;
|
||||||
|
@ -46,7 +46,7 @@ class XEEValidatorTest extends PHPUnit_Framework_TestCase
|
||||||
public function providerValidXML()
|
public function providerValidXML()
|
||||||
{
|
{
|
||||||
$tests = [];
|
$tests = [];
|
||||||
foreach(glob('rawTestData/Reader/XEETestValid*.xml') as $file) {
|
foreach (glob('rawTestData/Reader/XEETestValid*.xml') as $file) {
|
||||||
$tests[] = [realpath($file), file_get_contents($file)];
|
$tests[] = [realpath($file), file_get_contents($file)];
|
||||||
}
|
}
|
||||||
return $tests;
|
return $tests;
|
||||||
|
|
|
@ -28,7 +28,7 @@ class ReferenceHelperTest extends PHPUnit_Framework_TestCase
|
||||||
);
|
);
|
||||||
shuffle($columnBase);
|
shuffle($columnBase);
|
||||||
usort($columnBase, array('PHPExcel_ReferenceHelper','columnSort'));
|
usort($columnBase, array('PHPExcel_ReferenceHelper','columnSort'));
|
||||||
foreach($columnBase as $key => $value) {
|
foreach ($columnBase as $key => $value) {
|
||||||
$this->assertEquals($columnExpectedResult[$key], $value);
|
$this->assertEquals($columnExpectedResult[$key], $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ class ReferenceHelperTest extends PHPUnit_Framework_TestCase
|
||||||
shuffle($columnBase);
|
shuffle($columnBase);
|
||||||
$columnExpectedResult = array_reverse($columnExpectedResult);
|
$columnExpectedResult = array_reverse($columnExpectedResult);
|
||||||
usort($columnBase, array('PHPExcel_ReferenceHelper','columnReverseSort'));
|
usort($columnBase, array('PHPExcel_ReferenceHelper','columnReverseSort'));
|
||||||
foreach($columnBase as $key => $value) {
|
foreach ($columnBase as $key => $value) {
|
||||||
$this->assertEquals($columnExpectedResult[$key], $value);
|
$this->assertEquals($columnExpectedResult[$key], $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ class DateTest extends PHPUnit_Framework_TestCase
|
||||||
PHPExcel_Shared_Date::CALENDAR_WINDOWS_1900,
|
PHPExcel_Shared_Date::CALENDAR_WINDOWS_1900,
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach($calendarValues as $calendarValue) {
|
foreach ($calendarValues as $calendarValue) {
|
||||||
$result = call_user_func(array('PHPExcel_Shared_Date','setExcelCalendar'),$calendarValue);
|
$result = call_user_func(array('PHPExcel_Shared_Date','setExcelCalendar'),$calendarValue);
|
||||||
$this->assertTrue($result);
|
$this->assertTrue($result);
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ class DateTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Shared_Date','PHPToExcel'),$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()
|
public function providerDateTimePHPToExcel1900()
|
||||||
|
@ -92,7 +92,7 @@ class DateTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Shared_Date','FormattedPHPToExcel'),$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()
|
public function providerDateTimeFormattedPHPToExcel1900()
|
||||||
|
@ -137,7 +137,7 @@ class DateTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Shared_Date','PHPToExcel'),$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()
|
public function providerDateTimePHPToExcel1904()
|
||||||
|
|
|
@ -25,11 +25,11 @@ class FileTest extends PHPUnit_Framework_TestCase
|
||||||
public function testSetUseUploadTempDirectory()
|
public function testSetUseUploadTempDirectory()
|
||||||
{
|
{
|
||||||
$useUploadTempDirectoryValues = array(
|
$useUploadTempDirectoryValues = array(
|
||||||
TRUE,
|
true,
|
||||||
FALSE,
|
false,
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach($useUploadTempDirectoryValues as $useUploadTempDirectoryValue) {
|
foreach ($useUploadTempDirectoryValues as $useUploadTempDirectoryValue) {
|
||||||
call_user_func(array('PHPExcel_Shared_File','setUseUploadTempDirectory'),$useUploadTempDirectoryValue);
|
call_user_func(array('PHPExcel_Shared_File','setUseUploadTempDirectory'),$useUploadTempDirectoryValue);
|
||||||
|
|
||||||
$result = call_user_func(array('PHPExcel_Shared_File','getUseUploadTempDirectory'));
|
$result = call_user_func(array('PHPExcel_Shared_File','getUseUploadTempDirectory'));
|
||||||
|
|
|
@ -29,7 +29,7 @@ class FontTest extends PHPUnit_Framework_TestCase
|
||||||
PHPExcel_Shared_Font::AUTOSIZE_METHOD_APPROX,
|
PHPExcel_Shared_Font::AUTOSIZE_METHOD_APPROX,
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach($autosizeMethodValues as $autosizeMethodValue) {
|
foreach ($autosizeMethodValues as $autosizeMethodValue) {
|
||||||
$result = call_user_func(array('PHPExcel_Shared_Font','setAutoSizeMethod'),$autosizeMethodValue);
|
$result = call_user_func(array('PHPExcel_Shared_Font','setAutoSizeMethod'),$autosizeMethodValue);
|
||||||
$this->assertTrue($result);
|
$this->assertTrue($result);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ class TimeZoneTest extends PHPUnit_Framework_TestCase
|
||||||
'Atlantic/St_Helena',
|
'Atlantic/St_Helena',
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach($timezoneValues as $timezoneValue) {
|
foreach ($timezoneValues as $timezoneValue) {
|
||||||
$result = call_user_func(array('PHPExcel_Shared_TimeZone','setTimezone'),$timezoneValue);
|
$result = call_user_func(array('PHPExcel_Shared_TimeZone','setTimezone'),$timezoneValue);
|
||||||
$this->assertTrue($result);
|
$this->assertTrue($result);
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ class AutofilterColumnTest extends PHPUnit_Framework_TestCase
|
||||||
'maxVal' => 200
|
'maxVal' => 200
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach($attributeSet as $attributeName => $attributeValue) {
|
foreach ($attributeSet as $attributeName => $attributeValue) {
|
||||||
// Setters return the instance to implement the fluent interface
|
// Setters return the instance to implement the fluent interface
|
||||||
$result = $this->_testAutoFilterColumnObject->setAttribute($attributeName,$attributeValue);
|
$result = $this->_testAutoFilterColumnObject->setAttribute($attributeName,$attributeValue);
|
||||||
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result);
|
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result);
|
||||||
|
@ -156,7 +156,7 @@ class AutofilterColumnTest extends PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
$this->_testAutoFilterColumnObject->setAttributes($attributeSet);
|
$this->_testAutoFilterColumnObject->setAttributes($attributeSet);
|
||||||
|
|
||||||
foreach($attributeSet as $attributeName => $attributeValue) {
|
foreach ($attributeSet as $attributeName => $attributeValue) {
|
||||||
$result = $this->_testAutoFilterColumnObject->getAttribute($attributeName);
|
$result = $this->_testAutoFilterColumnObject->getAttribute($attributeName);
|
||||||
$this->assertEquals($attributeValue, $result);
|
$this->assertEquals($attributeValue, $result);
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
|
||||||
'K1:N20' => 'K1:N20'
|
'K1:N20' => 'K1:N20'
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach($ranges as $actualRange => $fullRange) {
|
foreach ($ranges as $actualRange => $fullRange) {
|
||||||
// Setters return the instance to implement the fluent interface
|
// Setters return the instance to implement the fluent interface
|
||||||
$result = $this->_testAutoFilterObject->setRange($fullRange);
|
$result = $this->_testAutoFilterObject->setRange($fullRange);
|
||||||
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter', $result);
|
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter', $result);
|
||||||
|
@ -119,7 +119,7 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
// If we request a specific column by its column ID, we should get an
|
// If we request a specific column by its column ID, we should get an
|
||||||
// integer returned representing the column offset within the range
|
// integer returned representing the column offset within the range
|
||||||
foreach($columnIndexes as $columnIndex => $columnOffset) {
|
foreach ($columnIndexes as $columnIndex => $columnOffset) {
|
||||||
$result = $this->_testAutoFilterObject->getColumnOffset($columnIndex);
|
$result = $this->_testAutoFilterObject->getColumnOffset($columnIndex);
|
||||||
$this->assertEquals($columnOffset, $result);
|
$this->assertEquals($columnOffset, $result);
|
||||||
}
|
}
|
||||||
|
@ -206,7 +206,7 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
$columnIndexes = array('L','M');
|
$columnIndexes = array('L','M');
|
||||||
|
|
||||||
foreach($columnIndexes as $columnIndex) {
|
foreach ($columnIndexes as $columnIndex) {
|
||||||
$this->_testAutoFilterObject->setColumn($columnIndex);
|
$this->_testAutoFilterObject->setColumn($columnIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
|
||||||
// objects for each column we set indexed by the column ID
|
// objects for each column we set indexed by the column ID
|
||||||
$this->assertInternalType('array', $result);
|
$this->assertInternalType('array', $result);
|
||||||
$this->assertEquals(count($columnIndexes), count($result));
|
$this->assertEquals(count($columnIndexes), count($result));
|
||||||
foreach($columnIndexes as $columnIndex) {
|
foreach ($columnIndexes as $columnIndex) {
|
||||||
$this->assertArrayHasKey($columnIndex,$result);
|
$this->assertArrayHasKey($columnIndex,$result);
|
||||||
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result[$columnIndex]);
|
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result[$columnIndex]);
|
||||||
}
|
}
|
||||||
|
@ -225,13 +225,13 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
$columnIndexes = array('L','M');
|
$columnIndexes = array('L','M');
|
||||||
|
|
||||||
foreach($columnIndexes as $columnIndex) {
|
foreach ($columnIndexes as $columnIndex) {
|
||||||
$this->_testAutoFilterObject->setColumn($columnIndex);
|
$this->_testAutoFilterObject->setColumn($columnIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we request a specific column by its column ID, we should
|
// If we request a specific column by its column ID, we should
|
||||||
// get a PHPExcel_Worksheet_AutoFilter_Column object returned
|
// get a PHPExcel_Worksheet_AutoFilter_Column object returned
|
||||||
foreach($columnIndexes as $columnIndex) {
|
foreach ($columnIndexes as $columnIndex) {
|
||||||
$result = $this->_testAutoFilterObject->getColumn($columnIndex);
|
$result = $this->_testAutoFilterObject->getColumn($columnIndex);
|
||||||
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result);
|
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result);
|
||||||
}
|
}
|
||||||
|
@ -246,7 +246,7 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
// If we request a specific column by its offset, we should
|
// If we request a specific column by its offset, we should
|
||||||
// get a PHPExcel_Worksheet_AutoFilter_Column object returned
|
// get a PHPExcel_Worksheet_AutoFilter_Column object returned
|
||||||
foreach($columnIndexes as $columnIndex => $columnID) {
|
foreach ($columnIndexes as $columnIndex => $columnID) {
|
||||||
$result = $this->_testAutoFilterObject->getColumnByOffset($columnIndex);
|
$result = $this->_testAutoFilterObject->getColumnByOffset($columnIndex);
|
||||||
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result);
|
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result);
|
||||||
$this->assertEquals($result->getColumnIndex(),$columnID);
|
$this->assertEquals($result->getColumnIndex(),$columnID);
|
||||||
|
@ -277,7 +277,7 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
|
||||||
$expectedResult = '';
|
$expectedResult = '';
|
||||||
|
|
||||||
$columnIndexes = array('L','M','N');
|
$columnIndexes = array('L','M','N');
|
||||||
foreach($columnIndexes as $columnIndex) {
|
foreach ($columnIndexes as $columnIndex) {
|
||||||
$this->_testAutoFilterObject->setColumn($columnIndex);
|
$this->_testAutoFilterObject->setColumn($columnIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -301,12 +301,12 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
// These columns should be retained
|
// These columns should be retained
|
||||||
$columnIndexes1 = array('I','J');
|
$columnIndexes1 = array('I','J');
|
||||||
foreach($columnIndexes1 as $columnIndex) {
|
foreach ($columnIndexes1 as $columnIndex) {
|
||||||
$this->_testAutoFilterObject->setColumn($columnIndex);
|
$this->_testAutoFilterObject->setColumn($columnIndex);
|
||||||
}
|
}
|
||||||
// These columns should be discarded
|
// These columns should be discarded
|
||||||
$columnIndexes2 = array('K','L','M');
|
$columnIndexes2 = array('K','L','M');
|
||||||
foreach($columnIndexes2 as $columnIndex) {
|
foreach ($columnIndexes2 as $columnIndex) {
|
||||||
$this->_testAutoFilterObject->setColumn($columnIndex);
|
$this->_testAutoFilterObject->setColumn($columnIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
$columnIndexes = array('L','M');
|
$columnIndexes = array('L','M');
|
||||||
|
|
||||||
foreach($columnIndexes as $columnIndex) {
|
foreach ($columnIndexes as $columnIndex) {
|
||||||
$this->_testAutoFilterObject->setColumn($columnIndex);
|
$this->_testAutoFilterObject->setColumn($columnIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ class ColumnCellIteratorTest extends PHPUnit_Framework_TestCase
|
||||||
$ColumnCellIndexResult = 1;
|
$ColumnCellIndexResult = 1;
|
||||||
$this->assertEquals($ColumnCellIndexResult, $iterator->key());
|
$this->assertEquals($ColumnCellIndexResult, $iterator->key());
|
||||||
|
|
||||||
foreach($iterator as $key => $ColumnCell) {
|
foreach ($iterator as $key => $ColumnCell) {
|
||||||
$this->assertEquals($ColumnCellIndexResult++, $key);
|
$this->assertEquals($ColumnCellIndexResult++, $key);
|
||||||
$this->assertInstanceOf('PHPExcel_Cell', $ColumnCell);
|
$this->assertInstanceOf('PHPExcel_Cell', $ColumnCell);
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ class ColumnCellIteratorTest extends PHPUnit_Framework_TestCase
|
||||||
$ColumnCellIndexResult = 2;
|
$ColumnCellIndexResult = 2;
|
||||||
$this->assertEquals($ColumnCellIndexResult, $iterator->key());
|
$this->assertEquals($ColumnCellIndexResult, $iterator->key());
|
||||||
|
|
||||||
foreach($iterator as $key => $ColumnCell) {
|
foreach ($iterator as $key => $ColumnCell) {
|
||||||
$this->assertEquals($ColumnCellIndexResult++, $key);
|
$this->assertEquals($ColumnCellIndexResult++, $key);
|
||||||
$this->assertInstanceOf('PHPExcel_Cell', $ColumnCell);
|
$this->assertInstanceOf('PHPExcel_Cell', $ColumnCell);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ class ColumnIteratorTest extends PHPUnit_Framework_TestCase
|
||||||
$columnIndexResult = 'A';
|
$columnIndexResult = 'A';
|
||||||
$this->assertEquals($columnIndexResult, $iterator->key());
|
$this->assertEquals($columnIndexResult, $iterator->key());
|
||||||
|
|
||||||
foreach($iterator as $key => $column) {
|
foreach ($iterator as $key => $column) {
|
||||||
$this->assertEquals($columnIndexResult++, $key);
|
$this->assertEquals($columnIndexResult++, $key);
|
||||||
$this->assertInstanceOf('PHPExcel_Worksheet_Column', $column);
|
$this->assertInstanceOf('PHPExcel_Worksheet_Column', $column);
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ class ColumnIteratorTest extends PHPUnit_Framework_TestCase
|
||||||
$columnIndexResult = 'B';
|
$columnIndexResult = 'B';
|
||||||
$this->assertEquals($columnIndexResult, $iterator->key());
|
$this->assertEquals($columnIndexResult, $iterator->key());
|
||||||
|
|
||||||
foreach($iterator as $key => $column) {
|
foreach ($iterator as $key => $column) {
|
||||||
$this->assertEquals($columnIndexResult++, $key);
|
$this->assertEquals($columnIndexResult++, $key);
|
||||||
$this->assertInstanceOf('PHPExcel_Worksheet_Column', $column);
|
$this->assertInstanceOf('PHPExcel_Worksheet_Column', $column);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ class RowCellIteratorTest extends PHPUnit_Framework_TestCase
|
||||||
$RowCellIndexResult = 'A';
|
$RowCellIndexResult = 'A';
|
||||||
$this->assertEquals($RowCellIndexResult, $iterator->key());
|
$this->assertEquals($RowCellIndexResult, $iterator->key());
|
||||||
|
|
||||||
foreach($iterator as $key => $RowCell) {
|
foreach ($iterator as $key => $RowCell) {
|
||||||
$this->assertEquals($RowCellIndexResult++, $key);
|
$this->assertEquals($RowCellIndexResult++, $key);
|
||||||
$this->assertInstanceOf('PHPExcel_Cell', $RowCell);
|
$this->assertInstanceOf('PHPExcel_Cell', $RowCell);
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ class RowCellIteratorTest extends PHPUnit_Framework_TestCase
|
||||||
$RowCellIndexResult = 'B';
|
$RowCellIndexResult = 'B';
|
||||||
$this->assertEquals($RowCellIndexResult, $iterator->key());
|
$this->assertEquals($RowCellIndexResult, $iterator->key());
|
||||||
|
|
||||||
foreach($iterator as $key => $RowCell) {
|
foreach ($iterator as $key => $RowCell) {
|
||||||
$this->assertEquals($RowCellIndexResult++, $key);
|
$this->assertEquals($RowCellIndexResult++, $key);
|
||||||
$this->assertInstanceOf('PHPExcel_Cell', $RowCell);
|
$this->assertInstanceOf('PHPExcel_Cell', $RowCell);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ class RowIteratorTest extends PHPUnit_Framework_TestCase
|
||||||
$rowIndexResult = 1;
|
$rowIndexResult = 1;
|
||||||
$this->assertEquals($rowIndexResult, $iterator->key());
|
$this->assertEquals($rowIndexResult, $iterator->key());
|
||||||
|
|
||||||
foreach($iterator as $key => $row) {
|
foreach ($iterator as $key => $row) {
|
||||||
$this->assertEquals($rowIndexResult++, $key);
|
$this->assertEquals($rowIndexResult++, $key);
|
||||||
$this->assertInstanceOf('PHPExcel_Worksheet_Row', $row);
|
$this->assertInstanceOf('PHPExcel_Worksheet_Row', $row);
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ class RowIteratorTest extends PHPUnit_Framework_TestCase
|
||||||
$rowIndexResult = 2;
|
$rowIndexResult = 2;
|
||||||
$this->assertEquals($rowIndexResult, $iterator->key());
|
$this->assertEquals($rowIndexResult, $iterator->key());
|
||||||
|
|
||||||
foreach($iterator as $key => $row) {
|
foreach ($iterator as $key => $row) {
|
||||||
$this->assertEquals($rowIndexResult++, $key);
|
$this->assertEquals($rowIndexResult++, $key);
|
||||||
$this->assertInstanceOf('PHPExcel_Worksheet_Row', $row);
|
$this->assertInstanceOf('PHPExcel_Worksheet_Row', $row);
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,11 +54,11 @@ class testDataFileIterator implements Iterator
|
||||||
} while (($testDataRow > '') && ($testDataRow{0} === '#'));
|
} while (($testDataRow > '') && ($testDataRow{0} === '#'));
|
||||||
|
|
||||||
// Discard any comments at the end of the line
|
// Discard any comments at the end of the line
|
||||||
list($testData) = explode('//',$testDataRow);
|
list($testData) = explode('//', $testDataRow);
|
||||||
|
|
||||||
// Split data into an array of individual values and a result
|
// Split data into an array of individual values and a result
|
||||||
$dataSet = $this->_getcsv($testData, ',', "'");
|
$dataSet = $this->_getcsv($testData, ',', "'");
|
||||||
foreach($dataSet as &$dataValue) {
|
foreach ($dataSet as &$dataValue) {
|
||||||
$dataValue = $this->_parseDataValue($dataValue);
|
$dataValue = $this->_parseDataValue($dataValue);
|
||||||
}
|
}
|
||||||
unset($dataValue);
|
unset($dataValue);
|
||||||
|
@ -85,23 +85,24 @@ class testDataFileIterator implements Iterator
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function _parseDataValue($dataValue) {
|
private function _parseDataValue($dataValue)
|
||||||
|
{
|
||||||
// discard any white space
|
// discard any white space
|
||||||
$dataValue = trim($dataValue);
|
$dataValue = trim($dataValue);
|
||||||
// test for the required datatype and convert accordingly
|
// test for the required datatype and convert accordingly
|
||||||
if (!is_numeric($dataValue)) {
|
if (!is_numeric($dataValue)) {
|
||||||
if($dataValue == '') {
|
if($dataValue == '') {
|
||||||
$dataValue = NULL;
|
$dataValue = null;
|
||||||
} elseif($dataValue == '""') {
|
} elseif($dataValue == '""') {
|
||||||
$dataValue = '';
|
$dataValue = '';
|
||||||
} elseif(($dataValue[0] == '"') && ($dataValue[strlen($dataValue)-1] == '"')) {
|
} elseif(($dataValue[0] == '"') && ($dataValue[strlen($dataValue)-1] == '"')) {
|
||||||
$dataValue = substr($dataValue,1,-1);
|
$dataValue = substr($dataValue,1,-1);
|
||||||
} elseif(($dataValue[0] == '{') && ($dataValue[strlen($dataValue)-1] == '}')) {
|
} elseif(($dataValue[0] == '{') && ($dataValue[strlen($dataValue)-1] == '}')) {
|
||||||
$dataValue = explode(';',substr($dataValue,1,-1));
|
$dataValue = explode(';',substr($dataValue,1,-1));
|
||||||
foreach($dataValue as &$dataRow) {
|
foreach ($dataValue as &$dataRow) {
|
||||||
if (strpos($dataRow,'|') !== FALSE) {
|
if (strpos($dataRow,'|') !== false) {
|
||||||
$dataRow = explode('|',$dataRow);
|
$dataRow = explode('|',$dataRow);
|
||||||
foreach($dataRow as &$dataCell) {
|
foreach ($dataRow as &$dataCell) {
|
||||||
$dataCell = $this->_parseDataValue($dataCell);
|
$dataCell = $this->_parseDataValue($dataCell);
|
||||||
}
|
}
|
||||||
unset($dataCell);
|
unset($dataCell);
|
||||||
|
@ -112,13 +113,19 @@ class testDataFileIterator implements Iterator
|
||||||
unset($dataRow);
|
unset($dataRow);
|
||||||
} else {
|
} else {
|
||||||
switch (strtoupper($dataValue)) {
|
switch (strtoupper($dataValue)) {
|
||||||
case 'NULL' : $dataValue = NULL; break;
|
case 'NULL':
|
||||||
case 'TRUE' : $dataValue = TRUE; break;
|
$dataValue = null;
|
||||||
case 'FALSE' : $dataValue = FALSE; break;
|
break;
|
||||||
|
case 'TRUE':
|
||||||
|
$dataValue = true;
|
||||||
|
break;
|
||||||
|
case 'FALSE':
|
||||||
|
$dataValue = false;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (strpos($dataValue,'.') !== FALSE) {
|
if (strpos($dataValue,'.') !== false) {
|
||||||
$dataValue = (float) $dataValue;
|
$dataValue = (float) $dataValue;
|
||||||
} else {
|
} else {
|
||||||
$dataValue = (int) $dataValue;
|
$dataValue = (int) $dataValue;
|
||||||
|
@ -127,5 +134,4 @@ class testDataFileIterator implements Iterator
|
||||||
|
|
||||||
return $dataValue;
|
return $dataValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue