[TOOLS] Continue raising PHPStan level to 6
This commit is contained in:
@@ -134,6 +134,9 @@ class Language extends Entity
|
||||
return self::getById($note->getLanguageId());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function getLanguageChoices(): array
|
||||
{
|
||||
$langs = Cache::getHashMap(
|
||||
@@ -144,6 +147,8 @@ class Language extends Entity
|
||||
return array_merge(...F\map(array_values($langs), fn ($l) => $l->toChoiceFormat()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string> */
|
||||
public function toChoiceFormat(): array
|
||||
{
|
||||
return [_m($this->getLongDisplay()) => $this->getLocale()];
|
||||
@@ -152,6 +157,8 @@ class Language extends Entity
|
||||
/**
|
||||
* Get all the available languages as well as the languages $actor
|
||||
* prefers and are appropriate for posting in/to $context_actor
|
||||
*
|
||||
* @return array{array<string, string>, array<string, string>}
|
||||
*/
|
||||
public static function getSortedLanguageChoices(?Actor $actor, ?Actor $context_actor, ?bool $use_short_display): array
|
||||
{
|
||||
|
Reference in New Issue
Block a user