Guesswork

Unable to duplicate php-cs-fixer problem. Maybe this will work.
This commit is contained in:
oleibman
2024-01-01 21:13:18 -08:00
parent d164ad2211
commit c5f78a4194
+5 -4
View File
@@ -10,6 +10,7 @@ use PhpOffice\PhpSpreadsheet\Cell\Coordinate;
use PhpOffice\PhpSpreadsheet\Cell\DataType;
use PhpOffice\PhpSpreadsheet\Document\Properties;
use PhpOffice\PhpSpreadsheet\Helper\Dimension as CssDimension;
use PhpOffice\PhpSpreadsheet\Helper\Html as HelperHtml;
use PhpOffice\PhpSpreadsheet\Reader\Security\XmlScanner;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Style\Border;
@@ -391,7 +392,7 @@ class Html extends BaseReader
{
if ($child->nodeName === 'br' || $child->nodeName === 'hr') {
if ($this->tableLevel > 0) {
// If we're inside a table, replace with a \n and set the cell to wrap
// If we're inside a table, replace with a newline and set the cell to wrap
$cellContent .= "\n";
$sheet->getStyle($column . $row)->getAlignment()->setWrapText(true);
} else {
@@ -436,7 +437,7 @@ class Html extends BaseReader
{
if (in_array((string) $child->nodeName, self::H1_ETC, true)) {
if ($this->tableLevel > 0) {
// If we're inside a table, replace with a \n
// If we're inside a table, replace with a newline
$cellContent .= $cellContent ? "\n" : '';
$sheet->getStyle($column . $row)->getAlignment()->setWrapText(true);
$this->processDomElement($child, $sheet, $row, $column, $cellContent);
@@ -464,7 +465,7 @@ class Html extends BaseReader
{
if ($child->nodeName === 'li') {
if ($this->tableLevel > 0) {
// If we're inside a table, replace with a \n
// If we're inside a table, replace with a newline
$cellContent .= $cellContent ? "\n" : '';
$this->processDomElement($child, $sheet, $row, $column, $cellContent);
} else {
@@ -1048,7 +1049,7 @@ class Html extends BaseReader
return substr($value, 1);
}
return \PhpOffice\PhpSpreadsheet\Helper\Html::colourNameLookup($value);
return HelperHtml::colourNameLookup($value);
}
private function insertImage(Worksheet $sheet, string $column, int $row, array $attributes): void