summaryrefslogtreecommitdiff
path: root/phpstan-baseline.neon
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2021-07-21 13:43:24 +0100
committerGreg Roach <greg@subaqua.co.uk>2021-07-21 13:43:24 +0100
commit47ab6ec4b92d115e541a7cb0edecb14ed6ee0b11 (patch)
tree27be40a3b140d7e50d7153e9fbf59fa4995eca4d /phpstan-baseline.neon
parent17437e5e473267cf0763ff6dee5d73623c7f78e2 (diff)
downloadwebtrees-47ab6ec4b92d115e541a7cb0edecb14ed6ee0b11.tar.gz
webtrees-47ab6ec4b92d115e541a7cb0edecb14ed6ee0b11.tar.bz2
webtrees-47ab6ec4b92d115e541a7cb0edecb14ed6ee0b11.zip
Update PHPstan baseline
Diffstat (limited to 'phpstan-baseline.neon')
-rw-r--r--phpstan-baseline.neon152
1 files changed, 81 insertions, 71 deletions
diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon
index 841d5882aa..bdbf55bb72 100644
--- a/phpstan-baseline.neon
+++ b/phpstan-baseline.neon
@@ -41,7 +41,7 @@ parameters:
path: app/Fact.php
-
- message: "#^Parameter \\#1 \\$string of function trim expects string, string\\|null given\\.$#"
+ message: "#^Parameter \\#1 \\$str of function trim expects string, string\\|null given\\.$#"
count: 1
path: app/Factories/SlugFactory.php
@@ -66,7 +66,17 @@ parameters:
path: app/Functions/FunctionsImport.php
-
- message: "#^Parameter \\#1 \\$array of function array_intersect expects array, array\\<int, string\\>\\|false given\\.$#"
+ message: "#^Cannot access offset 'OBJE' on array\\<mixed, string\\>\\|false\\.$#"
+ count: 2
+ path: app/Functions/FunctionsPrint.php
+
+ -
+ message: "#^Parameter \\#1 \\$arr1 of function array_intersect expects array, array\\<int, string\\>\\|false given\\.$#"
+ count: 1
+ path: app/Functions/FunctionsPrint.php
+
+ -
+ message: "#^Parameter \\#1 \\$array_arg of function uasort expects array, array\\<mixed, string\\>\\|false given\\.$#"
count: 1
path: app/Functions/FunctionsPrint.php
@@ -76,12 +86,12 @@ parameters:
path: app/Functions/FunctionsPrint.php
-
- message: "#^Parameter \\#2 \\$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: 1
path: app/Functions/FunctionsPrint.php
-
- message: "#^Parameter \\#2 \\.\\.\\.\\$arrays of function array_merge expects array, array\\<int, string\\>\\|false given\\.$#"
+ message: "#^Parameter \\#2 \\.\\.\\.\\$args of function array_merge expects array, array\\<int, string\\>\\|false given\\.$#"
count: 1
path: app/Functions/FunctionsPrint.php
@@ -96,7 +106,7 @@ parameters:
path: app/Functions/FunctionsPrintFacts.php
-
- message: "#^Parameter \\#2 \\$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: 1
path: app/Functions/FunctionsPrintFacts.php
@@ -130,12 +140,12 @@ parameters:
path: app/Functions/FunctionsRtl.php
-
- message: "#^Parameter \\#2 \\$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: 1
path: app/Functions/FunctionsRtl.php
-
- message: "#^Parameter \\#3 \\$length of function substr expects int\\|null, int\\<0, max\\>\\|false given\\.$#"
+ message: "#^Parameter \\#3 \\$length of function substr expects int, int\\<0, max\\>\\|false given\\.$#"
count: 1
path: app/Functions/FunctionsRtl.php
@@ -160,12 +170,12 @@ parameters:
path: app/GedcomRecord.php
-
- message: "#^Parameter \\#1 \\$array of function array_shift expects array, array\\<int, string\\>\\|false given\\.$#"
+ message: "#^Parameter \\#1 \\$stack of function array_shift expects array, array\\<int, string\\>\\|false given\\.$#"
count: 2
path: app/GedcomRecord.php
-
- message: "#^Parameter \\#1 \\$string of function trim expects string, string\\|null given\\.$#"
+ message: "#^Parameter \\#1 \\$str of function trim expects string, string\\|null given\\.$#"
count: 2
path: app/GedcomRecord.php
@@ -175,6 +185,11 @@ parameters:
path: app/GedcomRecord.php
-
+ message: "#^Parameter \\#2 \\$haystack of function array_search expects array, array\\<int, string\\>\\|false given\\.$#"
+ count: 2
+ path: app/GedcomRecord.php
+
+ -
message: "#^Parameter \\#3 \\$subject of function preg_replace expects array\\|string, string\\|null given\\.$#"
count: 1
path: app/GedcomRecord.php
@@ -295,7 +310,7 @@ parameters:
path: app/Http/RequestHandlers/EditNoteAction.php
-
- message: "#^Parameter \\#1 \\$string of function trim expects string, string\\|null given\\.$#"
+ message: "#^Parameter \\#1 \\$str of function trim expects string, string\\|null given\\.$#"
count: 1
path: app/Http/RequestHandlers/EditRawRecordAction.php
@@ -305,7 +320,7 @@ parameters:
path: app/Http/RequestHandlers/EmailPreferencesPage.php
-
- message: "#^Parameter \\#1 \\$stream of function stream_get_meta_data expects resource, resource\\|false given\\.$#"
+ message: "#^Parameter \\#1 \\$fp of function stream_get_meta_data expects resource, resource\\|false given\\.$#"
count: 1
path: app/Http/RequestHandlers/ExportGedcomClient.php
@@ -435,22 +450,42 @@ parameters:
path: app/Http/RequestHandlers/ManageMediaData.php
-
+ message: "#^Offset 0 does not exist on array\\|null\\.$#"
+ count: 2
+ path: app/Http/RequestHandlers/MapDataImportAction.php
+
+ -
+ message: "#^Offset int does not exist on array\\|null\\.$#"
+ count: 2
+ path: app/Http/RequestHandlers/MapDataImportAction.php
+
+ -
message: "#^Parameter \\#1 \\$haystack of function str_contains expects string, string\\|false given\\.$#"
count: 1
path: app/Http/RequestHandlers/MapDataImportAction.php
-
+ message: "#^Parameter \\#1 \\$input of function array_slice expects array, array\\|null given\\.$#"
+ count: 1
+ path: app/Http/RequestHandlers/MapDataImportAction.php
+
+ -
message: "#^Parameter \\#1 \\$json of function json_decode expects string, string\\|false given\\.$#"
count: 1
path: app/Http/RequestHandlers/MapDataImportAction.php
-
+ message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, array\\|null given\\.$#"
+ count: 1
+ path: app/Http/RequestHandlers/MapDataImportAction.php
+
+ -
message: "#^Parameter \\#1 \\$gedcom of method Fisharebest\\\\Webtrees\\\\GedcomRecord\\:\\:updateRecord\\(\\) expects string, string\\|null given\\.$#"
count: 1
path: app/Http/RequestHandlers/MergeFactsAction.php
-
- message: "#^Parameter \\#1 \\$callback of function call_user_func expects callable\\(\\)\\: mixed, array\\(Fisharebest\\\\Webtrees\\\\Module\\\\ModuleInterface, string\\) given\\.$#"
+ message: "#^Parameter \\#1 \\$function of function call_user_func expects callable\\(\\)\\: mixed, array\\(Fisharebest\\\\Webtrees\\\\Module\\\\ModuleInterface, non\\-empty\\-string\\) given\\.$#"
count: 1
path: app/Http/RequestHandlers/ModuleAction.php
@@ -490,7 +525,7 @@ parameters:
path: app/Http/RequestHandlers/SearchReplaceAction.php
-
- message: "#^Parameter \\#2 \\.\\.\\.\\$arrays of function array_merge expects array, array\\<int, string\\>\\|false given\\.$#"
+ message: "#^Parameter \\#2 \\.\\.\\.\\$args of function array_merge expects array, array\\<int, string\\>\\|false given\\.$#"
count: 1
path: app/Http/RequestHandlers/SearchReplaceAction.php
@@ -550,7 +585,7 @@ parameters:
path: app/Individual.php
-
- message: "#^Binary operation \"\\.\" between string and array\\|string results in an error\\.$#"
+ message: "#^Binary operation \"\\.\" between non\\-empty\\-string and array\\|string results in an error\\.$#"
count: 1
path: app/Individual.php
@@ -570,7 +605,7 @@ parameters:
path: app/Individual.php
-
- message: "#^Parameter \\#1 \\$num1 of function intdiv expects int, float\\|int given\\.$#"
+ message: "#^Parameter \\#1 \\$numerator of function intdiv expects int, float\\|int given\\.$#"
count: 1
path: app/Individual.php
@@ -615,7 +650,7 @@ parameters:
path: app/Module/CensusAssistantModule.php
-
- message: "#^Parameter \\#1 \\$stream of function stream_get_meta_data expects resource, resource\\|false given\\.$#"
+ message: "#^Parameter \\#1 \\$fp of function stream_get_meta_data expects resource, resource\\|false given\\.$#"
count: 1
path: app/Module/ClippingsCartModule.php
@@ -690,52 +725,47 @@ parameters:
path: app/Module/FanChartModule.php
-
- message: "#^Parameter \\#1 \\$image of function imagecolorallocate expects GdImage, GdImage\\|false given\\.$#"
+ message: "#^Parameter \\#1 \\$im of function imagecolorallocate expects resource, resource\\|false given\\.$#"
count: 1
path: app/Module/FanChartModule.php
-
- message: "#^Parameter \\#1 \\$image of function imagecolorallocate expects GdImage, resource given\\.$#"
+ message: "#^Parameter \\#1 \\$im of function imagecolortransparent expects resource, resource\\|false given\\.$#"
count: 1
path: app/Module/FanChartModule.php
-
- message: "#^Parameter \\#1 \\$image of function imagecolortransparent expects GdImage, GdImage\\|false given\\.$#"
+ message: "#^Parameter \\#1 \\$im of function imagedestroy expects resource, resource\\|false given\\.$#"
count: 1
path: app/Module/FanChartModule.php
-
- message: "#^Parameter \\#1 \\$image of function imagedestroy expects GdImage, GdImage\\|false given\\.$#"
- count: 1
- path: app/Module/FanChartModule.php
-
- -
- message: "#^Parameter \\#1 \\$image of function imagefilledarc expects GdImage, GdImage\\|false given\\.$#"
+ message: "#^Parameter \\#1 \\$im of function imagefilledarc expects resource, resource\\|false given\\.$#"
count: 2
path: app/Module/FanChartModule.php
-
- message: "#^Parameter \\#1 \\$image of function imagefilledrectangle expects GdImage, GdImage\\|false given\\.$#"
+ message: "#^Parameter \\#1 \\$im of function imagefilledrectangle expects resource, resource\\|false given\\.$#"
count: 1
path: app/Module/FanChartModule.php
-
- message: "#^Parameter \\#1 \\$image of function imagepng expects GdImage, GdImage\\|false given\\.$#"
+ message: "#^Parameter \\#1 \\$im of function imagepng expects resource, resource\\|false given\\.$#"
count: 1
path: app/Module/FanChartModule.php
-
- message: "#^Parameter \\#1 \\$image of function imagettftext expects GdImage, GdImage\\|false given\\.$#"
+ message: "#^Parameter \\#1 \\$im of function imagettftext expects resource, resource\\|false given\\.$#"
count: 1
path: app/Module/FanChartModule.php
-
- message: "#^Parameter \\#1 \\$image of method Fisharebest\\\\Webtrees\\\\Module\\\\FanChartModule\\:\\:imageColor\\(\\) expects resource, GdImage\\|false given\\.$#"
+ message: "#^Parameter \\#1 \\$image of method Fisharebest\\\\Webtrees\\\\Module\\\\FanChartModule\\:\\:imageColor\\(\\) expects resource, resource\\|false given\\.$#"
count: 4
path: app/Module/FanChartModule.php
-
- message: "#^Parameter \\#2 \\$color of function imagecolortransparent expects int\\|null, int\\|false given\\.$#"
+ message: "#^Parameter \\#2 \\$col of function imagecolortransparent expects int, int\\|false given\\.$#"
count: 1
path: app/Module/FanChartModule.php
@@ -745,7 +775,7 @@ parameters:
path: app/Module/FanChartModule.php
-
- message: "#^Parameter \\#6 \\$color of function imagefilledrectangle expects int, int\\|false given\\.$#"
+ message: "#^Parameter \\#6 \\$col of function imagefilledrectangle expects int, int\\|false given\\.$#"
count: 1
path: app/Module/FanChartModule.php
@@ -855,7 +885,7 @@ parameters:
path: app/Module/IndividualListModule.php
-
- message: "#^Parameter \\#1 \\$string of function strip_tags expects string, string\\|false given\\.$#"
+ message: "#^Parameter \\#1 \\$str of function strip_tags expects string, string\\|false given\\.$#"
count: 1
path: app/Module/IndividualMetadataModule.php
@@ -1195,21 +1225,11 @@ parameters:
path: app/Report/ReportHtmlTextbox.php
-
- message: "#^Parameter \\#1 \\$callback of function call_user_func expects callable\\(\\)\\: mixed, array\\(\\$this\\(Fisharebest\\\\Webtrees\\\\Report\\\\ReportParserBase\\), string\\) given\\.$#"
+ message: "#^Parameter \\#1 \\$function of function call_user_func expects callable\\(\\)\\: mixed, array\\(\\$this\\(Fisharebest\\\\Webtrees\\\\Report\\\\ReportParserBase\\), non\\-empty\\-string\\) given\\.$#"
count: 2
path: app/Report/ReportParserBase.php
-
- message: "#^Parameter \\#3 \\$value of function xml_parser_set_option expects int\\|string, false given\\.$#"
- count: 1
- path: app/Report/ReportParserBase.php
-
- -
- message: "#^Property Fisharebest\\\\Webtrees\\\\Report\\\\ReportParserBase\\:\\:\\$xml_parser \\(resource\\) does not accept XMLParser\\.$#"
- count: 1
- path: app/Report/ReportParserBase.php
-
- -
message: "#^Array \\(array\\<string\\>\\) does not accept array\\<int, string\\>\\.$#"
count: 1
path: app/Report/ReportParserGenerate.php
@@ -1285,22 +1305,22 @@ parameters:
path: app/Report/ReportParserGenerate.php
-
- message: "#^Parameter \\#1 \\$array of function end expects array, array\\<int, string\\>\\|false given\\.$#"
+ message: "#^Parameter \\#1 \\$array_arg of function end expects array\\|object, array\\<int, string\\>\\|false given\\.$#"
count: 1
path: app/Report/ReportParserGenerate.php
-
- message: "#^Parameter \\#1 \\$callback of function call_user_func expects callable\\(\\)\\: mixed, array\\(\\$this\\(Fisharebest\\\\Webtrees\\\\Report\\\\ReportParserGenerate\\), string\\) given\\.$#"
+ message: "#^Parameter \\#1 \\$function of function call_user_func expects callable\\(\\)\\: mixed, array\\(\\$this\\(Fisharebest\\\\Webtrees\\\\Report\\\\ReportParserGenerate\\), non\\-empty\\-string\\) given\\.$#"
count: 2
path: app/Report/ReportParserGenerate.php
-
- message: "#^Parameter \\#1 \\$image of function imagesx expects GdImage, GdImage\\|false given\\.$#"
+ message: "#^Parameter \\#1 \\$im of function imagesx expects resource, resource\\|false given\\.$#"
count: 2
path: app/Report/ReportParserGenerate.php
-
- message: "#^Parameter \\#1 \\$image of function imagesy expects GdImage, GdImage\\|false given\\.$#"
+ message: "#^Parameter \\#1 \\$im of function imagesy expects resource, resource\\|false given\\.$#"
count: 2
path: app/Report/ReportParserGenerate.php
@@ -1315,12 +1335,7 @@ parameters:
path: app/Report/ReportParserGenerate.php
-
- message: "#^Parameter \\#1 \\$parser of function xml_get_current_line_number expects XMLParser, resource given\\.$#"
- count: 6
- path: app/Report/ReportParserGenerate.php
-
- -
- message: "#^Parameter \\#1 \\$string of function addslashes expects string, string\\|null given\\.$#"
+ message: "#^Parameter \\#1 \\$str of function addslashes expects string, string\\|null given\\.$#"
count: 1
path: app/Report/ReportParserGenerate.php
@@ -1335,11 +1350,6 @@ parameters:
path: app/Report/ReportParserGenerate.php
-
- message: "#^Parameter \\#3 \\$value of function xml_parser_set_option expects int\\|string, false given\\.$#"
- count: 4
- path: app/Report/ReportParserGenerate.php
-
- -
message: "#^Property Fisharebest\\\\Webtrees\\\\Report\\\\ReportParserGenerate\\:\\:\\$current_element \\(Fisharebest\\\\Webtrees\\\\Report\\\\ReportBaseElement\\) does not accept Fisharebest\\\\Webtrees\\\\Report\\\\AbstractRenderer\\.$#"
count: 1
path: app/Report/ReportParserGenerate.php
@@ -1350,11 +1360,6 @@ parameters:
path: app/Report/ReportParserGenerate.php
-
- message: "#^Property Fisharebest\\\\Webtrees\\\\Report\\\\ReportParserGenerate\\:\\:\\$parser \\(resource\\) does not accept XMLParser\\.$#"
- count: 4
- path: app/Report/ReportParserGenerate.php
-
- -
message: "#^Property Fisharebest\\\\Webtrees\\\\Report\\\\ReportParserGenerate\\:\\:\\$print_data \\(bool\\) does not accept bool\\|null\\.$#"
count: 4
path: app/Report/ReportParserGenerate.php
@@ -1500,7 +1505,7 @@ parameters:
path: app/Services/GedcomEditService.php
-
- message: "#^Parameter \\#1 \\$array of function array_shift expects array, array\\<int, string\\>\\|false given\\.$#"
+ message: "#^Parameter \\#1 \\$stack of function array_shift expects array, array\\<int, string\\>\\|false given\\.$#"
count: 1
path: app/Services/GedcomEditService.php
@@ -1550,7 +1555,7 @@ parameters:
path: app/Services/MediaFileService.php
-
- message: "#^Parameter \\#1 \\$string of function trim expects string, string\\|null given\\.$#"
+ message: "#^Parameter \\#1 \\$str of function trim expects string, string\\|null given\\.$#"
count: 2
path: app/Services/MediaFileService.php
@@ -1625,6 +1630,11 @@ parameters:
path: app/Services/SearchService.php
-
+ message: "#^Parameter \\#1 \\$haystack of function str_starts_with expects string, int\\|string given\\.$#"
+ count: 2
+ path: app/Services/SearchService.php
+
+ -
message: "#^Parameter \\#3 \\$subject of function preg_replace expects array\\|string, string\\|null given\\.$#"
count: 1
path: app/Services/SearchService.php
@@ -1635,7 +1645,7 @@ parameters:
path: app/Services/ServerCheckService.php
-
- message: "#^Parameter \\#2 \\$string of function explode expects string, string\\|false given\\.$#"
+ message: "#^Parameter \\#2 \\$str of function explode expects string, string\\|false given\\.$#"
count: 2
path: app/Services/ServerCheckService.php
@@ -1655,22 +1665,22 @@ parameters:
path: app/Services/UpgradeService.php
-
- message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#"
+ message: "#^Parameter \\#1 \\$fp of function fclose expects resource, resource\\|false given\\.$#"
count: 1
path: app/Services/UpgradeService.php
-
- message: "#^Parameter \\#1 \\$stream of function ftell expects resource, resource\\|false given\\.$#"
+ message: "#^Parameter \\#1 \\$fp of function ftell expects resource, resource\\|false given\\.$#"
count: 1
path: app/Services/UpgradeService.php
-
- message: "#^Parameter \\#1 \\$stream of function fwrite expects resource, resource\\|false given\\.$#"
+ message: "#^Parameter \\#1 \\$fp of function fwrite expects resource, resource\\|false given\\.$#"
count: 1
path: app/Services/UpgradeService.php
-
- message: "#^Parameter \\#1 \\$stream of function rewind expects resource, resource\\|false given\\.$#"
+ message: "#^Parameter \\#1 \\$fp of function rewind expects resource, resource\\|false given\\.$#"
count: 1
path: app/Services/UpgradeService.php
@@ -1710,7 +1720,7 @@ parameters:
path: app/Statistics.php
-
- message: "#^Parameter \\#1 \\$callback of function call_user_func expects callable\\(\\)\\: mixed, array\\(\\$this\\(Fisharebest\\\\Webtrees\\\\Statistics\\), string\\) given\\.$#"
+ message: "#^Parameter \\#1 \\$function of function call_user_func expects callable\\(\\)\\: mixed, array\\(\\$this\\(Fisharebest\\\\Webtrees\\\\Statistics\\), string\\) given\\.$#"
count: 2
path: app/Statistics.php