1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-12 17:27:28 +01:00

fixes for CI

This commit is contained in:
Andrew Nagy 2022-07-21 21:44:14 +00:00
parent 5f50a9e212
commit 87184d7c9c
3 changed files with 6 additions and 8 deletions

View File

@ -65,8 +65,6 @@ use function array_keys;
use function array_merge;
use function array_search;
use function array_values;
use function assert;
use function class_exists;
use function count;
use function end;
use function in_array;

View File

@ -31,7 +31,7 @@ class FileProvider
protected static $open_files = [];
/**
* @var array<lowercase-string, string>
* @var array<string, string>
*/
protected $open_files_paths = [];
@ -78,8 +78,8 @@ class FileProvider
public function setOpenContents(string $file_path, ?string $file_contents = null): void
{
if (isset($this->open_files[$file_path])) {
$this->open_files[$file_path] = $file_contents ?? $this->getContents($file_path, true);
if (isset(self::$open_files[$file_path])) {
self::$open_files[$file_path] = $file_contents ?? $this->getContents($file_path, true);
}
}
@ -119,7 +119,7 @@ class FileProvider
public function openFile(string $file_path): void
{
$this->open_files[$file_path] = $this->getContents($file_path, true);
self::$open_files[$file_path] = $this->getContents($file_path, true);
$this->open_files_paths[$file_path] = $file_path;
}
@ -132,7 +132,7 @@ class FileProvider
{
unset(
$this->temp_files[$file_path],
$this->open_files[$file_path],
self::$open_files[$file_path],
$this->open_files_paths[$file_path]
);
}

View File

@ -1328,7 +1328,7 @@ class Union implements TypeNode
/**
* @psalm-assert-if-true array<
* array-key,
* TLiteralString|TLiteralInt|TLiteralFloat|TNonspecificLiteralString|TNonSpecificLiteralInt|TFalse|TTrue
* TLiteralString|TLiteralInt|TLiteralFloat|TNonspecificLiteralString|TNonspecificLiteralInt|TFalse|TTrue
* > $this->getAtomicTypes()
*/
public function allLiterals(): bool