Skip to content

Commit

Permalink
Resolve Phpstan Messages Reader/Xls Shared/Escher (PHPOffice#3355)
Browse files Browse the repository at this point in the history
* Resolve Phpstan Messages Reader/Xls Shared/Escher

Reduce number of Phpstan messages by addressing their issues.

* Scrutinizer

Hyperactivity.

* More Scrutinizer

Getting close.

* Even More Scrutinizer

Closer and closer.
  • Loading branch information
oleibman authored Feb 12, 2023
1 parent 4e09fd4 commit 545fc89
Show file tree
Hide file tree
Showing 9 changed files with 121 additions and 305 deletions.
230 changes: 0 additions & 230 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -45,216 +45,6 @@ parameters:
count: 1
path: src/PhpSpreadsheet/Calculation/Statistical/Trends.php

-
message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\\\SpContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\:\\:getDgContainer\\(\\)\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\\\SpContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\:\\:getDggContainer\\(\\)\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Call to an undefined method object\\:\\:getEndCoordinates\\(\\)\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Call to an undefined method object\\:\\:getEndOffsetX\\(\\)\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Call to an undefined method object\\:\\:getEndOffsetY\\(\\)\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Call to an undefined method object\\:\\:getNestingLevel\\(\\)\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Call to an undefined method object\\:\\:getOPT\\(\\)\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Call to an undefined method object\\:\\:getStartCoordinates\\(\\)\\.$#"
count: 2
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Call to an undefined method object\\:\\:getStartOffsetX\\(\\)\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Call to an undefined method object\\:\\:getStartOffsetY\\(\\)\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Cannot access offset 1 on array\\|false\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^If condition is always true\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:includeCellRangeFiltered\\(\\) has no return type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:includeCellRangeFiltered\\(\\) has parameter \\$cellRangeAddress with no type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:parseRichText\\(\\) has no return type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:parseRichText\\(\\) has parameter \\$is with no type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Negated boolean expression is always false\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Parameter \\#1 \\$block of method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:makeKey\\(\\) expects int, float given\\.$#"
count: 2
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Parameter \\#1 \\$showSummaryBelow of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\:\\:setShowSummaryBelow\\(\\) expects bool, int given\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Parameter \\#1 \\$showSummaryRight of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\:\\:setShowSummaryRight\\(\\) expects bool, int given\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Parameter \\#2 \\$row of method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\IReadFilter\\:\\:readCell\\(\\) expects int, string given\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Parameter \\#2 \\$row of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Xls\\:\\:sizeRow\\(\\) expects int, string given\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Parameter \\#2 \\$startRow of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Xls\\:\\:getDistanceY\\(\\) expects int, string given\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Parameter \\#3 \\$subject of function str_replace expects array\\|string, int\\|string\\|null given\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Parameter \\#4 \\$endRow of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Xls\\:\\:getDistanceY\\(\\) expects int, string given\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:\\$data \\(string\\) does not accept string\\|null\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:\\$documentSummaryInformation \\(string\\) does not accept string\\|null\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:\\$documentSummaryInformation \\(string\\) in isset\\(\\) is not nullable\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:\\$md5Ctxt is never written, only read\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:\\$summaryInformation \\(string\\) does not accept string\\|null\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:\\$summaryInformation \\(string\\) in isset\\(\\) is not nullable\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 7
path: src/PhpSpreadsheet/Reader/Xls.php

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\:\\:getDgId\\(\\) has no return type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/Escher/DgContainer.php

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\:\\:getLastSpId\\(\\) has no return type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/Escher/DgContainer.php

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\:\\:getSpgrContainer\\(\\) has no return type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/Escher/DgContainer.php

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\:\\:setDgId\\(\\) has parameter \\$value with no type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/Escher/DgContainer.php

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\:\\:setLastSpId\\(\\) has parameter \\$value with no type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/Escher/DgContainer.php

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\:\\:setSpgrContainer\\(\\) has no return type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/Escher/DgContainer.php

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\:\\:setSpgrContainer\\(\\) has parameter \\$spgrContainer with no type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/Escher/DgContainer.php

-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\:\\:\\$spgrContainer has no type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/Escher/DgContainer.php

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\:\\:getChildren\\(\\) has no return type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer.php

-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\:\\:\\$parent is never read, only written\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE.php

-
message: "#^Cannot access offset 1 on array\\|false\\.$#"
count: 1
Expand Down Expand Up @@ -595,26 +385,6 @@ parameters:
count: 1
path: src/PhpSpreadsheet/Shared/Trend/Trend.php

-
message: "#^Elseif condition is always true\\.$#"
count: 1
path: src/PhpSpreadsheet/Writer/Xls/Escher.php

-
message: "#^If condition is always true\\.$#"
count: 3
path: src/PhpSpreadsheet/Writer/Xls/Escher.php

-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Escher\\:\\:\\$data has no type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Writer/Xls/Escher.php

-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Escher\\:\\:\\$object has no type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Writer/Xls/Escher.php

-
message: "#^Cannot access offset 'comp' on array\\|false\\.$#"
count: 1
Expand Down
Loading

0 comments on commit 545fc89

Please sign in to comment.