From 30c69ef147059f440d304e7da5e0236d95e424fd Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 4 May 2023 19:47:54 +0200 Subject: Use PHPStan dynamicConstantNames (#5370) https://phpstan.org/config-reference#constants Avoid a few phpstan-ignore-next-line --- lib/lib_install.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/lib_install.php') 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', -- cgit v1.2.3