From a0c59b8978a4fdd714d4a3efbb624885a0714cbc Mon Sep 17 00:00:00 2001 From: Heinz Wiesinger Date: Tue, 10 Dec 2024 13:21:19 +0100 Subject: [PATCH] Configuration: Ignore phpstan false positive --- src/Lunr/Core/Configuration.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Lunr/Core/Configuration.php b/src/Lunr/Core/Configuration.php index fb16209..9e58160 100644 --- a/src/Lunr/Core/Configuration.php +++ b/src/Lunr/Core/Configuration.php @@ -128,6 +128,12 @@ public function load_file(string $identifier): void include_once 'conf.' . $identifier . '.inc.php'; + /** + * Since we're including a config file here, it's conceivable that $config + * might not stay an array. Ignore the phpstan check for that. + * + * @phpstan-ignore function.alreadyNarrowedType + */ if (!is_array($config)) { $config = [];