← All changes
|
libraries/vendor/PhpSpreadsheet/Reader/Xlsx/Styles.php
+3
-3
3.3.4
→
3.4
View file →
| @@ -187,10 +187,10 @@ | ||
| 187 | 187 | $fillStyle->setFillType((string) $attr['type']); |
| 188 | 188 | } |
| 189 | 189 | $fillStyle->setRotation((float) ($attr['degree'])); |
| 190 | 190 | $gradientFill->registerXPathNamespace('sml', Namespaces::MAIN); |
| 191 | - $fillStyle->getStartColor()->setARGB($this->readColor(self::getArrayItem($gradientFill->xpath('sml:stop[@position=0]'))->color)); //* @phpstan-ignore-line | |
| 192 | - $fillStyle->getEndColor()->setARGB($this->readColor(self::getArrayItem($gradientFill->xpath('sml:stop[@position=1]'))->color)); //* @phpstan-ignore-line | |
| 191 | + $fillStyle->getStartColor()->setARGB($this->readColor(self::getArrayItem($gradientFill->xpath('sml:stop[@position=0]'))->color)); //* @phpstan-ignore property.nonObject (xpath may return null) | |
| 192 | + $fillStyle->getEndColor()->setARGB($this->readColor(self::getArrayItem($gradientFill->xpath('sml:stop[@position=1]'))->color)); //* @phpstan-ignore property.nonObject (xpath may return null) | |
| 193 | 193 | } elseif ($fillStyleXml->patternFill) { |
| 194 | 194 | $defaultFillStyle = ($fillStyle->getFillType() !== null) ? Fill::FILL_NONE : ''; |
| 195 | 195 | $fgFound = false; |
| 196 | 196 | $bgFound = false; |
| @@ -557,7 +557,7 @@ | ||
| 557 | 557 | * @param mixed $array (usually array, in theory can be false) |
| 558 | 558 | */ |
| 559 | 559 | private static function getArrayItem($array): ?SimpleXMLElement |
| 560 | 560 | { |
| 561 | - return is_array($array) ? ($array[0] ?? null) : null; // @phpstan-ignore-line | |
| 561 | + return is_array($array) ? ($array[0] ?? null) : null; | |
| 562 | 562 | } |
| 563 | 563 | } |