Merge "Hygiene: Use strtr() instead of str_replace() for character swapping"
[lhc/web/wiklou.git] / languages / Language.php
index fe0bd7e..93dd239 100644 (file)
@@ -547,10 +547,8 @@ class Language {
        }
 
        /**
-        * A convenience function that returns the same thing as
-        * getNamespaces() except with the array values changed to ' '
-        * where it found '_', useful for producing output to be displayed
-        * e.g. in <select> forms.
+        * A convenience function that returns getNamespaces() with spaces instead of underscores
+        * in values. Useful for producing output to be displayed e.g. in `<select>` forms.
         *
         * @return array
         */
@@ -564,6 +562,7 @@ class Language {
 
        /**
         * Get a namespace value by key
+        *
         * <code>
         * $mw_ns = $wgContLang->getNsText( NS_MEDIAWIKI );
         * echo $mw_ns; // prints 'MediaWiki'
@@ -574,7 +573,6 @@ class Language {
         */
        function getNsText( $index ) {
                $ns = $this->getNamespaces();
-
                return isset( $ns[$index] ) ? $ns[$index] : false;
        }
 
@@ -593,7 +591,6 @@ class Language {
         */
        function getFormattedNsText( $index ) {
                $ns = $this->getNsText( $index );
-
                return strtr( $ns, '_', ' ' );
        }