1
0
Fork 0

Use getenv()

pull/260/head
Felix Becker 2017-02-01 15:41:41 +01:00
parent 92829e014c
commit 9e266d0471
1 changed files with 4 additions and 4 deletions

View File

@ -19,11 +19,11 @@ class FileSystemCache implements Cache
public function __construct()
{
if (PHP_OS === 'WINNT') {
$this->cacheDir = $_ENV['LOCALAPPDATA'] . '\\PHP Language Server\\';
} else if (!empty($_ENV['XDG_CACHE_HOME'])) {
$this->cacheDir = $_ENV['XDG_CACHE_HOME'] . '/phpls/';
$this->cacheDir = getenv('LOCALAPPDATA') . '\\PHP Language Server\\';
} else if (getenv('XDG_CACHE_HOME')) {
$this->cacheDir = getenv('XDG_CACHE_HOME') . '/phpls/';
} else {
$this->cacheDir = $_ENV['HOME'] . '/.phpls/';
$this->cacheDir = getenv('HOME') . '/.phpls/';
}
}