diff options
Diffstat (limited to 'lib/public/L10N')
-rw-r--r-- | lib/public/L10N/IFactory.php | 9 | ||||
-rw-r--r-- | lib/public/L10N/ILanguageIterator.php | 10 |
2 files changed, 13 insertions, 6 deletions
diff --git a/lib/public/L10N/IFactory.php b/lib/public/L10N/IFactory.php index 5c2f4dcbfa4..aebd318dfad 100644 --- a/lib/public/L10N/IFactory.php +++ b/lib/public/L10N/IFactory.php @@ -104,6 +104,15 @@ interface IFactory { public function localeExists($locale); /** + * Return the language direction + * + * @param string $language + * @return 'ltr'|'rtl' + * @since 31.0.0 + */ + public function getLanguageDirection(string $language): string; + + /** * iterate through language settings (if provided) in this order: * 1. returns the forced language or: * 2. if applicable, the trunk of 1 (e.g. "fu" instead of "fu_BAR" diff --git a/lib/public/L10N/ILanguageIterator.php b/lib/public/L10N/ILanguageIterator.php index cba0feefdcf..27f850d4235 100644 --- a/lib/public/L10N/ILanguageIterator.php +++ b/lib/public/L10N/ILanguageIterator.php @@ -21,7 +21,7 @@ namespace OCP\L10N; * if settings are not present or truncating is not applicable, the iterator * skips to the next valid item itself * - * + * @template-extends \Iterator<int, string> * @since 14.0.0 */ interface ILanguageIterator extends \Iterator { @@ -36,22 +36,20 @@ interface ILanguageIterator extends \Iterator { * Move forward to next element * * @since 14.0.0 - * @return void */ - #[\ReturnTypeWillChange] - public function next(); + public function next(): void; /** * Return the key of the current element * * @since 14.0.0 */ - public function key():int; + public function key(): int; /** * Checks if current position is valid * * @since 14.0.0 */ - public function valid():bool; + public function valid(): bool; } |