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:
parent
683fe2f4c6
commit
ee34d15b4d
@ -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;
|
||||||
|
@ -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');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user