devunt has uploaded a new change for review.
https://gerrit.wikimedia.org/r/217278
Change subject: Use Identical operator insteads of Equal operator
......................................................................
Use Identical operator insteads of Equal operator
Change-Id: I9dd11284f2e9407407b60dc8668ba35dbbc71965
---
M Josa.class.php
1 file changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Josa
refs/changes/78/217278/1
diff --git a/Josa.class.php b/Josa.class.php
index c7486c8..d97e977 100644
--- a/Josa.class.php
+++ b/Josa.class.php
@@ -47,9 +47,9 @@
$code = self::convertToJohabCode( mb_substr( $str, -1, 1,
'utf-8' ) );
if ( !$code ) {
$idx = 2; # Not hangul
- } elseif ( ( $code - 0xAC00 ) % 28 == 0 ) {
+ } elseif ( ( $code - 0xAC00 ) % 28 === 0 ) {
$idx = 1; # No trailing consonant
- } elseif ( ( $type === 'Euro/Ro' ) && ( ( $code - 0xAC00 ) % 28
== 8 ) ) {
+ } elseif ( ( $type === 'Euro/Ro' ) && ( ( $code - 0xAC00 ) % 28
=== 8 ) ) {
$idx = 1; # $type is Euro/Ro and trailing consonant is
rieul(ㄹ). This is an exception on Korean postposition rules.
} else {
$idx = 0; # Trailing consonant exists
@@ -70,12 +70,12 @@
if ( $thisValue < 128 ) {
return false;
} else {
- if ( count( $values ) == 0 ) {
+ if ( count( $values ) === 0 ) {
$lookingFor = ( $thisValue < 224 ) ? 2
: 3;
}
$values[] = $thisValue;
- if ( count( $values ) == $lookingFor ) {
- $number = ( $lookingFor == 3 ) ?
+ if ( count( $values ) === $lookingFor ) {
+ $number = ( $lookingFor === 3 ) ?
( ( $values[0] % 16 ) * 4096 )
+ ( ( $values[1] % 64 ) * 64 ) + ( $values[2] % 64 ) :
( ( $values[0] % 32 ) * 64 ) +
( $values[1] % 64 );
return $number;
--
To view, visit https://gerrit.wikimedia.org/r/217278
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9dd11284f2e9407407b60dc8668ba35dbbc71965
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Josa
Gerrit-Branch: master
Gerrit-Owner: devunt <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits