From f99c8d5f54c67e0abc3f3189b4f5e3e4571e114c Mon Sep 17 00:00:00 2001 From: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> Date: Wed, 5 Jun 2024 22:04:06 +0200 Subject: Modernize code to php7.4 (#6043) * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Consistency --------- Co-authored-by: Luc Co-authored-by: Alexandre Alapetite --- cli/i18n/I18nData.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'cli/i18n/I18nData.php') diff --git a/cli/i18n/I18nData.php b/cli/i18n/I18nData.php index 3bdff9aea..4142c92d1 100644 --- a/cli/i18n/I18nData.php +++ b/cli/i18n/I18nData.php @@ -93,9 +93,8 @@ class I18nData { * @return array */ private function getNonReferenceLanguages(): array { - return array_filter(array_keys($this->data), static function (string $value) { - return static::REFERENCE_LANGUAGE !== $value; - }); + return array_filter(array_keys($this->data), + static fn(string $value) => static::REFERENCE_LANGUAGE !== $value); } /** @@ -145,9 +144,7 @@ class I18nData { $keys = array_keys($this->data[static::REFERENCE_LANGUAGE][$this->getFilenamePrefix($key)]); $parent = $this->getParentKey($key); - return array_values(array_filter($keys, static function (string $element) use ($parent) { - return false !== strpos($element, $parent); - })); + return array_values(array_filter($keys, static fn(string $element) => false !== strpos($element, $parent))); } /** -- cgit v1.2.3