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

Commit

Permalink
Change Worksheet function visibility from private to protected in ord…
Browse files Browse the repository at this point in the history
…er to class extending. We have created small package on top of the Spout for support cell number format and per cell styles.
  • Loading branch information
WebsourceCz authored and adrilo committed Sep 25, 2017
1 parent 3bbff7e commit 3681a34
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Spout/Writer/XLSX/Internal/Worksheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public function addRow($dataRow, $style)
* Example $dataRow = ['data1', 1234, null, '', 'data5'];
* @return bool Whether the given row is empty
*/
private function isEmptyRow($dataRow)
protected function isEmptyRow($dataRow)
{
$numCells = count($dataRow);
// using "reset()" instead of "$dataRow[0]" because $dataRow can be an associative array
Expand All @@ -176,7 +176,7 @@ private function isEmptyRow($dataRow)
* @throws \Box\Spout\Common\Exception\IOException If the data cannot be written
* @throws \Box\Spout\Common\Exception\InvalidArgumentException If a cell value's type is not supported
*/
private function addNonEmptyRow($dataRow, $style)
protected function addNonEmptyRow($dataRow, $style)
{
$cellNumber = 0;
$rowIndex = $this->lastWrittenRowIndex + 1;
Expand Down Expand Up @@ -207,7 +207,7 @@ private function addNonEmptyRow($dataRow, $style)
* @return string
* @throws InvalidArgumentException If the given value cannot be processed
*/
private function getCellXML($rowIndex, $cellNumber, $cellValue, $styleId)
protected function getCellXML($rowIndex, $cellNumber, $cellValue, $styleId)
{
$columnIndex = CellHelper::getCellIndexFromColumnIndex($cellNumber);
$cellXML = '<c r="' . $columnIndex . $rowIndex . '"';
Expand Down Expand Up @@ -241,7 +241,7 @@ private function getCellXML($rowIndex, $cellNumber, $cellValue, $styleId)
* @return string The XML fragment representing the cell
* @throws InvalidArgumentException If the string exceeds the maximum number of characters allowed per cell
*/
private function getCellXMLFragmentForNonEmptyString($cellValue)
protected function getCellXMLFragmentForNonEmptyString($cellValue)
{
if ($this->stringHelper->getStringLength($cellValue) > self::MAX_CHARACTERS_PER_CELL) {
throw new InvalidArgumentException('Trying to add a value that exceeds the maximum number of characters allowed in a cell (32,767)');
Expand Down

0 comments on commit 3681a34

Please sign in to comment.