Satisfy php-cs-fixer
This commit is contained in:
parent
c1757d23bf
commit
36573eaa8a
@ -60,5 +60,4 @@ trait ManagesCellSize
|
||||
{
|
||||
$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\StyleMerger;
|
||||
use Box\Spout\Writer\Exception\SheetNotFoundException;
|
||||
use Box\Spout\Writer\Exception\WriterException;
|
||||
|
||||
/**
|
||||
* Class WorkbookManagerAbstract
|
||||
|
@ -191,9 +191,10 @@ EOD;
|
||||
|
||||
// Sort column widths since ODS cares about order
|
||||
usort($this->columnWidths, function ($a, $b) {
|
||||
if ($a[0] == $b[0]) {
|
||||
if ($a[0] === $b[0]) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ($a[0] < $b[0]) ? -1 : 1;
|
||||
});
|
||||
$content .= $this->getTableColumnStylesXMLContent();
|
||||
@ -415,6 +416,7 @@ EOD;
|
||||
</style:style>
|
||||
EOD;
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
@ -434,6 +436,7 @@ EOD;
|
||||
// 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
|
||||
$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;
|
||||
}
|
||||
}
|
||||
|
@ -57,8 +57,10 @@ abstract class WriterMultiSheetsAbstract extends WriterAbstract
|
||||
{
|
||||
$this->throwIfWriterAlreadyOpened('Writer must be configured before opening it.');
|
||||
|
||||
$this->optionsManager->setOption(Options::SHOULD_CREATE_NEW_SHEETS_AUTOMATICALLY,
|
||||
$shouldCreateNewSheetsAutomatically);
|
||||
$this->optionsManager->setOption(
|
||||
Options::SHOULD_CREATE_NEW_SHEETS_AUTOMATICALLY,
|
||||
$shouldCreateNewSheetsAutomatically
|
||||
);
|
||||
|
||||
return $this;
|
||||
}
|
||||
@ -77,8 +79,8 @@ abstract class WriterMultiSheetsAbstract extends WriterAbstract
|
||||
/**
|
||||
* Returns all the workbook's sheets
|
||||
*
|
||||
* @return Sheet[] All the workbook's sheets
|
||||
* @throws WriterNotOpenedException If the writer has not been opened yet
|
||||
* @return Sheet[] All the workbook's sheets
|
||||
*/
|
||||
public function getSheets()
|
||||
{
|
||||
|
@ -291,6 +291,7 @@ EOD;
|
||||
$xml .= '<col min="' . $entry[0] . '" max="' . $entry[1] . '" width="' . $entry[2] . '" customWidth="true"/>';
|
||||
}
|
||||
$xml .= '</cols>';
|
||||
|
||||
return $xml;
|
||||
}
|
||||
|
||||
@ -308,6 +309,7 @@ EOD;
|
||||
}
|
||||
// Ensure that the required defaultRowHeight is set
|
||||
$rowHeightXml = empty($rowHeightXml) ? ' defaultRowHeight="0"' : $rowHeightXml;
|
||||
|
||||
return "<sheetFormatPr{$colWidthXml}{$rowHeightXml}/>";
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user