From 115724622fa32e1b7981e378e87ccfb770450cb1 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 23 Apr 2023 11:58:15 +0200 Subject: PHPStan Level 7 for ten more files (#5327) * PHPStan Level 7 for nine more files * Minor syntax * One more --- cli/do-install.php | 5 ++--- cli/i18n/I18nFile.php | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'cli') 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>> + * @return array>> */ public function load(): array { $i18n = array(); -- cgit v1.2.3