diff --git a/includes/language/Language.php b/includes/language/Language.php index 3212e539d4e..9a1b184f0cf 100644 --- a/includes/language/Language.php +++ b/includes/language/Language.php @@ -1860,7 +1860,7 @@ class Language implements Bcp47Code { $gm = (int)substr( $ts, 4, 2 ); $gd = (int)substr( $ts, 6, 2 ); - if ( !strcmp( $cName, 'thai' ) ) { + if ( $cName === 'thai' ) { # Thai solar dates # Add 543 years to the Gregorian calendar # Months and days are identical @@ -1873,12 +1873,12 @@ class Language implements Bcp47Code { } $gm = ( $gm - 3 ) % 12; } - } elseif ( ( !strcmp( $cName, 'minguo' ) ) || !strcmp( $cName, 'juche' ) ) { + } elseif ( $cName === 'minguo' || $cName === 'juche' ) { # Minguo dates # Deduct 1911 years from the Gregorian calendar # Months and days are identical $gy_offset = $gy - 1911; - } elseif ( !strcmp( $cName, 'tenno' ) ) { + } elseif ( $cName === 'tenno' ) { # Nengō dates up to Meiji period # Deduct years from the Gregorian calendar # depending on the nengo periods @@ -4025,7 +4025,7 @@ class Language implements Bcp47Code { public function translateBlockExpiry( $str, UserIdentity $user = null, $now = 0 ) { $duration = SpecialBlock::getSuggestedDurations( $this ); foreach ( $duration as $show => $value ) { - if ( strcmp( $str, $value ) == 0 ) { + if ( $str === $value ) { return trim( $show ); } } diff --git a/includes/languages/LanguageKk_cyrl.php b/includes/languages/LanguageKk_cyrl.php index 5b441faa42a..d51cd294fda 100644 --- a/includes/languages/LanguageKk_cyrl.php +++ b/includes/languages/LanguageKk_cyrl.php @@ -755,7 +755,7 @@ class LanguageKk_cyrl extends Language { $lastLetter[1] = null; foreach ( $wordReversed as $xvalue ) { foreach ( $allVowels as $yvalue ) { - if ( strcmp( $xvalue, $yvalue ) == 0 ) { + if ( $xvalue === $yvalue ) { $lastLetter[1] = $xvalue; break; } diff --git a/includes/languages/LanguageTyv.php b/includes/languages/LanguageTyv.php index 4d11f23dcfb..300fdcac314 100644 --- a/includes/languages/LanguageTyv.php +++ b/includes/languages/LanguageTyv.php @@ -70,7 +70,7 @@ class LanguageTyv extends Language { $wordLastVowel = null; foreach ( $wordReversed as $xvalue ) { foreach ( $allVowels as $yvalue ) { - if ( strcmp( $xvalue, $yvalue ) == 0 ) { + if ( $xvalue === $yvalue ) { $wordLastVowel = $xvalue; break; }