This commit is contained in:
Adrien Crivelli 2021-10-31 22:17:07 +09:00
parent 69f633420b
commit c3c93c56d6
No known key found for this signature in database
GPG Key ID: 16D79B903B4B5874
5 changed files with 26 additions and 21 deletions

View File

@ -5757,7 +5757,7 @@ parameters:
-
message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, string\\|null given\\.$#"
count: 4
count: 5
path: src/PhpSpreadsheet/Writer/Xlsx/StringTable.php
-
@ -5852,9 +5852,14 @@ parameters:
-
message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, string\\|null given\\.$#"
count: 4
count: 9
path: src/PhpSpreadsheet/Writer/Xlsx/Style.php
-
message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, string\\|null given\\.$#"
count: 1
path: src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php
-
message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, float given\\.$#"
count: 1

View File

@ -41,7 +41,7 @@ class Color extends Supervisor
/**
* ARGB - Alpha RGB.
*
* @var string
* @var null|string
*/
protected $argb;
@ -135,7 +135,7 @@ class Color extends Supervisor
/**
* Get ARGB.
*/
public function getARGB(): string
public function getARGB(): ?string
{
if ($this->isSupervisor) {
return $this->getSharedComponent()->getARGB();

View File

@ -1296,7 +1296,7 @@ class Html extends BaseWriter
} else {
$origData = $this->preCalculateFormulas ? $cell->getCalculatedValue() : $cell->getValue();
$formatCode = $worksheet->getParent()->getCellXfByIndex($cell->getXfIndex())->getNumberFormat()->getFormatCode();
if ($formatCode) {
if ($formatCode !== null) {
$cellData = NumberFormat::toFormattedString(
$origData,
$formatCode,