X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=languages%2FLanguage.php;h=a7ac0dbc82854847331f9f65fe50318d69b61313;hb=f45d3a797a8f2c9f9e31a590f6493942246678d5;hp=d7cd8b53e923cf77ec2f298ab49426fac8d334f0;hpb=5417327be0829de7a2e258eaadc2422dec24e318;p=lhc%2Fweb%2Fwiklou.git diff --git a/languages/Language.php b/languages/Language.php index d7cd8b53e9..a7ac0dbc82 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -507,7 +507,7 @@ class Language { * Returns an array of localised namespaces indexed by their numbers. If the namespace is not * available in localised form, it will be included in English. * - * @return array + * @return string[] List of localized namespace names, indexed by numeric namespace ID. */ public function getNamespaces() { if ( is_null( $this->namespaceNames ) ) { @@ -1421,7 +1421,7 @@ class Language { case 'g': $usedHour = true; $h = substr( $ts, 8, 2 ); - $num = $h % 12 ? $h % 12 : 12; + $num = $h % 12 ?: 12; break; case 'G': $usedHour = true; @@ -1430,7 +1430,7 @@ class Language { case 'h': $usedHour = true; $h = substr( $ts, 8, 2 ); - $num = sprintf( '%02d', $h % 12 ? $h % 12 : 12 ); + $num = sprintf( '%02d', $h % 12 ?: 12 ); break; case 'H': $usedHour = true; @@ -2189,7 +2189,7 @@ class Language { } # No difference ? Return time unchanged - if ( 0 == $minDiff ) { + if ( $minDiff == 0 ) { return $ts; } @@ -4642,7 +4642,7 @@ class Language { /** * @param string $talk - * @return mixed + * @return string */ function fixVariableInNamespace( $talk ) { if ( strpos( $talk, '$1' ) === false ) {