Merge "Localisation updates from https://translatewiki.net."
[lhc/web/wiklou.git] / includes / parser / DateFormatter.php
index 3be4353..fb79442 100644 (file)
@@ -135,7 +135,7 @@ class DateFormatter {
        public static function getInstance( Language $lang = null ) {
                global $wgMainCacheType;
 
-               $lang = $lang ?: MediaWikiServices::getInstance()->getContentLanguage();
+               $lang = $lang ?? MediaWikiServices::getInstance()->getContentLanguage();
                $cache = ObjectCache::getLocalServerInstance( $wgMainCacheType );
 
                static $dateFormatter = false;
@@ -213,10 +213,7 @@ class DateFormatter {
         */
        private function replace( $matches ) {
                # Extract information from $matches
-               $linked = true;
-               if ( isset( $this->mLinked ) ) {
-                       $linked = $this->mLinked;
-               }
+               $linked = $this->mLinked ?? true;
 
                $bits = [];
                $key = $this->keys[$this->mSource];