]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/language/class_LanguageSystem.php
Continued:
[core.git] / framework / main / classes / language / class_LanguageSystem.php
index 4a1c0fd06c705da1f095e74fd5213492c6a92eff..3080899bd2a0a39598dc7d6acbf08c03f44e7fc5 100644 (file)
@@ -79,7 +79,7 @@ class LanguageSystem extends BaseFrameworkSystem implements ManageableLanguage,
         * @throws      LanguagePathReadProtectedException      If $languageBasePath is
         *                                                                              read-protected
         */
-       public static final function createLanguageSystem ($languageBasePath = '') {
+       public static final function createLanguageSystem (string $languageBasePath = '') {
                // Get a new instance
                $langInstance = new LanguageSystem();
 
@@ -142,7 +142,7 @@ class LanguageSystem extends BaseFrameworkSystem implements ManageableLanguage,
         * @param       $languageBasePath       The relative base path for all language files
         * @return      void
         */
-       protected final function setLanguageBasePath ($languageBasePath) {
+       protected final function setLanguageBasePath (string $languageBasePath) {
                // And set it
                $this->languageBasePath = (string) $languageBasePath;
        }
@@ -153,10 +153,7 @@ class LanguageSystem extends BaseFrameworkSystem implements ManageableLanguage,
         * @param       $langCode       The language code for the current application
         * @return      void
         */
-       protected final function setLanguageCode ($langCode) {
-               // Cast it
-               $langCode = (string) $langCode;
-
+       protected final function setLanguageCode (string $langCode) {
                // And set it (only 2 chars)
                $this->langCode = substr($langCode, 0, 2);
        }
@@ -211,7 +208,7 @@ class LanguageSystem extends BaseFrameworkSystem implements ManageableLanguage,
         * @param       $messageId              The message id we shall find in the cache variable
         * @return      $messageText    The plain message text
         */
-       public function getMessage ($messageId) {
+       public function getMessage (string $messageId) {
                // Default is missing message text
                $messageText = sprintf('!%s!',
                        $messageId