Skip to content

Initial work on refactoring branch pruning logic #2644

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 52 additions & 82 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,6 @@ parameters:
count: 1
path: src/PhpSpreadsheet/Calculation/Calculation.php

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

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:localeFunc\\(\\) has no return type specified\\.$#"
count: 1
Expand All @@ -125,6 +120,16 @@ parameters:
count: 1
path: src/PhpSpreadsheet/Calculation/Calculation.php

-
message: "#^Offset 'type' does not exist on array\\|null\\.$#"
count: 3
path: src/PhpSpreadsheet/Calculation/Calculation.php

-
message: "#^Offset 'value' does not exist on array\\|null\\.$#"
count: 3
path: src/PhpSpreadsheet/Calculation/Calculation.php

-
message: "#^Parameter \\#1 \\$haystack of function stripos expects string, float\\|int\\|string given\\.$#"
count: 1
Expand All @@ -146,12 +151,12 @@ parameters:
path: src/PhpSpreadsheet/Calculation/Calculation.php

-
message: "#^Parameter \\#1 \\$str(ing)? of function trim expects string, int\\|string given\\.$#"
message: "#^Parameter \\#1 \\$str of function trim expects string, int\\|string given\\.$#"
count: 1
path: src/PhpSpreadsheet/Calculation/Calculation.php

-
message: "#^Parameter \\#1 \\$str(ing)? of function trim expects string, null given\\.$#"
message: "#^Parameter \\#1 \\$str of function trim expects string, null given\\.$#"
count: 2
path: src/PhpSpreadsheet/Calculation/Calculation.php

Expand All @@ -165,11 +170,6 @@ parameters:
count: 1
path: src/PhpSpreadsheet/Calculation/Calculation.php

-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:\\$branchPruningEnabled has no type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Calculation/Calculation.php

-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:\\$cellStack has no type specified\\.$#"
count: 1
Expand Down Expand Up @@ -246,7 +246,12 @@ parameters:
path: src/PhpSpreadsheet/Calculation/Calculation.php

-
message: "#^Strict comparison using \\=\\=\\= between mixed and null will always evaluate to false\\.$#"
message: "#^Strict comparison using \\=\\=\\= between array and '\\(' will always evaluate to false\\.$#"
count: 1
path: src/PhpSpreadsheet/Calculation/Calculation.php

-
message: "#^Strict comparison using \\=\\=\\= between non\\-empty\\-array and null will always evaluate to false\\.$#"
count: 2
path: src/PhpSpreadsheet/Calculation/Calculation.php

Expand Down Expand Up @@ -361,12 +366,12 @@ parameters:
path: src/PhpSpreadsheet/Calculation/Engineering/BitWise.php

-
message: "#^Parameter \\#1 \\$num(ber)? of function floor expects float(.int)?, float\\|int\\<0, 281474976710655\\>\\|string given\\.$#"
message: "#^Parameter \\#1 \\$number of function floor expects float, float\\|int\\<0, 281474976710655\\>\\|string given\\.$#"
count: 1
path: src/PhpSpreadsheet/Calculation/Engineering/BitWise.php

-
message: "#^Parameter \\#1 \\$num(ber)? of function floor expects float(.int)?, float\\|int\\|string given\\.$#"
message: "#^Parameter \\#1 \\$number of function floor expects float, float\\|int\\|string given\\.$#"
count: 1
path: src/PhpSpreadsheet/Calculation/Engineering/BitWise.php

Expand Down Expand Up @@ -821,12 +826,12 @@ parameters:
path: src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php

-
message: "#^Parameter \\#1 \\$(low|start) of function range expects float\\|int\\|string, string\\|null given\\.$#"
message: "#^Parameter \\#1 \\$low of function range expects float\\|int\\|string, string\\|null given\\.$#"
count: 1
path: src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php

-
message: "#^Parameter \\#2 \\$(high|end) of function range expects float\\|int\\|string, string\\|null given\\.$#"
message: "#^Parameter \\#2 \\$high of function range expects float\\|int\\|string, string\\|null given\\.$#"
count: 1
path: src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php

