From 3f1695db039101d44d611f0d1781d1ba034034dd Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 5 Apr 2023 16:19:14 +0200 Subject: PHPStan 6 for CLI (#5258) * PHPStan 6 for CLI Except `./cli/i18n/` * Bool * One type forgotten --- cli/_update-or-create-user.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/_update-or-create-user.php') diff --git a/cli/_update-or-create-user.php b/cli/_update-or-create-user.php index e51c68e10..0f6c39517 100644 --- a/cli/_update-or-create-user.php +++ b/cli/_update-or-create-user.php @@ -34,12 +34,12 @@ if (!validateOptions($argv, $params) || empty($options['user'])) { " --since_hours_posts_per_rss 168 --max_posts_per_rss 400 )"); } -function strParam($name) { +function strParam(string $name): ?string { global $options; return isset($options[$name]) ? strval($options[$name]) : null; } -function intParam($name) { +function intParam(string $name): ?int { global $options; return isset($options[$name]) && ctype_digit($options[$name]) ? intval($options[$name]) : null; } -- cgit v1.2.3