Skip to content

Commit 6e93505

Browse files
committed
Minor cosmetic changes
1 parent 813c2c7 commit 6e93505

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

phpstan-baseline.neon

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1660,6 +1660,11 @@ parameters:
16601660
count: 1
16611661
path: src/PhpSpreadsheet/Reader/Xls/RC4.php
16621662

1663+
-
1664+
message: "#^Cannot access property \\$r on SimpleXMLElement\\|null\\.$#"
1665+
count: 2
1666+
path: src/PhpSpreadsheet/Reader/Xlsx.php
1667+
16631668
-
16641669
message: "#^Parameter \\#1 \\$haystack of function strpos expects string, string\\|false given\\.$#"
16651670
count: 1
@@ -2750,6 +2755,16 @@ parameters:
27502755
count: 1
27512756
path: src/PhpSpreadsheet/Writer/Xls.php
27522757

2758+
-
2759+
message: "#^Offset 'length' does not exist on array\\{data\\: non\\-empty\\-string, length\\?\\: int\\<1, max\\>\\}\\|array\\{pack\\?\\: 'V', data\\: non\\-empty\\-string\\}\\.$#"
2760+
count: 1
2761+
path: src/PhpSpreadsheet/Writer/Xls.php
2762+
2763+
-
2764+
message: "#^Offset 'length' does not exist on array\\{data\\: non\\-empty\\-string\\|false, length\\?\\: int\\<1, max\\>\\}\\|array\\{pack\\?\\: 'V', data\\: 1252\\|786432\\|false\\}\\.$#"
2765+
count: 1
2766+
path: src/PhpSpreadsheet/Writer/Xls.php
2767+
27532768
-
27542769
message: "#^Offset 'startCoordinates' does not exist on array\\|null\\.$#"
27552770
count: 1
@@ -2912,7 +2927,7 @@ parameters:
29122927

29132928
-
29142929
message: "#^Cannot access offset 1 on array\\|false\\.$#"
2915-
count: 1
2930+
count: 2
29162931
path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
29172932

29182933
-

src/PhpSpreadsheet/Calculation/Calculation.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4793,7 +4793,7 @@ private function processTokenStack($tokens, $cellID = null, ?Cell $cell = null)
47934793

47944794
if (isset($matches[8])) {
47954795
if ($cell === null) {
4796-
// We can't access the range, so return a REF error
4796+
// We can't access the range, so return a REF error
47974797
$cellValue = Information\ExcelError::REF();
47984798
} else {
47994799
$cellRef = $matches[6] . $matches[7] . ':' . $matches[9] . $matches[10];
@@ -4864,6 +4864,7 @@ private function processTokenStack($tokens, $cellID = null, ?Cell $cell = null)
48644864
if (isset($storeKey)) {
48654865
$branchStore[$storeKey] = $cellValue;
48664866
}
4867+
48674868
} elseif (preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/miu', $token ?? '', $matches)) {
48684869
// if the token is a function, pop arguments off the stack, hand them to the function, and push the result back on
48694870
if ($pCellParent) {

src/PhpSpreadsheet/Reader/Xlsx.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ protected function loadSpreadsheetFromFile(string $filename): Spreadsheet
487487
$propertyReader->readCustomProperties($this->getFromZipArchive($zip, $relTarget));
488488

489489
break;
490-
// Ribbon
490+
//Ribbon
491491
case Namespaces::EXTENSIBILITY:
492492
$customUI = $relTarget;
493493
if ($customUI) {
@@ -1703,8 +1703,8 @@ protected function loadSpreadsheetFromFile(string $filename): Spreadsheet
17031703

17041704
break;
17051705

1706-
case 'application/vnd.ms-excel.controlproperties+xml':
17071706
// unparsed
1707+
case 'application/vnd.ms-excel.controlproperties+xml':
17081708
$unparsedLoadedData['override_content_types'][(string) $contentType['PartName']] = (string) $contentType['ContentType'];
17091709

17101710
break;
@@ -1729,7 +1729,7 @@ private function parseRichText(?SimpleXMLElement $is)
17291729
if (isset($is->t)) {
17301730
$value->createText(StringHelper::controlCharacterOOXML2PHP((string) $is->t));
17311731
} else {
1732-
if (isset($is->r) && is_object($is->r)) {
1732+
if (is_object($is->r)) {
17331733
/** @var SimpleXMLElement $run */
17341734
foreach ($is->r as $run) {
17351735
if (!isset($run->rPr)) {

0 commit comments

Comments
 (0)