1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

SA and CS fixes

This commit is contained in:
Bruce Weirdan 2022-11-26 00:18:45 -04:00
parent 683fe2f4c6
commit ee34d15b4d
No known key found for this signature in database
GPG Key ID: CFC3AAB181751B0D
2 changed files with 9 additions and 4 deletions

View File

@ -2,7 +2,6 @@
namespace Psalm\Internal\Cli;
use PackageVersions\Versions;
use Psalm\Internal\CliUtils;
use Psalm\Internal\PluginManager\Command\DisableCommand;
use Psalm\Internal\PluginManager\Command\EnableCommand;

View File

@ -7,8 +7,9 @@ use PackageVersions\Versions;
use Phar;
use function class_exists;
use function is_array;
use function is_string;
use function dirname;
use function file_put_contents;
use function var_export;
/**
* @internal
@ -22,6 +23,7 @@ final class VersionUtils
/** @var null|_VersionData */
private static $versions = null;
/** @psalm-suppress UnusedConstructor it's here to prevent instantiations */
private function __construct()
{
}
@ -36,6 +38,7 @@ final class VersionUtils
return self::getVersions()[self::PHP_PARSER_PACKAGE];
}
/** @psalm-suppress UnusedMethod called from bin/build-phar.sh */
public static function dump(): void
{
$versions = self::loadComposerVersions();
@ -74,7 +77,10 @@ final class VersionUtils
return null;
}
/** @var _VersionData */
/**
* @psalm-suppress UnresolvableInclude
* @var _VersionData
*/
return require($phar_filename . '/phar-versions.php');
}