Skip to content
This repository was archived by the owner on May 26, 2022. It is now read-only.

Commit d4e57b1

Browse files
authored
Add consistency using getCellXML() (#306)
1 parent 435a9a0 commit d4e57b1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Spout/Writer/ODS/Internal/Worksheet.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public function addRow($dataRow, $style)
155155
$currentCellValue !== $dataRowWithNumericIndexes[$nextCellIndex]) {
156156

157157
$numTimesValueRepeated = ($nextCellIndex - $currentCellIndex);
158-
$data .= $this->getCellContent($currentCellValue, $styleIndex, $numTimesValueRepeated);
158+
$data .= $this->getCellXML($currentCellValue, $styleIndex, $numTimesValueRepeated);
159159

160160
$currentCellIndex = $nextCellIndex;
161161
}
@@ -183,7 +183,7 @@ public function addRow($dataRow, $style)
183183
* @return string The cell XML content
184184
* @throws \Box\Spout\Common\Exception\InvalidArgumentException If a cell value's type is not supported
185185
*/
186-
protected function getCellContent($cellValue, $styleIndex, $numTimesValueRepeated)
186+
protected function getCellXML($cellValue, $styleIndex, $numTimesValueRepeated)
187187
{
188188
$data = '<table:table-cell table:style-name="ce' . $styleIndex . '"';
189189

src/Spout/Writer/XLSX/Internal/Worksheet.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public function addRow($dataRow, $style)
134134
$rowXML = '<row r="' . $rowIndex . '" spans="1:' . $numCells . '">';
135135

136136
foreach($dataRow as $cellValue) {
137-
$rowXML .= $this->getCellXml($rowIndex, $cellNumber, $cellValue, $style->getId());
137+
$rowXML .= $this->getCellXML($rowIndex, $cellNumber, $cellValue, $style->getId());
138138
$cellNumber++;
139139
}
140140

@@ -159,7 +159,7 @@ public function addRow($dataRow, $style)
159159
* @return string
160160
* @throws InvalidArgumentException
161161
*/
162-
private function getCellXml($rowIndex, $cellNumber, $cellValue, $styleId)
162+
private function getCellXML($rowIndex, $cellNumber, $cellValue, $styleId)
163163
{
164164
$columnIndex = CellHelper::getCellIndexFromColumnIndex($cellNumber);
165165
$cellXML = '<c r="' . $columnIndex . $rowIndex . '"';

0 commit comments

Comments
 (0)