mirror of
https://github.com/danog/psalm.git
synced 2024-12-11 16:59:45 +01:00
fix outstanding issues
This commit is contained in:
parent
7e9638b729
commit
0e4b878cbe
@ -827,7 +827,7 @@ class LanguageServer extends Dispatcher
|
|||||||
$issue_baseline[$file][$type]['o']--;
|
$issue_baseline[$file][$type]['o']--;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/** @psalm-suppress MixedArrayAssignment, MixedAssignment */
|
/** @psalm-suppress MixedArrayAssignment */
|
||||||
$issue_baseline[$file][$type]['s'] = [];
|
$issue_baseline[$file][$type]['s'] = [];
|
||||||
$issue_data->severity = Config::REPORT_INFO;
|
$issue_data->severity = Config::REPORT_INFO;
|
||||||
/** @psalm-suppress MixedArrayAssignment, MixedOperand, MixedAssignment */
|
/** @psalm-suppress MixedArrayAssignment, MixedOperand, MixedAssignment */
|
||||||
|
@ -44,25 +44,20 @@ class FileProvider
|
|||||||
return $this->temp_files[$file_path]['content'];
|
return $this->temp_files[$file_path]['content'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @psalm-suppress ImpureStaticProperty Used only for caching */
|
|
||||||
if (isset(self::$open_files[$file_path])) {
|
if (isset(self::$open_files[$file_path])) {
|
||||||
return 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)) {
|
if (!file_exists($file_path)) {
|
||||||
throw new UnexpectedValueException('File ' . $file_path . ' should exist to get contents');
|
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)) {
|
if (is_dir($file_path)) {
|
||||||
throw new UnexpectedValueException('File ' . $file_path . ' is a directory');
|
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);
|
$file_contents = (string) file_get_contents($file_path);
|
||||||
|
|
||||||
/** @psalm-suppress ImpureStaticProperty Used only for caching */
|
|
||||||
self::$open_files[$file_path] = $file_contents;
|
self::$open_files[$file_path] = $file_contents;
|
||||||
|
|
||||||
return $file_contents;
|
return $file_contents;
|
||||||
|
Loading…
Reference in New Issue
Block a user