Skip to content

Commit 0c572ae

Browse files
Cyperghostdtdesign
andauthored
Apply suggestions from code review
Co-authored-by: Alexander Ebert <ebert@woltlab.com>
1 parent b7d0b6e commit 0c572ae

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

wcfsetup/install/files/lib/system/cache/eager/data/LanguageCacheData.class.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@ public function getLanguageCategoryByID(int $languageCategoryID): ?LanguageCateg
6868
return $this->getLanguageCategory($categoryName);
6969
}
7070

71-
/**
72-
* Returns `true` if the language category with the given category name exists.
73-
*/
7471
public function languageCategoryExists(string $categoryName): bool
7572
{
7673
return \array_key_exists($categoryName, $this->categories);
@@ -79,7 +76,7 @@ public function languageCategoryExists(string $categoryName): bool
7976
/**
8077
* Return all content languages.
8178
*
82-
* @return list<Language>
79+
* @return array<int, Language>
8380
*/
8481
public function getContentLanguages(): array
8582
{
@@ -96,10 +93,7 @@ public function getContentLanguages(): array
9693
*/
9794
public function getContentLanguageIDs(): array
9895
{
99-
return \array_map(
100-
static fn(Language $language) => $language->languageID,
101-
$this->getContentLanguages()
102-
);
96+
return \array_keys($this->getContentLanguages());
10397
}
10498

10599
/**

0 commit comments

Comments
 (0)