Merge "Use OOUI form for edit watchlist"
[lhc/web/wiklou.git] / includes / parser / DateFormatter.php
index 605a873..2aefc03 100644 (file)
@@ -126,14 +126,14 @@ class DateFormatter {
        /**
         * Get a DateFormatter object
         *
-        * @param Language|string|null $lang In which language to format the date
+        * @param Language|null $lang In which language to format the date
         *     Defaults to the site content language
         * @return DateFormatter
         */
-       public static function getInstance( $lang = null ) {
+       public static function getInstance( Language $lang = null ) {
                global $wgContLang, $wgMainCacheType;
 
-               $lang = $lang ? wfGetLangObj( $lang ) : $wgContLang;
+               $lang = $lang ?: $wgContLang;
                $cache = ObjectCache::getLocalServerInstance( $wgMainCacheType );
 
                static $dateFormatter = false;