Skip to content

Commit f00c199

Browse files
committed
lint
1 parent 75bbe14 commit f00c199

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/Utils.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,17 +300,18 @@ public static function pluralize(string $string): string
300300
}
301301
}
302302

303+
$res = '';
303304
// check for matches using regular expressions
304305
foreach (self::$plural as $pattern => $result) {
305306
if (preg_match($pattern, $string)) {
306307
$res = preg_replace($pattern, $result, $string);
307308
assert(is_string($res));
308309

309-
return $res;
310+
break;
310311
}
311312
}
312313

313-
return $string;
314+
return $res;
314315
}
315316

316317
public static function singularize(string $string): string

0 commit comments

Comments
 (0)