Satisfy php-cs-fixer
This commit is contained in:
parent
c1757d23bf
commit
36573eaa8a
@ -60,5 +60,4 @@ trait ManagesCellSize
|
|||||||
{
|
{
|
||||||
$this->columnWidths[] = [$start, $end, $width];
|
$this->columnWidths[] = [$start, $end, $width];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,6 @@ use Box\Spout\Writer\Common\Helper\FileSystemWithRootFolderHelperInterface;
|
|||||||
use Box\Spout\Writer\Common\Manager\Style\StyleManagerInterface;
|
use Box\Spout\Writer\Common\Manager\Style\StyleManagerInterface;
|
||||||
use Box\Spout\Writer\Common\Manager\Style\StyleMerger;
|
use Box\Spout\Writer\Common\Manager\Style\StyleMerger;
|
||||||
use Box\Spout\Writer\Exception\SheetNotFoundException;
|
use Box\Spout\Writer\Exception\SheetNotFoundException;
|
||||||
use Box\Spout\Writer\Exception\WriterException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class WorkbookManagerAbstract
|
* Class WorkbookManagerAbstract
|
||||||
|
@ -191,9 +191,10 @@ EOD;
|
|||||||
|
|
||||||
// Sort column widths since ODS cares about order
|
// Sort column widths since ODS cares about order
|
||||||
usort($this->columnWidths, function ($a, $b) {
|
usort($this->columnWidths, function ($a, $b) {
|
||||||
if ($a[0] == $b[0]) {
|
if ($a[0] === $b[0]) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ($a[0] < $b[0]) ? -1 : 1;
|
return ($a[0] < $b[0]) ? -1 : 1;
|
||||||
});
|
});
|
||||||
$content .= $this->getTableColumnStylesXMLContent();
|
$content .= $this->getTableColumnStylesXMLContent();
|
||||||
@ -415,6 +416,7 @@ EOD;
|
|||||||
</style:style>
|
</style:style>
|
||||||
EOD;
|
EOD;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -434,6 +436,7 @@ EOD;
|
|||||||
// Note: This assumes the column widths are contiguous and default width is
|
// Note: This assumes the column widths are contiguous and default width is
|
||||||
// only applied to columns after the last custom column with a custom width
|
// only applied to columns after the last custom column with a custom width
|
||||||
$content .= '<table:table-column table:default-cell-style-name="ce1" table:style-name="default-column-style" table:number-columns-repeated="' . ($maxNumColumns - $entry[1]) . '"/>';
|
$content .= '<table:table-column table:default-cell-style-name="ce1" table:style-name="default-column-style" table:number-columns-repeated="' . ($maxNumColumns - $entry[1]) . '"/>';
|
||||||
|
|
||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,8 +57,10 @@ abstract class WriterMultiSheetsAbstract extends WriterAbstract
|
|||||||
{
|
{
|
||||||
$this->throwIfWriterAlreadyOpened('Writer must be configured before opening it.');
|
$this->throwIfWriterAlreadyOpened('Writer must be configured before opening it.');
|
||||||
|
|
||||||
$this->optionsManager->setOption(Options::SHOULD_CREATE_NEW_SHEETS_AUTOMATICALLY,
|
$this->optionsManager->setOption(
|
||||||
$shouldCreateNewSheetsAutomatically);
|
Options::SHOULD_CREATE_NEW_SHEETS_AUTOMATICALLY,
|
||||||
|
$shouldCreateNewSheetsAutomatically
|
||||||
|
);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -77,8 +79,8 @@ abstract class WriterMultiSheetsAbstract extends WriterAbstract
|
|||||||
/**
|
/**
|
||||||
* Returns all the workbook's sheets
|
* Returns all the workbook's sheets
|
||||||
*
|
*
|
||||||
* @return Sheet[] All the workbook's sheets
|
|
||||||
* @throws WriterNotOpenedException If the writer has not been opened yet
|
* @throws WriterNotOpenedException If the writer has not been opened yet
|
||||||
|
* @return Sheet[] All the workbook's sheets
|
||||||
*/
|
*/
|
||||||
public function getSheets()
|
public function getSheets()
|
||||||
{
|
{
|
||||||
|
@ -232,7 +232,7 @@ EOD;
|
|||||||
if ($cell->isString()) {
|
if ($cell->isString()) {
|
||||||
$cellXML .= $this->getCellXMLFragmentForNonEmptyString($cell->getValue());
|
$cellXML .= $this->getCellXMLFragmentForNonEmptyString($cell->getValue());
|
||||||
} elseif ($cell->isBoolean()) {
|
} elseif ($cell->isBoolean()) {
|
||||||
$cellXML .= ' t="b"><v>' . (int)($cell->getValue()) . '</v></c>';
|
$cellXML .= ' t="b"><v>' . (int) ($cell->getValue()) . '</v></c>';
|
||||||
} elseif ($cell->isNumeric()) {
|
} elseif ($cell->isNumeric()) {
|
||||||
$cellXML .= '><v>' . $cell->getValue() . '</v></c>';
|
$cellXML .= '><v>' . $cell->getValue() . '</v></c>';
|
||||||
} elseif ($cell->isError() && is_string($cell->getValueEvenIfError())) {
|
} elseif ($cell->isError() && is_string($cell->getValueEvenIfError())) {
|
||||||
@ -291,6 +291,7 @@ EOD;
|
|||||||
$xml .= '<col min="' . $entry[0] . '" max="' . $entry[1] . '" width="' . $entry[2] . '" customWidth="true"/>';
|
$xml .= '<col min="' . $entry[0] . '" max="' . $entry[1] . '" width="' . $entry[2] . '" customWidth="true"/>';
|
||||||
}
|
}
|
||||||
$xml .= '</cols>';
|
$xml .= '</cols>';
|
||||||
|
|
||||||
return $xml;
|
return $xml;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -308,6 +309,7 @@ EOD;
|
|||||||
}
|
}
|
||||||
// Ensure that the required defaultRowHeight is set
|
// Ensure that the required defaultRowHeight is set
|
||||||
$rowHeightXml = empty($rowHeightXml) ? ' defaultRowHeight="0"' : $rowHeightXml;
|
$rowHeightXml = empty($rowHeightXml) ? ' defaultRowHeight="0"' : $rowHeightXml;
|
||||||
|
|
||||||
return "<sheetFormatPr{$colWidthXml}{$rowHeightXml}/>";
|
return "<sheetFormatPr{$colWidthXml}{$rowHeightXml}/>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user