[BUGFIX] Minor fixes in SiteLanguage 10/56610/2
authorSimon Gilli <typo3@gilbertsoft.org>
Sun, 8 Apr 2018 22:35:04 +0000 (00:35 +0200)
committerSusanne Moog <susanne.moog@typo3.org>
Mon, 9 Apr 2018 19:32:56 +0000 (21:32 +0200)
This patch fixes some minor issues in getter methods.

Resolves: #84670
Releases: master
Change-Id: I4123238ca17bc3c3463090117b975997ea092a7e
Reviewed-on: https://review.typo3.org/56610
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/core/Classes/Site/Entity/SiteLanguage.php

index 126155a..f409289 100644 (file)
@@ -223,7 +223,7 @@ class SiteLanguage
      */
     public function getNavigationTitle(): string
     {
-        return $this->navigationTitle ?? $this->getTitle();
+        return $this->navigationTitle ?: $this->getTitle();
     }
 
     /**
@@ -243,21 +243,13 @@ class SiteLanguage
     }
 
     /**
-     * @return string
-     */
-    public function getFallbackType(): string
-    {
-        return $this->fallbackType;
-    }
-
-    /**
      * Returns the ISO-639-1 language ISO code
      *
      * @return string
      */
     public function getTwoLetterIsoCode(): string
     {
-        return $this->twoLetterIsoCode ?? '';
+        return $this->twoLetterIsoCode;
     }
 
     /**
@@ -267,7 +259,7 @@ class SiteLanguage
      */
     public function getHreflang(): string
     {
-        return $this->hreflang ?? '';
+        return $this->hreflang;
     }
 
     /**
@@ -277,7 +269,15 @@ class SiteLanguage
      */
     public function getDirection(): string
     {
-        return $this->direction ?? '';
+        return $this->direction;
+    }
+
+    /**
+     * @return string
+     */
+    public function getFallbackType(): string
+    {
+        return $this->fallbackType;
     }
 
     /**