Expand Down Expand Up @@ -1180,41 +1185,6 @@ parameters:
count: 1
path: src/PhpSpreadsheet/Calculation/TextData/Text.php

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Token\\\\Stack\\:\\:getStackItem\\(\\) has no return type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Calculation/Token/Stack.php

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Token\\\\Stack\\:\\:getStackItem\\(\\) has parameter \\$onlyIf with no type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Calculation/Token/Stack.php

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Token\\\\Stack\\:\\:getStackItem\\(\\) has parameter \\$onlyIfNot with no type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Calculation/Token/Stack.php

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Token\\\\Stack\\:\\:getStackItem\\(\\) has parameter \\$reference with no type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Calculation/Token/Stack.php

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Token\\\\Stack\\:\\:getStackItem\\(\\) has parameter \\$storeKey with no type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Calculation/Token/Stack.php

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Token\\\\Stack\\:\\:getStackItem\\(\\) has parameter \\$type with no type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Calculation/Token/Stack.php

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Token\\\\Stack\\:\\:getStackItem\\(\\) has parameter \\$value with no type specified\\.$#"
count: 1
path: src/PhpSpreadsheet/Calculation/Token/Stack.php

-
message: "#^Elseif branch is unreachable because previous condition is always true\\.$#"
count: 1
Expand Down Expand Up @@ -1256,12 +1226,12 @@ parameters:
path: src/PhpSpreadsheet/Cell/Coordinate.php

-
message: "#^Parameter \\#1 \\$(input|array) of function array_chunk expects array, array\\<int, string\\>\\|false given\\.$#"
message: "#^Parameter \\#1 \\$input of function array_chunk expects array, array\\<int, string\\>\\|false given\\.$#"
count: 1
path: src/PhpSpreadsheet/Cell/Coordinate.php

-
message: "#^Parameter \\#2 \\$str(ing)? of function explode expects string, array\\<int, string\\>\\|string given\\.$#"
message: "#^Parameter \\#2 \\$str of function explode expects string, array\\<int, string\\>\\|string given\\.$#"
count: 1
path: src/PhpSpreadsheet/Cell/Coordinate.php

Expand Down Expand Up @@ -1946,7 +1916,7 @@ parameters:
path: src/PhpSpreadsheet/Helper/Html.php

-
message: "#^Parameter \\#1 \\$(function|callback) of function call_user_func expects callable\\(\\)\\: mixed, array\\{\\$this\\(PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Html\\), mixed\\} given\\.$#"
message: "#^Parameter \\#1 \\$function of function call_user_func expects callable\\(\\)\\: mixed, array\\{\\$this\\(PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Html\\), mixed\\} given\\.$#"
count: 1
path: src/PhpSpreadsheet/Helper/Html.php

Expand Down Expand Up @@ -2521,7 +2491,7 @@ parameters:
path: src/PhpSpreadsheet/Reader/Xls/MD5.php

-
message: "#^Parameter \\#1 \\$(input|array) of function array_values expects array, array\\|false given\\.$#"
message: "#^Parameter \\#1 \\$input of function array_values expects array, array\\|false given\\.$#"
count: 1
path: src/PhpSpreadsheet/Reader/Xls/MD5.php

Expand Down Expand Up @@ -3336,37 +3306,37 @@ parameters:
path: src/PhpSpreadsheet/Shared/Drawing.php

-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Drawing\\:\\:imagecreatefrombmp\\(\\) should return GdImage\\|resource but returns (GdImage|resource)\\|false\\.$#"
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Drawing\\:\\:imagecreatefrombmp\\(\\) should return GdImage\\|resource but returns resource\\|false\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/Drawing.php

-
message: "#^Parameter \\#1 \\$(fp|stream) of function feof expects resource, resource\\|false given\\.$#"
message: "#^Parameter \\#1 \\$fp of function feof expects resource, resource\\|false given\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/Drawing.php

-
message: "#^Parameter \\#1 \\$(fp|stream) of function fread expects resource, resource\\|false given\\.$#"
message: "#^Parameter \\#1 \\$fp of function fread expects resource, resource\\|false given\\.$#"
count: 2
path: src/PhpSpreadsheet/Shared/Drawing.php

