diff options
| author | 2023-05-04 19:47:54 +0200 | |
|---|---|---|
| committer | 2023-05-04 19:47:54 +0200 | |
| commit | 30c69ef147059f440d304e7da5e0236d95e424fd (patch) | |
| tree | 3aeec77db07a4fe23a3721e85dbe5175f98bc2b9 /lib/lib_install.php | |
| parent | 675c56f5799ed92a6aa3a8ad3d3d8d6636f444ec (diff) | |
Use PHPStan dynamicConstantNames (#5370)
https://phpstan.org/config-reference#constants
Avoid a few phpstan-ignore-next-line
Diffstat (limited to 'lib/lib_install.php')
| -rw-r--r-- | lib/lib_install.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/lib_install.php b/lib/lib_install.php index 23c902440..780115b63 100644 --- a/lib/lib_install.php +++ b/lib/lib_install.php @@ -41,14 +41,14 @@ function checkRequirements(string $dbType = ''): array { $json = function_exists('json_encode'); $mbstring = extension_loaded('mbstring'); // @phpstan-ignore-next-line - $data = DATA_PATH && touch(DATA_PATH . '/index.html'); // is_writable() is not reliable for a folder on NFS + $data = DATA_PATH != '' && touch(DATA_PATH . '/index.html'); // is_writable() is not reliable for a folder on NFS // @phpstan-ignore-next-line - $cache = CACHE_PATH && touch(CACHE_PATH . '/index.html'); + $cache = CACHE_PATH != '' && touch(CACHE_PATH . '/index.html'); + $tmp = TMP_PATH != '' && is_writable(TMP_PATH); // @phpstan-ignore-next-line - $tmp = TMP_PATH && is_writable(TMP_PATH); + $users = USERS_PATH != '' && touch(USERS_PATH . '/index.html'); // @phpstan-ignore-next-line - $users = USERS_PATH && touch(USERS_PATH . '/index.html'); - $favicons = touch(DATA_PATH . '/favicons/index.html'); + $favicons = DATA_PATH != '' && touch(DATA_PATH . '/favicons/index.html'); return array( 'php' => $php ? 'ok' : 'ko', |
