This repository has been archived on 2022-07-12. You can view files and clone it, but cannot push or open issues or pull requests.
2022-05-11 12:49:15 +00:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Drupal\opencase;
|
|
|
|
|
2022-06-05 14:49:27 +00:00
|
|
|
|
2022-05-11 12:49:15 +00:00
|
|
|
class Pluraliser {
|
2022-06-05 14:49:27 +00:00
|
|
|
const NO_CHANGE = ['Staff'];
|
2022-05-11 12:49:15 +00:00
|
|
|
public static function pluralise($text) {
|
2022-06-05 14:49:27 +00:00
|
|
|
if (in_array($text, self::NO_CHANGE)) {
|
|
|
|
return $text;
|
|
|
|
} else {
|
|
|
|
return $text . "s";
|
|
|
|
}
|
2022-05-11 12:49:15 +00:00
|
|
|
}
|
|
|
|
}
|