mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Coding Standards: Use strict comparison in wp-includes/pomo/translations.php
.
Follow-up to [10584], [12079]. Props aristath, poena, afercia, SergeyBiryukov. See #57839. Built from https://develop.svn.wordpress.org/trunk@55948 git-svn-id: http://core.svn.wordpress.org/trunk@55460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7b4df6bfd6
commit
5f5719bca8
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.3-alpha-55947';
|
||||
$wp_version = '6.3-alpha-55948';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user