We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 75bbe14 commit f00c199Copy full SHA for f00c199
1 file changed
lib/Utils.php
@@ -300,17 +300,18 @@ public static function pluralize(string $string): string
300
}
301
302
303
+ $res = '';
304
// check for matches using regular expressions
305
foreach (self::$plural as $pattern => $result) {
306
if (preg_match($pattern, $string)) {
307
$res = preg_replace($pattern, $result, $string);
308
assert(is_string($res));
309
- return $res;
310
+ break;
311
312
313
- return $string;
314
+ return $res;
315
316
317
public static function singularize(string $string): string
0 commit comments