* Convert from the nominative form of a noun to some other case
* Invoked with {{grammar:case|word}}
*
- * @param $word string
- * @param $case string
+ * @param string $word
+ * @param string $case
* @return string
*/
function convertGrammar( $word, $case ) {
# matter if they are wrong sometimes. Just add a special case for your site name if necessary.
# join and array_slice instead mb_substr
- $ar = array();
+ $ar = [];
preg_match_all( '/./us', $word, $ar );
if ( !preg_match( "/[a-zA-Z_]/us", $word ) ) {
switch ( $case ) {
case 'accusative': # Հայցական հոլով
# stub
break;
- case 'instrumental': #
+ case 'instrumental':
# stub
break;
- case 'prepositional': #
+ case 'prepositional':
# stub
break;
}
/**
* Armenian numeric format is "12 345,67" but "1234,56"
*
- * @param $_ string
+ * @param string $_
*
* @return string
*/