-
message: "#^Parameter \\#1 \\$im(age)? of function imagecolorallocate expects (GdImage|resource), (GdImage|resource)\\|false given\\.$#"
message: "#^Parameter \\#1 \\$im of function imagecolorallocate expects resource, resource\\|false given\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/Drawing.php

-
message: "#^Parameter \\#1 \\$im(age)? of function imagesetpixel expects (GdImage|resource), (GdImage|resource)\\|false given\\.$#"
message: "#^Parameter \\#1 \\$im of function imagesetpixel expects resource, resource\\|false given\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/Drawing.php

-
message: "#^Parameter \\#1 \\$(x_size|width) of function imagecreatetruecolor expects int, float\\|int given\\.$#"
message: "#^Parameter \\#1 \\$x_size of function imagecreatetruecolor expects int, float\\|int given\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/Drawing.php

-
message: "#^Parameter \\#2 \\$(data|string) of function unpack expects string, string\\|false given\\.$#"
message: "#^Parameter \\#2 \\$data of function unpack expects string, string\\|false given\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/Drawing.php

Expand All @@ -3376,7 +3346,7 @@ parameters:
path: src/PhpSpreadsheet/Shared/Drawing.php

-
message: "#^Parameter \\#2 \\$(y_size|height) of function imagecreatetruecolor expects int, float\\|int given\\.$#"
message: "#^Parameter \\#2 \\$y_size of function imagecreatetruecolor expects int, float\\|int given\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/Drawing.php

Expand All @@ -3396,7 +3366,7 @@ parameters:
path: src/PhpSpreadsheet/Shared/Drawing.php

-
message: "#^Parameter \\#4 \\$col(or)? of function imagesetpixel expects int, int\\|false given\\.$#"
message: "#^Parameter \\#4 \\$col of function imagesetpixel expects int, int\\|false given\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/Drawing.php

Expand Down Expand Up @@ -3596,7 +3566,7 @@ parameters:
path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php

-
message: "#^Parameter \\#1 \\$str(ing)? of function trim expects string, float\\|int given\\.$#"
message: "#^Parameter \\#1 \\$str of function trim expects string, float\\|int given\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php

Expand Down Expand Up @@ -3676,7 +3646,7 @@ parameters:
path: src/PhpSpreadsheet/Shared/OLE.php

-
message: "#^Parameter \\#2 \\$(data|string) of function unpack expects string, string\\|false given\\.$#"
message: "#^Parameter \\#2 \\$data of function unpack expects string, string\\|false given\\.$#"
count: 3
path: src/PhpSpreadsheet/Shared/OLE.php

Expand Down Expand Up @@ -3716,7 +3686,7 @@ parameters:
path: src/PhpSpreadsheet/Shared/OLE.php

-
message: "#^Parameter \\#1 \\$(var|value) of function count expects array\\|Countable, string given\\.$#"
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, string given\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php

Expand Down Expand Up @@ -4061,7 +4031,7 @@ parameters:
path: src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php

-
message: "#^Parameter \\#2 \\.\\.\\.\\$(args|arrays) of function array_merge expects array, float given\\.$#"
message: "#^Parameter \\#2 \\.\\.\\.\\$args of function array_merge expects array, float given\\.$#"
count: 1
path: src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php

Expand Down Expand Up @@ -4361,7 +4331,7 @@ parameters:
path: src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php

-
message: "#^Parameter \\#2 \\$str(ing)? of function explode expects string, string\\|null given\\.$#"
message: "#^Parameter \\#2 \\$str of function explode expects string, string\\|null given\\.$#"
count: 1
path: src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php

Expand Down Expand Up @@ -4486,7 +4456,7 @@ parameters:
path: src/PhpSpreadsheet/Worksheet/PageSetup.php

-
message: "#^Parameter \\#2 \\$str(ing)? of function explode expects string, string\\|null given\\.$#"
message: "#^Parameter \\#2 \\$str of function explode expects string, string\\|null given\\.$#"
count: 5
path: src/PhpSpreadsheet/Worksheet/PageSetup.php

Expand Down Expand Up @@ -4581,7 +4551,7 @@ parameters:
path: src/PhpSpreadsheet/Worksheet/Worksheet.php

