@@ -11,6 +11,7 @@ class L10nHelper
1111 * Get the available locale codes from the configuration.
1212 *
1313 * @return string[]
14+ *
1415 * @throws InvalidConfigurationException
1516 */
1617 public static function getAvailableLocales (): array
@@ -38,6 +39,7 @@ public static function getAvailableLocales(): array
3839 * Returns an array of locale codes (as keys) and their corresponding names (as values).
3940 *
4041 * @return string[]
42+ *
4143 * @throws InvalidConfigurationException
4244 */
4345 public static function getLocaleOptions (): array
@@ -50,8 +52,8 @@ public static function getLocaleOptions(): array
5052 * 1. If the `intl` PHP extension is installed, use the `\Locale` class to get the language name.
5153 * 2. Otherwise, return the language code
5254 *
53- * @param string $code Language code
54- * @param bool $include_code Include the language code in the output (in parentheses)
55+ * @param string $code Language code
56+ * @param bool $include_code Include the language code in the output (in parentheses)
5557 * @return string Language name
5658 */
5759 public static function getLanguageName (string $ code , bool $ include_code = false ): string
@@ -65,7 +67,7 @@ public static function getLanguageName(string $code, bool $include_code = false)
6567 $ name = Locale::getDisplayLanguage ($ code , config ('app.locale ' ));
6668
6769 if (is_string ($ name ) && ! empty ($ name )) {
68- return $ name . ($ include_code ? ' ( ' . $ code . ') ' : '' );
70+ return $ name. ($ include_code ? ' ( ' . $ code. ') ' : '' );
6971 }
7072
7173 return $ code ;
0 commit comments