PHP deprecation resolution

This commit is contained in:
MarkBaker
2022-05-11 21:44:24 +02:00
parent f5b4308f22
commit e1e5888156
2 changed files with 28 additions and 8 deletions
+27 -7
View File
@@ -155,6 +155,11 @@ parameters:
count: 1
path: src/PhpSpreadsheet/Calculation/Calculation.php
-
message: "#^Result of && is always false\\.$#"
count: 1
path: src/PhpSpreadsheet/Calculation/Calculation.php
-
message: "#^Static property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:\\$instance \\(PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\) in isset\\(\\) is not nullable\\.$#"
count: 1
@@ -1100,6 +1105,11 @@ parameters:
count: 1
path: src/PhpSpreadsheet/Cell/Coordinate.php
-
message: "#^Cannot use array destructuring on array\\<string\\>\\|string\\.$#"
count: 2
path: src/PhpSpreadsheet/Cell/Coordinate.php
-
message: "#^Parameter \\#4 \\$currentRow of static method PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Coordinate\\:\\:validateRange\\(\\) expects int, string given\\.$#"
count: 1
@@ -2221,7 +2231,7 @@ parameters:
path: src/PhpSpreadsheet/Reader/Xls.php
-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, array\\<string\\>\\|string given\\.$#"
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, array\\<string\\>\\|string given\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php
@@ -4052,7 +4062,7 @@ parameters:
-
message: "#^Cannot use array destructuring on array\\<string\\>\\|string\\.$#"
count: 1
count: 2
path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
-
@@ -4110,6 +4120,16 @@ parameters:
count: 1
path: src/PhpSpreadsheet/Worksheet/SheetView.php
-
message: "#^Cannot use array destructuring on array\\<string\\>\\|string\\.$#"
count: 1
path: src/PhpSpreadsheet/Worksheet/Table.php
-
message: "#^Cannot use array destructuring on array\\<string\\>\\|string\\.$#"
count: 2
path: src/PhpSpreadsheet/Worksheet/Validations.php
-
message: "#^Cannot call method getCalculatedValue\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Cell\\|null\\.$#"
count: 1
@@ -4140,11 +4160,6 @@ parameters:
count: 1
path: src/PhpSpreadsheet/Worksheet/Worksheet.php
-
message: "#^Cannot use array destructuring on array\\<string\\>\\|string\\.$#"
count: 2
path: src/PhpSpreadsheet/Worksheet/Worksheet.php
-
message: "#^If condition is always true\\.$#"
count: 2
@@ -4155,6 +4170,11 @@ parameters:
count: 2
path: src/PhpSpreadsheet/Worksheet/Worksheet.php
-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\:\\:extractSheetTitle\\(\\) should return array\\<string\\>\\|string but returns array\\<int, null\\>\\|null\\.$#"
count: 1
path: src/PhpSpreadsheet/Worksheet/Worksheet.php
-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\:\\:getChartByName\\(\\) should return PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\|false but returns PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\|null\\.$#"
count: 1
+1 -1
View File
@@ -1329,7 +1329,7 @@ class Worksheet extends WriterPart
$objWriter,
$this->getParentWriter()->getOffice2003Compatibility() === false,
'v',
($this->getParentWriter()->getPreCalculateFormulas() && !is_array($calculatedValue) && substr($calculatedValue, 0, 1) !== '#')
($this->getParentWriter()->getPreCalculateFormulas() && !is_array($calculatedValue) && substr($calculatedValue ?? '', 0, 1) !== '#')
? StringHelper::formatNumber($calculatedValue) : '0'
);
}