mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Fix possibly null property
This commit is contained in:
parent
934fb53d65
commit
c297b91d6f
@ -87,7 +87,7 @@ class Config
|
||||
/**
|
||||
* The directory to store all Psalm project caches
|
||||
*
|
||||
* @var string
|
||||
* @var string|null
|
||||
*/
|
||||
public $global_cache_directory;
|
||||
|
||||
@ -1303,7 +1303,7 @@ class Config
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @return ?string
|
||||
*/
|
||||
public function getGlobalCacheDirectory()
|
||||
{
|
||||
|
@ -474,8 +474,11 @@ if (isset($options['clear-cache'])) {
|
||||
if (isset($options['clear-global-cache'])) {
|
||||
$cache_directory = $config->getGlobalCacheDirectory();
|
||||
|
||||
Config::removeCacheDirectory($cache_directory);
|
||||
echo 'Global cache directory deleted' . PHP_EOL;
|
||||
if ($cache_directory) {
|
||||
Config::removeCacheDirectory($cache_directory);
|
||||
echo 'Global cache directory deleted' . PHP_EOL;
|
||||
}
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user