From 2361865c744a00242e06d0493337771658326692 Mon Sep 17 00:00:00 2001 From: Chris Kankiewicz Date: Wed, 10 Jul 2024 16:01:36 -0700 Subject: [PATCH] Updated phpstan config and baseline --- phpstan-baseline.neon | 75 +++++++++++++++++++++++++++++++++++++++++++ phpstan.neon.dist | 1 - 2 files changed, 75 insertions(+), 1 deletion(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 25e24ee..b3b8048 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,5 +1,30 @@ parameters: ignoreErrors: + - + message: "#^Method App\\\\Bootstrap\\\\AppManager\\:\\:__invoke\\(\\) return type with generic class Slim\\\\App does not specify its types\\: TContainerInterface$#" + count: 1 + path: app/src/Bootstrap/AppManager.php + + - + message: "#^PHPDoc tag @var for variable \\$configFiles has no value type specified in iterable type iterable\\.$#" + count: 1 + path: app/src/Bootstrap/BootManager.php + + - + message: "#^Method App\\\\Bootstrap\\\\ExceptionManager\\:\\:__construct\\(\\) has parameter \\$app with generic class Slim\\\\App but does not specify its types\\: TContainerInterface$#" + count: 1 + path: app/src/Bootstrap/ExceptionManager.php + + - + message: "#^Method App\\\\Bootstrap\\\\MiddlewareManager\\:\\:__construct\\(\\) has parameter \\$app with generic class Slim\\\\App but does not specify its types\\: TContainerInterface$#" + count: 1 + path: app/src/Bootstrap/MiddlewareManager.php + + - + message: "#^Method App\\\\Bootstrap\\\\RouteManager\\:\\:__construct\\(\\) has parameter \\$app with generic class Slim\\\\App but does not specify its types\\: TContainerInterface$#" + count: 1 + path: app/src/Bootstrap/RouteManager.php + - message: "#^Method App\\\\Controllers\\\\DirectoryController\\:\\:__invoke\\(\\) throws checked exception Twig\\\\Error\\\\LoaderError but it's missing from the PHPDoc @throws tag\\.$#" count: 2 @@ -15,6 +40,11 @@ parameters: count: 2 path: app/src/Controllers/DirectoryController.php + - + message: "#^Method App\\\\Controllers\\\\FileInfoController\\:\\:calculateHashes\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: app/src/Controllers/FileInfoController.php + - message: "#^Method App\\\\Controllers\\\\SearchController\\:\\:__invoke\\(\\) throws checked exception Twig\\\\Error\\\\LoaderError but it's missing from the PHPDoc @throws tag\\.$#" count: 2 @@ -55,6 +85,11 @@ parameters: count: 1 path: app/src/Exceptions/ErrorHandler.php + - + message: "#^Method App\\\\Factories\\\\TranslationFactory\\:\\:translations\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: app/src/Factories/TranslationFactory.php + - message: "#^Method App\\\\Factories\\\\TwigFactory\\:\\:__invoke\\(\\) throws checked exception ReflectionException but it's missing from the PHPDoc @throws tag\\.$#" count: 1 @@ -100,21 +135,61 @@ parameters: count: 1 path: app/src/ViewFunctions/SizeForHumans.php + - + message: "#^Method Tests\\\\Controllers\\\\DirectoryControllerTest\\:\\:configOptions\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Controllers/DirectoryControllerTest.php + - message: "#^Parameter \\#1 \\$finfo of function finfo_buffer expects finfo, finfo\\|false given\\.$#" count: 1 path: tests/Exceptions/ErrorHandlerTest.php + - + message: "#^Method Tests\\\\Factories\\\\CacheFactoryTest\\:\\:cacheAdapters\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Factories/CacheFactoryTest.php + - message: "#^Parameter \\#1 \\$expected of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) expects class\\-string\\, string given\\.$#" count: 1 path: tests/Factories/CacheFactoryTest.php + - + message: "#^Method Tests\\\\Factories\\\\FinderFactoryTest\\:\\:getFilesArray\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Factories/FinderFactoryTest.php + - message: "#^Cannot call method getCallable\\(\\) on Twig\\\\TwigFunction\\|null\\.$#" count: 11 path: tests/Factories/TwigFactoryTest.php + - + message: "#^Method Tests\\\\HiddenFilesTest\\:\\:hiddenFilesProvider\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/HiddenFilesTest.php + + - + message: "#^Method Tests\\\\HiddenFilesTest\\:\\:test_it_creates_a_collection_of_hidden_files\\(\\) has parameter \\$expected with no value type specified in iterable type array\\.$#" + count: 1 + path: tests/HiddenFilesTest.php + + - + message: "#^Method Tests\\\\HiddenFilesTest\\:\\:test_it_creates_a_collection_of_hidden_files\\(\\) has parameter \\$hiddenFilesArray with no value type specified in iterable type array\\.$#" + count: 1 + path: tests/HiddenFilesTest.php + + - + message: "#^Method Tests\\\\Middlewares\\\\PruneCacheMiddlewareTest\\:\\:nonPruneableCacheAdapters\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Middlewares/PruneCacheMiddlewareTest.php + + - + message: "#^Method Tests\\\\Middlewares\\\\PruneCacheMiddlewareTest\\:\\:pruneableCacheAdapters\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: tests/Middlewares/PruneCacheMiddlewareTest.php + - message: "#^Parameter \\#1 \\$className of method PHPUnit\\\\Framework\\\\TestCase\\:\\:getMockBuilder\\(\\) expects class\\-string\\, string given\\.$#" count: 1 diff --git a/phpstan.neon.dist b/phpstan.neon.dist index db4be25..5d56226 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -14,7 +14,6 @@ parameters: level: 8 checkFunctionNameCase: true - checkMissingIterableValueType: false reportUnmatchedIgnoredErrors: false