From 0e4b878cbe0a4e2a53e735c2277f7dba22f4d2c1 Mon Sep 17 00:00:00 2001 From: Andrew Nagy Date: Thu, 2 Mar 2023 18:14:20 +0000 Subject: [PATCH] fix outstanding issues --- src/Psalm/Internal/LanguageServer/LanguageServer.php | 2 +- src/Psalm/Internal/Provider/FileProvider.php | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Psalm/Internal/LanguageServer/LanguageServer.php b/src/Psalm/Internal/LanguageServer/LanguageServer.php index 78f850482..729b337c5 100644 --- a/src/Psalm/Internal/LanguageServer/LanguageServer.php +++ b/src/Psalm/Internal/LanguageServer/LanguageServer.php @@ -827,7 +827,7 @@ class LanguageServer extends Dispatcher $issue_baseline[$file][$type]['o']--; } } else { - /** @psalm-suppress MixedArrayAssignment, MixedAssignment */ + /** @psalm-suppress MixedArrayAssignment */ $issue_baseline[$file][$type]['s'] = []; $issue_data->severity = Config::REPORT_INFO; /** @psalm-suppress MixedArrayAssignment, MixedOperand, MixedAssignment */ diff --git a/src/Psalm/Internal/Provider/FileProvider.php b/src/Psalm/Internal/Provider/FileProvider.php index 22438cdff..c18960de1 100644 --- a/src/Psalm/Internal/Provider/FileProvider.php +++ b/src/Psalm/Internal/Provider/FileProvider.php @@ -44,25 +44,20 @@ class FileProvider return $this->temp_files[$file_path]['content']; } - /** @psalm-suppress ImpureStaticProperty Used only for caching */ if (isset(self::$open_files[$file_path])) { return self::$open_files[$file_path]; } - /** @psalm-suppress ImpureFunctionCall For our purposes, this should not mutate external state */ if (!file_exists($file_path)) { throw new UnexpectedValueException('File ' . $file_path . ' should exist to get contents'); } - /** @psalm-suppress ImpureFunctionCall For our purposes, this should not mutate external state */ if (is_dir($file_path)) { throw new UnexpectedValueException('File ' . $file_path . ' is a directory'); } - /** @psalm-suppress ImpureFunctionCall For our purposes, this should not mutate external state */ $file_contents = (string) file_get_contents($file_path); - /** @psalm-suppress ImpureStaticProperty Used only for caching */ self::$open_files[$file_path] = $file_contents; return $file_contents;