diff options
| author | 2023-04-05 16:19:14 +0200 | |
|---|---|---|
| committer | 2023-04-05 16:19:14 +0200 | |
| commit | 3f1695db039101d44d611f0d1781d1ba034034dd (patch) | |
| tree | b64a462eaff96e8b3528b1dc17f400b12692da73 /cli/check.translation.php | |
| parent | 36aa0122e15b6c5a4bf923467b63a577cac5a539 (diff) | |
PHPStan 6 for CLI (#5258)
* PHPStan 6 for CLI
Except `./cli/i18n/`
* Bool
* One type forgotten
Diffstat (limited to 'cli/check.translation.php')
| -rwxr-xr-x | cli/check.translation.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cli/check.translation.php b/cli/check.translation.php index ae0abd78e..59f59f94b 100755 --- a/cli/check.translation.php +++ b/cli/check.translation.php @@ -12,7 +12,7 @@ $i18nData = new I18nData($i18nFile->load()); $options = getopt("dhl:r"); if (array_key_exists('h', $options)) { - help(); + checkHelp(); } if (array_key_exists('l', $options)) { $languages = array($options['l']); @@ -63,9 +63,9 @@ if (!$isValidated) { * Iterates through all php and phtml files in the whole project and extracts all * translation keys used. * - * @return array + * @return array<string> */ -function findUsedTranslations() { +function findUsedTranslations(): array { $directory = new RecursiveDirectoryIterator(__DIR__ . '/..'); $iterator = new RecursiveIteratorIterator($directory); $regex = new RegexIterator($iterator, '/^.+\.(php|phtml)$/i', RecursiveRegexIterator::GET_MATCH); @@ -80,8 +80,9 @@ function findUsedTranslations() { /** * Output help message. + * @return never */ -function help() { +function checkHelp() { $file = str_replace(__DIR__ . '/', '', __FILE__); echo <<<HELP |
