Fix incomplete Language::getDatePreferences() documentation
authorThiemo Mättig <thiemo.maettig@wikimedia.de>
Wed, 24 May 2017 09:32:41 +0000 (11:32 +0200)
committerThiemo Mättig <thiemo.maettig@wikimedia.de>
Wed, 24 May 2017 09:32:41 +0000 (11:32 +0200)
Look at languages/messages/MessagesEo.php for one of about a dozen real
world examples where this is set to false. All code calling
getDatePreferences checks if it got a truthy value first before using
it.

Change-Id: I4ef5c8be618d41039297325c9dd4cf554ea14559

languages/Language.php

index 14e6f5c..fb45cf7 100644 (file)
@@ -725,7 +725,7 @@ class Language {
        }
 
        /**
-        * @return array
+        * @return string[]|bool List of date format preference keys, or false if disabled.
         */
        public function getDatePreferences() {
                return self::$dataCache->getItem( $this->mCode, 'datePreferences' );