* @ingroup Language
*/
class LanguageKsh extends Language {
- static $familygender = array(
+ private static $familygender = [
// Do not add male wiki families, since that's the default.
// No need add neuter wikis having names ending in -wiki.
'wikipedia' => 'f',
'wikitravel' => 'n',
'wikia' => 'f',
'translatewiki.net' => 'n',
- );
+ ];
/**
* Convert from the nominative form of a noun to other cases.
*
* Possible values for the type of genitive are:
* Sing, Iehr prepositioned genitive = possessive dative
- * Vun, Fon, -omitted- postpositioned genitive
- * = preposition "vun" with dative
+ * Vun, Fon, -omitted- postpositioned genitive = preposition "vun" with dative
*
* Values of case overrides & prepositions, in the order of preceedence:
* Sing, Iehr possessive dative = prepositioned genitive
- * Vun, Fon preposition "vun" with dative
- * = postpositioned genitive
+ * Vun, Fon preposition "vun" with dative = postpositioned genitive
* En, em preposition "en" with dative
*
* Values for object gender specifiers of the possessive dative, or
* Contents of the leftmost table column can be copied and pasted as
* "case" values.
*
- * @param $word String
- * @param $case String
+ * @param string $word
+ * @param string $case
*
* @return string
*/
function convertGrammar( $word, $case ) {
$lord = strtolower( $word );
$gender = 'm'; // Nuutnaarel // default
- if ( preg_match ( '/wiki$/', $lord ) ) {
+ if ( preg_match( '/wiki$/', $lord ) ) {
$gender = 'n'; // Dat xyz-wiki
}
if ( isset( self::$familygender[$lord] ) ) {
return $word;
}
- /**
- * Avoid grouping whole numbers between 0 to 9999
- *
- * @param $_ string
- *
- * @return string
- */
- public function commafy( $_ ) {
- if ( !preg_match( '/^\d{1,4}$/', $_ ) ) {
- return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) );
- } else {
- return $_;
- }
- }
-
/**
* Handle cases of (1, other, 0) or (1, other)
*
- * @param $count int
- * @param $forms array
+ * @param int $count
+ * @param array $forms
*
* @return string
*/