From 76376fdbc3dc0b3261de377dffc350677345e7ba Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 20 Jun 2023 08:19:51 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `wp-includes/pomo/translations.php`. Follow-up to [10584], [12079]. Props aristath, poena, afercia, SergeyBiryukov. See #57839. git-svn-id: https://develop.svn.wordpress.org/trunk@55948 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/pomo/translations.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/pomo/translations.php b/src/wp-includes/pomo/translations.php index 8ebcbaa8d2..d3a1d3cbd0 100644 --- a/src/wp-includes/pomo/translations.php +++ b/src/wp-includes/pomo/translations.php @@ -120,7 +120,7 @@ if ( ! class_exists( 'Translations', false ) ) : * @param int $count number of items */ public function select_plural_form( $count ) { - return 1 == $count ? 0 : 1; + return 1 === (int) $count ? 0 : 1; } /** @@ -152,7 +152,7 @@ if ( ! class_exists( 'Translations', false ) ) : isset( $translated->translations[ $index ] ) ) { return $translated->translations[ $index ]; } else { - return 1 == $count ? $singular : $plural; + return 1 === (int) $count ? $singular : $plural; } } @@ -366,7 +366,7 @@ if ( ! class_exists( 'NOOP_Translations', false ) ) : * @return bool */ public function select_plural_form( $count ) { - return 1 == $count ? 0 : 1; + return 1 === (int) $count ? 0 : 1; } /** @@ -383,7 +383,7 @@ if ( ! class_exists( 'NOOP_Translations', false ) ) : * @param string $context */ public function translate_plural( $singular, $plural, $count, $context = null ) { - return 1 == $count ? $singular : $plural; + return 1 === (int) $count ? $singular : $plural; } /**