diff options
| author | 2023-04-23 11:58:15 +0200 | |
|---|---|---|
| committer | 2023-04-23 11:58:15 +0200 | |
| commit | 115724622fa32e1b7981e378e87ccfb770450cb1 (patch) | |
| tree | 4d7072768076fd76f2f1877757f3e2e395ab2ded /cli | |
| parent | 8abe53d879ef188a5c1cc394894ce211fcfa9f92 (diff) | |
PHPStan Level 7 for ten more files (#5327)
* PHPStan Level 7 for nine more files
* Minor syntax
* One more
Diffstat (limited to 'cli')
| -rwxr-xr-x | cli/do-install.php | 5 | ||||
| -rw-r--r-- | cli/i18n/I18nFile.php | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/cli/do-install.php b/cli/do-install.php index 1b167dfa9..0654c36cf 100755 --- a/cli/do-install.php +++ b/cli/do-install.php @@ -31,7 +31,7 @@ $dBparams = array( $options = getopt('', array_merge($params, $dBparams)); -if (!validateOptions($argv, array_merge($params, $dBparams)) || empty($options['default_user'])) { +if (!validateOptions($argv, array_merge($params, $dBparams)) || empty($options['default_user']) || !is_string($options['default_user'])) { fail('Usage: ' . basename(__FILE__) . " --default_user admin ( --auth_type form" . " --environment production --base_url https://rss.example.net --allow_robots" . " --language en --title FreshRSS --allow_anonymous --allow_anonymous_refresh --api_enabled" . @@ -81,8 +81,7 @@ if (!FreshRSS_user_Controller::checkUsername($options['default_user'])) { } if (isset($options['auth_type']) && !in_array($options['auth_type'], array('form', 'http_auth', 'none'))) { - fail('FreshRSS invalid authentication method (auth_type must be one of { form, http_auth, none }): ' - . $options['auth_type']); + fail('FreshRSS invalid authentication method (auth_type must be one of { form, http_auth, none })'); } if (file_put_contents(join_path(DATA_PATH, 'config.php'), diff --git a/cli/i18n/I18nFile.php b/cli/i18n/I18nFile.php index 1c8987c64..5a0c74aaa 100644 --- a/cli/i18n/I18nFile.php +++ b/cli/i18n/I18nFile.php @@ -4,7 +4,7 @@ require_once __DIR__ . '/I18nValue.php'; class I18nFile { /** - * @return array<string,array<string,string|array<string,I18nValue>>> + * @return array<string,array<string,array<string,I18nValue>>> */ public function load(): array { $i18n = array(); |
