1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +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; namespace Psalm\Internal\Cli;
use PackageVersions\Versions;
use Psalm\Internal\CliUtils; use Psalm\Internal\CliUtils;
use Psalm\Internal\PluginManager\Command\DisableCommand; use Psalm\Internal\PluginManager\Command\DisableCommand;
use Psalm\Internal\PluginManager\Command\EnableCommand; use Psalm\Internal\PluginManager\Command\EnableCommand;

View File

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