summaryrefslogtreecommitdiff
path: root/languages/classes/LanguageKaa.php
diff options
context:
space:
mode:
Diffstat (limited to 'languages/classes/LanguageKaa.php')
-rw-r--r--languages/classes/LanguageKaa.php35
1 files changed, 24 insertions, 11 deletions
diff --git a/languages/classes/LanguageKaa.php b/languages/classes/LanguageKaa.php
index 4c6710ed..a40fb7ae 100644
--- a/languages/classes/LanguageKaa.php
+++ b/languages/classes/LanguageKaa.php
@@ -10,6 +10,11 @@ class LanguageKaa extends Language {
# Invoked with {{GRAMMAR:case|word}}
/**
* Cases: genitive, dative, accusative, locative, ablative, comitative + possessive forms
+ *
+ * @param $word string
+ * @param $case string
+ *
+ * @return string
*/
function convertGrammar( $word, $case ) {
global $wgGrammarForms;
@@ -19,35 +24,43 @@ class LanguageKaa extends Language {
/* Full code of function convertGrammar() is in development. Updates coming soon. */
return $word;
}
- /*
+
+ /**
* It fixes issue with ucfirst for transforming 'i' to 'İ'
*
+ * @param $string string
+ *
+ * @return string
*/
function ucfirst ( $string ) {
- if ( $string[0] == 'i' ) {
- $string = 'İ' . substr( $string, 1 );
+ if ( substr( $string, 0, 1 ) === 'i' ) {
+ return 'İ' . substr( $string, 1 );
} else {
- $string = parent::ucfirst( $string );
+ return parent::ucfirst( $string );
}
- return $string;
-
}
- /*
+ /**
* It fixes issue with lcfirst for transforming 'I' to 'ı'
*
+ * @param $string string
+ *
+ * @return string
*/
function lcfirst ( $string ) {
- if ( $string[0] == 'I' ) {
- $string = 'ı' . substr( $string, 1 );
+ if ( substr( $string, 0, 1 ) === 'I' ) {
+ return 'ı' . substr( $string, 1 );
} else {
- $string = parent::lcfirst( $string );
+ return parent::lcfirst( $string );
}
- return $string;
}
/**
* Avoid grouping whole numbers between 0 to 9999
+ *
+ * @param $_ string
+ *
+ * @return string
*/
function commafy( $_ ) {
if ( !preg_match( '/^\d{1,4}$/', $_ ) ) {