-
message: "#^Parameter \\#1 \\$(input|array) of function array_splice expects array, ArrayObject\\<int, PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\> given\\.$#"
message: "#^Parameter \\#1 \\$input of function array_splice expects array, ArrayObject\\<int, PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\> given\\.$#"
count: 1
path: src/PhpSpreadsheet/Worksheet/Worksheet.php

Expand All @@ -4606,7 +4576,7 @@ parameters:
path: src/PhpSpreadsheet/Worksheet/Worksheet.php

-
message: "#^Parameter \\#2 \\$(start|offset) of function substr expects int, int(\\<0, max\\>)?\\|false given\\.$#"
message: "#^Parameter \\#2 \\$start of function substr expects int, int\\<0, max\\>\\|false given\\.$#"
count: 2
path: src/PhpSpreadsheet/Worksheet/Worksheet.php

Expand Down Expand Up @@ -4931,12 +4901,12 @@ parameters:
path: src/PhpSpreadsheet/Writer/Html.php

-
message: "#^Parameter \\#1 \\$im(age)? of function imagepng expects (GdImage|resource), GdImage\\|resource given\\.$#"
message: "#^Parameter \\#1 \\$im of function imagepng expects resource, GdImage\\|resource given\\.$#"
count: 1
path: src/PhpSpreadsheet/Writer/Html.php

-
message: "#^Parameter \\#1 \\$str(ing)? of function base64_encode expects string, string\\|false given\\.$#"
message: "#^Parameter \\#1 \\$str of function base64_encode expects string, string\\|false given\\.$#"
count: 2
path: src/PhpSpreadsheet/Writer/Html.php

Expand Down Expand Up @@ -5066,12 +5036,12 @@ parameters:
path: src/PhpSpreadsheet/Writer/Xls.php

-
message: "#^Parameter \\#1 \\$im(age)? of function imagepng expects (GdImage|resource), GdImage\\|resource given\\.$#"
message: "#^Parameter \\#1 \\$im of function imagepng expects resource, GdImage\\|resource given\\.$#"
count: 1
path: src/PhpSpreadsheet/Writer/Xls.php

-
message: "#^Parameter \\#1 \\$im(age)? of function imagepng expects (GdImage|resource), (GdImage|resource)\\|false given\\.$#"
message: "#^Parameter \\#1 \\$im of function imagepng expects resource, resource\\|false given\\.$#"
count: 1
path: src/PhpSpreadsheet/Writer/Xls.php

Expand Down Expand Up @@ -5256,7 +5226,7 @@ parameters:
path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php

-
message: "#^Parameter \\#1 \\$im(age)? of function imagecolorat expects (GdImage|resource), GdImage\\|resource given\\.$#"
message: "#^Parameter \\#1 \\$im of function imagecolorat expects resource, GdImage\\|resource given\\.$#"
count: 1
path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php

Expand All @@ -5271,12 +5241,12 @@ parameters:
path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php

-
message: "#^Parameter \\#2 \\$col(or)? of function imagecolorsforindex expects int, int\\|false given\\.$#"
message: "#^Parameter \\#2 \\$col of function imagecolorsforindex expects int, int\\|false given\\.$#"
count: 1
path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php

-
message: "#^Parameter \\#2 \\$(data|string) of function unpack expects string, string\\|false given\\.$#"
message: "#^Parameter \\#2 \\$data of function unpack expects string, string\\|false given\\.$#"
count: 1
path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php

Expand All @@ -5286,7 +5256,7 @@ parameters:
path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php

-
message: "#^Parameter \\#2 \\$(pieces|array) of function implode expects array(\\|null)?, array\\<int, string\\>\\|false given\\.$#"
message: "#^Parameter \\#2 \\$pieces of function implode expects array, array\\<int, string\\>\\|false given\\.$#"
count: 1
path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php

Expand Down Expand Up @@ -5371,7 +5341,7 @@ parameters:
path: src/PhpSpreadsheet/Writer/Xlsx.php

-
message: "#^Parameter \\#1 \\$(function|callback) of function call_user_func expects callable\\(\\)\\: mixed, string given\\.$#"
message: "#^Parameter \\#1 \\$function of function call_user_func expects callable\\(\\)\\: mixed, string given\\.$#"
count: 1
path: src/PhpSpreadsheet/Writer/Xlsx.php

Expand Down
Loading