summaryrefslogtreecommitdiffstats
path: root/lib/private/L10N
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-26 09:30:18 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-26 16:34:56 +0100
commitb80ebc96748b45fd2e0ba9323308657c4b00b7ec (patch)
treeec20e0ffa2f86b9b54939a83a785407319f94559 /lib/private/L10N
parent62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff)
downloadnextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.tar.gz
nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.zip
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/L10N')
-rw-r--r--lib/private/L10N/Factory.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php
index bba55385882..8cb4bfaccad 100644
--- a/lib/private/L10N/Factory.php
+++ b/lib/private/L10N/Factory.php
@@ -118,7 +118,7 @@ class Factory implements IFactory {
$app = \OC_App::cleanAppId($app);
if ($lang !== null) {
- $lang = str_replace(array('\0', '/', '\\', '..'), '', (string)$lang);
+ $lang = str_replace(['\0', '/', '\\', '..'], '', (string)$lang);
}
$forceLang = $this->config->getSystemValue('force_language', false);
@@ -532,8 +532,8 @@ class Factory implements IFactory {
$plural = preg_replace( '#[^n0-9:\(\)\?\|\&=!<>+*/\%-]#', '', $matches[2] );
$body = str_replace(
- array( 'plural', 'n', '$n$plurals', ),
- array( '$plural', '$n', '$nplurals', ),
+ [ 'plural', 'n', '$n$plurals', ],
+ [ '$plural', '$n', '$nplurals', ],
'nplurals='. $nplurals . '; plural=' . $plural
);
@@ -599,20 +599,20 @@ class Factory implements IFactory {
// TRANSLATORS this is the language name for the language switcher in the personal settings and should be the localized version
$potentialName = (string) $l->t('__language_name__');
if ($l->getLanguageCode() === $lang && $potentialName[0] !== '_') {//first check if the language name is in the translation file
- $ln = array(
+ $ln = [
'code' => $lang,
'name' => $potentialName
- );
+ ];
} else if ($lang === 'en') {
- $ln = array(
+ $ln = [
'code' => $lang,
'name' => 'English (US)'
- );
+ ];
} else {//fallback to language code
- $ln = array(
+ $ln = [
'code' => $lang,
'name' => $lang
- );
+ ];
}
// put appropriate languages into appropriate arrays, to print them sorted