Skip to content

Commit e41c428

Browse files
author
MarkBaker
committed
Initial creation of the version 2.0 Development branch
Start removing some of the deprecations, starting with the old Excel Function implementations.
1 parent bbebc0e commit e41c428

File tree

242 files changed

+513
-10198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

242 files changed

+513
-10198
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -245,51 +245,6 @@ parameters:
245245
count: 2
246246
path: src/PhpSpreadsheet/Calculation/Calculation.php
247247

248-
-
249-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\:\\:DMAX\\(\\) should return float but returns float\\|string\\|null\\.$#"
250-
count: 1
251-
path: src/PhpSpreadsheet/Calculation/Database.php
252-
253-
-
254-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\:\\:DMIN\\(\\) should return float but returns float\\|string\\|null\\.$#"
255-
count: 1
256-
path: src/PhpSpreadsheet/Calculation/Database.php
257-
258-
-
259-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\:\\:DPRODUCT\\(\\) should return float\\|string but returns float\\|string\\|null\\.$#"
260-
count: 1
261-
path: src/PhpSpreadsheet/Calculation/Database.php
262-
263-
-
264-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\:\\:DSTDEV\\(\\) should return float\\|string but returns float\\|string\\|null\\.$#"
265-
count: 1
266-
path: src/PhpSpreadsheet/Calculation/Database.php
267-
268-
-
269-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\:\\:DSTDEVP\\(\\) should return float\\|string but returns float\\|string\\|null\\.$#"
270-
count: 1
271-
path: src/PhpSpreadsheet/Calculation/Database.php
272-
273-
-
274-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\:\\:DSUM\\(\\) should return float\\|string but returns float\\|string\\|null\\.$#"
275-
count: 1
276-
path: src/PhpSpreadsheet/Calculation/Database.php
277-
278-
-
279-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\:\\:DVAR\\(\\) should return float\\|string but returns float\\|string\\|null\\.$#"
280-
count: 1
281-
path: src/PhpSpreadsheet/Calculation/Database.php
282-
283-
-
284-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\:\\:DVARP\\(\\) should return float\\|string but returns float\\|string\\|null\\.$#"
285-
count: 1
286-
path: src/PhpSpreadsheet/Calculation/Database.php
287-
288-
-
289-
message: "#^Parameter \\#2 \\$field of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\\\DCountA\\:\\:evaluate\\(\\) expects int\\|string, int\\|string\\|null given\\.$#"
290-
count: 1
291-
path: src/PhpSpreadsheet/Calculation/Database.php
292-
293248
-
294249
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\\\DatabaseAbstract\\:\\:buildCondition\\(\\) has parameter \\$criterion with no type specified\\.$#"
295250
count: 1
@@ -395,21 +350,6 @@ parameters:
395350
count: 1
396351
path: src/PhpSpreadsheet/Calculation/ExceptionHandler.php
397352

398-
-
399-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\:\\:ISPMT\\(\\) has no return type specified\\.$#"
400-
count: 1
401-
path: src/PhpSpreadsheet/Calculation/Financial.php
402-
403-
-
404-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\:\\:ISPMT\\(\\) has parameter \\$args with no type specified\\.$#"
405-
count: 1
406-
path: src/PhpSpreadsheet/Calculation/Financial.php
407-
408-
-
409-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\:\\:NPV\\(\\) has parameter \\$args with no type specified\\.$#"
410-
count: 1
411-
path: src/PhpSpreadsheet/Calculation/Financial.php
412-
413353
-
414354
message: "#^Parameter \\#1 \\$year of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\DateTimeExcel\\\\Helpers\\:\\:isLeapYear\\(\\) expects int\\|string, array\\|int\\|string given\\.$#"
415355
count: 1
@@ -630,16 +570,6 @@ parameters:
630570
count: 3
631571
path: src/PhpSpreadsheet/Calculation/Logical/Operations.php
632572

633-
-
634-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\:\\:CHOOSE\\(\\) has parameter \\$chooseArgs with no type specified\\.$#"
635-
count: 1
636-
path: src/PhpSpreadsheet/Calculation/LookupRef.php
637-
638-
-
639-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\:\\:OFFSET\\(\\) should return array\\|string but returns array\\|int\\|string\\.$#"
640-
count: 1
641-
path: src/PhpSpreadsheet/Calculation/LookupRef.php
642-
643573
-
644574
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\Address\\:\\:sheetName\\(\\) has no return type specified\\.$#"
645575
count: 1
@@ -835,16 +765,6 @@ parameters:
835765
count: 1
836766
path: src/PhpSpreadsheet/Calculation/MathTrig/Subtotal.php
837767

838-
-
839-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\:\\:MAXIFS\\(\\) should return float but returns float\\|string\\|null\\.$#"
840-
count: 1
841-
path: src/PhpSpreadsheet/Calculation/Statistical.php
842-
843-
-
844-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\:\\:MINIFS\\(\\) should return float but returns float\\|string\\|null\\.$#"
845-
count: 1
846-
path: src/PhpSpreadsheet/Calculation/Statistical.php
847-
848768
-
849769
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Averages\\:\\:filterArguments\\(\\) has no return type specified\\.$#"
850770
count: 1
@@ -1125,11 +1045,6 @@ parameters:
11251045
count: 1
11261046
path: src/PhpSpreadsheet/Calculation/Statistical/VarianceBase.php
11271047

1128-
-
1129-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\TextData\\:\\:CONCATENATE\\(\\) has parameter \\$args with no type specified\\.$#"
1130-
count: 1
1131-
path: src/PhpSpreadsheet/Calculation/TextData.php
1132-
11331048
-
11341049
message: "#^Variable \\$value on left side of \\?\\? always exists and is not nullable\\.$#"
11351050
count: 4

src/PhpSpreadsheet/Calculation/Calculation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2752,7 +2752,7 @@ class Calculation
27522752
],
27532753
'NAME.ERROR' => [
27542754
'argumentCount' => '*',
2755-
'functionCall' => [Functions::class, 'NAME'],
2755+
'functionCall' => [Information\ExcelError::class, 'NAME'],
27562756
],
27572757
'WILDCARDMATCH' => [
27582758
'argumentCount' => '2',
@@ -4655,7 +4655,7 @@ private function processTokenStack($tokens, $cellID = null, ?Cell $cell = null)
46554655
}
46564656
if (count(Functions::flattenArray($cellIntersect)) === 0) {
46574657
$this->debugLog->writeDebugLog('Evaluation Result is %s', $this->showTypeDetails($cellIntersect));
4658-
$stack->push('Error', Functions::null(), null);
4658+
$stack->push('Error', ExcelError::null(), null);
46594659
} else {
46604660
$cellRef = Coordinate::stringFromColumnIndex(min($oCol) + 1) . min($oRow) . ':' .
46614661
Coordinate::stringFromColumnIndex(max($oCol) + 1) . max($oRow);

0 commit comments

Comments
 (0)