From 5994d6058652f69b15626ef1943e43f09d37a9b7 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Sun, 21 Nov 2021 10:21:36 +0000 Subject: Fix: #4106 - use PHPdoc template for return type of cache functions --- phpstan-baseline.neon | 139 +++----------------------------------------------- 1 file changed, 7 insertions(+), 132 deletions(-) (limited to 'phpstan-baseline.neon') diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 3894bb3f37..cea35fbc8e 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -5,6 +5,11 @@ parameters: count: 1 path: app/Auth.php + - + message: "#^Method Fisharebest\\\\Webtrees\\\\Cache\\:\\:remember\\(\\) should return T but returns mixed\\.$#" + count: 1 + path: app/Cache.php + - message: "#^Method Fisharebest\\\\Webtrees\\\\Census\\\\AbstractCensusColumn\\:\\:spouseFamily\\(\\) should return Fisharebest\\\\Webtrees\\\\Family\\|null but returns mixed\\.$#" count: 1 @@ -105,11 +110,6 @@ parameters: count: 1 path: app/Factories/FamilyFactory.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Factories\\\\FamilyFactory\\:\\:make\\(\\) should return Fisharebest\\\\Webtrees\\\\Family\\|null but returns mixed\\.$#" - count: 1 - path: app/Factories/FamilyFactory.php - - message: "#^Parameter \\#1 \\$gedcom of method Fisharebest\\\\Webtrees\\\\Factories\\\\AbstractGedcomRecordFactory\\:\\:extractXref\\(\\) expects string, mixed given\\.$#" count: 1 @@ -130,11 +130,6 @@ parameters: count: 1 path: app/Factories/GedcomRecordFactory.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Factories\\\\GedcomRecordFactory\\:\\:make\\(\\) should return Fisharebest\\\\Webtrees\\\\GedcomRecord\\|null but returns mixed\\.$#" - count: 1 - path: app/Factories/GedcomRecordFactory.php - - message: "#^Parameter \\#1 \\$gedcom of method Fisharebest\\\\Webtrees\\\\Factories\\\\AbstractGedcomRecordFactory\\:\\:extractXref\\(\\) expects string, mixed given\\.$#" count: 1 @@ -155,11 +150,6 @@ parameters: count: 1 path: app/Factories/HeaderFactory.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Factories\\\\HeaderFactory\\:\\:make\\(\\) should return Fisharebest\\\\Webtrees\\\\Header\\|null but returns mixed\\.$#" - count: 1 - path: app/Factories/HeaderFactory.php - - message: "#^Parameter \\#1 \\$gedcom of method Fisharebest\\\\Webtrees\\\\Factories\\\\AbstractGedcomRecordFactory\\:\\:extractXref\\(\\) expects string, mixed given\\.$#" count: 1 @@ -175,21 +165,11 @@ parameters: count: 1 path: app/Factories/HeaderFactory.php - - - message: "#^Parameter \\#1 \\$data of method Fisharebest\\\\Webtrees\\\\Factories\\\\ImageFactory\\:\\:imageResponse\\(\\) expects string, mixed given\\.$#" - count: 1 - path: app/Factories/ImageFactory.php - - message: "#^Method Fisharebest\\\\Webtrees\\\\Factories\\\\IndividualFactory\\:\\:gedcom\\(\\) should return string\\|null but returns mixed\\.$#" count: 1 path: app/Factories/IndividualFactory.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Factories\\\\IndividualFactory\\:\\:make\\(\\) should return Fisharebest\\\\Webtrees\\\\Individual\\|null but returns mixed\\.$#" - count: 1 - path: app/Factories/IndividualFactory.php - - message: "#^Parameter \\#1 \\$gedcom of method Fisharebest\\\\Webtrees\\\\Factories\\\\AbstractGedcomRecordFactory\\:\\:extractXref\\(\\) expects string, mixed given\\.$#" count: 1 @@ -210,11 +190,6 @@ parameters: count: 1 path: app/Factories/LocationFactory.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Factories\\\\LocationFactory\\:\\:make\\(\\) should return Fisharebest\\\\Webtrees\\\\Location\\|null but returns mixed\\.$#" - count: 1 - path: app/Factories/LocationFactory.php - - message: "#^Parameter \\#1 \\$gedcom of method Fisharebest\\\\Webtrees\\\\Factories\\\\AbstractGedcomRecordFactory\\:\\:extractXref\\(\\) expects string, mixed given\\.$#" count: 1 @@ -235,11 +210,6 @@ parameters: count: 1 path: app/Factories/MediaFactory.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Factories\\\\MediaFactory\\:\\:make\\(\\) should return Fisharebest\\\\Webtrees\\\\Media\\|null but returns mixed\\.$#" - count: 1 - path: app/Factories/MediaFactory.php - - message: "#^Parameter \\#1 \\$gedcom of method Fisharebest\\\\Webtrees\\\\Factories\\\\AbstractGedcomRecordFactory\\:\\:extractXref\\(\\) expects string, mixed given\\.$#" count: 1 @@ -260,11 +230,6 @@ parameters: count: 1 path: app/Factories/NoteFactory.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Factories\\\\NoteFactory\\:\\:make\\(\\) should return Fisharebest\\\\Webtrees\\\\Note\\|null but returns mixed\\.$#" - count: 1 - path: app/Factories/NoteFactory.php - - message: "#^Parameter \\#1 \\$gedcom of method Fisharebest\\\\Webtrees\\\\Factories\\\\AbstractGedcomRecordFactory\\:\\:extractXref\\(\\) expects string, mixed given\\.$#" count: 1 @@ -285,11 +250,6 @@ parameters: count: 1 path: app/Factories/RepositoryFactory.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Factories\\\\RepositoryFactory\\:\\:make\\(\\) should return Fisharebest\\\\Webtrees\\\\Repository\\|null but returns mixed\\.$#" - count: 1 - path: app/Factories/RepositoryFactory.php - - message: "#^Parameter \\#1 \\$gedcom of method Fisharebest\\\\Webtrees\\\\Factories\\\\AbstractGedcomRecordFactory\\:\\:extractXref\\(\\) expects string, mixed given\\.$#" count: 1 @@ -315,11 +275,6 @@ parameters: count: 1 path: app/Factories/SourceFactory.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Factories\\\\SourceFactory\\:\\:make\\(\\) should return Fisharebest\\\\Webtrees\\\\Source\\|null but returns mixed\\.$#" - count: 1 - path: app/Factories/SourceFactory.php - - message: "#^Parameter \\#1 \\$gedcom of method Fisharebest\\\\Webtrees\\\\Factories\\\\AbstractGedcomRecordFactory\\:\\:extractXref\\(\\) expects string, mixed given\\.$#" count: 1 @@ -340,11 +295,6 @@ parameters: count: 1 path: app/Factories/SubmissionFactory.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Factories\\\\SubmissionFactory\\:\\:make\\(\\) should return Fisharebest\\\\Webtrees\\\\Submission\\|null but returns mixed\\.$#" - count: 1 - path: app/Factories/SubmissionFactory.php - - message: "#^Parameter \\#1 \\$gedcom of method Fisharebest\\\\Webtrees\\\\Factories\\\\AbstractGedcomRecordFactory\\:\\:extractXref\\(\\) expects string, mixed given\\.$#" count: 1 @@ -365,11 +315,6 @@ parameters: count: 1 path: app/Factories/SubmitterFactory.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Factories\\\\SubmitterFactory\\:\\:make\\(\\) should return Fisharebest\\\\Webtrees\\\\Submitter\\|null but returns mixed\\.$#" - count: 1 - path: app/Factories/SubmitterFactory.php - - message: "#^Parameter \\#1 \\$gedcom of method Fisharebest\\\\Webtrees\\\\Factories\\\\AbstractGedcomRecordFactory\\:\\:extractXref\\(\\) expects string, mixed given\\.$#" count: 1 @@ -480,11 +425,6 @@ parameters: count: 1 path: app/GedcomRecord.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\GedcomRecord\\:\\:canShow\\(\\) should return bool but returns mixed\\.$#" - count: 1 - path: app/GedcomRecord.php - - message: "#^Method Fisharebest\\\\Webtrees\\\\GedcomRecord\\:\\:lastChangeTimestamp\\(\\) should return Fisharebest\\\\Webtrees\\\\Carbon but returns Fisharebest\\\\Webtrees\\\\Carbon\\|false\\.$#" count: 3 @@ -580,11 +520,6 @@ parameters: count: 1 path: app/Http/Middleware/AuthModerator.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Http\\\\Middleware\\\\BadBotBlocker\\:\\:fetchIpRangesForAsn\\(\\) should return array\\ but returns mixed\\.$#" - count: 1 - path: app/Http/Middleware/BadBotBlocker.php - - message: "#^Parameter \\#1 \\$ip of method Fisharebest\\\\Webtrees\\\\Http\\\\Middleware\\\\BadBotBlocker\\:\\:checkRobotDNS\\(\\) expects string, mixed given\\.$#" count: 2 @@ -1070,11 +1005,6 @@ parameters: count: 1 path: app/Http/RequestHandlers/ImportThumbnailsData.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Http\\\\RequestHandlers\\\\ImportThumbnailsData\\:\\:scaledImagePixels\\(\\) should return array\\\\> but returns mixed\\.$#" - count: 1 - path: app/Http/RequestHandlers/ImportThumbnailsData.php - - message: "#^Parameter \\#1 \\$base_url of method Fisharebest\\\\Webtrees\\\\Validator\\:\\:isLocalUrl\\(\\) expects string, mixed given\\.$#" count: 1 @@ -1626,17 +1556,7 @@ parameters: path: app/Media.php - - message: "#^Cannot access offset string on mixed\\.$#" - count: 1 - path: app/Module/AbstractModule.php - - - - message: "#^Cannot call method first\\(\\) on mixed\\.$#" - count: 1 - path: app/Module/AbstractModule.php - - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Module\\\\AbstractModule\\:\\:getBlockSetting\\(\\) should return string but returns mixed\\.$#" + message: "#^Cannot access property \\$access_level on mixed\\.$#" count: 1 path: app/Module/AbstractModule.php @@ -2165,11 +2085,6 @@ parameters: count: 1 path: app/Module/GeonamesAutocomplete.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Module\\\\GeonamesAutocomplete\\:\\:searchPlaceNames\\(\\) should return array\\ but returns mixed\\.$#" - count: 1 - path: app/Module/GeonamesAutocomplete.php - - message: "#^Cannot call method getAttribute\\(\\) on mixed\\.$#" count: 2 @@ -2335,21 +2250,11 @@ parameters: count: 1 path: app/Module/MapGeoLocationGeonames.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Module\\\\MapGeoLocationGeonames\\:\\:searchPlaceNames\\(\\) should return array\\ but returns mixed\\.$#" - count: 1 - path: app/Module/MapGeoLocationGeonames.php - - message: "#^Method Fisharebest\\\\Webtrees\\\\Module\\\\MapGeoLocationNominatim\\:\\:extractLocationsFromResponse\\(\\) should return array\\ but returns mixed\\.$#" count: 1 path: app/Module/MapGeoLocationNominatim.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Module\\\\MapGeoLocationNominatim\\:\\:searchPlaceNames\\(\\) should return array\\ but returns mixed\\.$#" - count: 1 - path: app/Module/MapGeoLocationNominatim.php - - message: "#^Expression on left side of \\?\\? is not nullable\\.$#" count: 1 @@ -2360,11 +2265,6 @@ parameters: count: 1 path: app/Module/MapGeoLocationOpenRouteService.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Module\\\\MapGeoLocationOpenRouteService\\:\\:searchPlaceNames\\(\\) should return array\\ but returns mixed\\.$#" - count: 1 - path: app/Module/MapGeoLocationOpenRouteService.php - - message: "#^Cannot call method getServerParams\\(\\) on mixed\\.$#" count: 1 @@ -2475,11 +2375,6 @@ parameters: count: 1 path: app/Module/OpenRouteServiceAutocomplete.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Module\\\\OpenRouteServiceAutocomplete\\:\\:searchPlaceNames\\(\\) should return array\\ but returns mixed\\.$#" - count: 1 - path: app/Module/OpenRouteServiceAutocomplete.php - - message: "#^Cannot call method name\\(\\) on mixed\\.$#" count: 1 @@ -2980,11 +2875,6 @@ parameters: count: 1 path: app/Place.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Place\\:\\:id\\(\\) should return int but returns mixed\\.$#" - count: 1 - path: app/Place.php - - message: "#^Parameter \\#1 \\$str of function mb_substr expects string, mixed given\\.$#" count: 2 @@ -3031,12 +2921,7 @@ parameters: path: app/PlaceLocation.php - - message: "#^Method Fisharebest\\\\Webtrees\\\\PlaceLocation\\:\\:details\\(\\) should return object but returns mixed\\.$#" - count: 1 - path: app/PlaceLocation.php - - - - message: "#^Method Fisharebest\\\\Webtrees\\\\PlaceLocation\\:\\:id\\(\\) should return int\\|null but returns mixed\\.$#" + message: "#^Method Fisharebest\\\\Webtrees\\\\PlaceLocation\\:\\:details\\(\\) should return object but returns object\\|null\\.$#" count: 1 path: app/PlaceLocation.php @@ -3509,11 +3394,6 @@ parameters: count: 1 path: app/Services/ModuleService.php - - - message: "#^Cannot call method filter\\(\\) on mixed\\.$#" - count: 1 - path: app/Services/ModuleService.php - - message: "#^Cannot call method setName\\(\\) on mixed\\.$#" count: 1 @@ -3629,11 +3509,6 @@ parameters: count: 1 path: app/Services/UserService.php - - - message: "#^Method Fisharebest\\\\Webtrees\\\\Services\\\\UserService\\:\\:find\\(\\) should return Fisharebest\\\\Webtrees\\\\User\\|null but returns mixed\\.$#" - count: 1 - path: app/Services/UserService.php - - message: "#^Method Fisharebest\\\\Webtrees\\\\Services\\\\UserService\\:\\:findByEmail\\(\\) should return Fisharebest\\\\Webtrees\\\\User\\|null but returns mixed\\.$#" count: 1 -- cgit v1.3