aboutsummaryrefslogtreecommitdiff
path: root/cli/manipulate.translation.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-04-05 16:19:14 +0200
committerGravatar GitHub <noreply@github.com> 2023-04-05 16:19:14 +0200
commit3f1695db039101d44d611f0d1781d1ba034034dd (patch)
treeb64a462eaff96e8b3528b1dc17f400b12692da73 /cli/manipulate.translation.php
parent36aa0122e15b6c5a4bf923467b63a577cac5a539 (diff)
PHPStan 6 for CLI (#5258)
* PHPStan 6 for CLI Except `./cli/i18n/` * Bool * One type forgotten
Diffstat (limited to 'cli/manipulate.translation.php')
-rwxr-xr-xcli/manipulate.translation.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/cli/manipulate.translation.php b/cli/manipulate.translation.php
index 801aa30b6..ed307f302 100755
--- a/cli/manipulate.translation.php
+++ b/cli/manipulate.translation.php
@@ -9,7 +9,7 @@ require_once __DIR__ . '/../constants.php';
$options = getopt("a:hk:l:o:rv:");
if (array_key_exists('h', $options)) {
- help();
+ manipulateHelp();
}
if (!array_key_exists('a', $options)) {
@@ -76,7 +76,7 @@ switch ($options['a']) {
}
break;
default :
- help();
+ manipulateHelp();
exit;
}
@@ -85,19 +85,19 @@ $data->dump($i18nData->getData());
/**
* Output error message.
*/
-function error($message) {
+function error(string $message): void {
$error = <<<ERROR
WARNING
%s\n\n
ERROR;
echo sprintf($error, $message);
- help();
+ manipulateHelp();
}
/**
* Output help message.
*/
-function help() {
+function manipulateHelp(): void {
$file = str_replace(__DIR__ . '/', '', __FILE__);
echo <<<HELP
NAME