Skip to content

Commit

Permalink
Merge branch '4.4' into 5.1
Browse files Browse the repository at this point in the history
* 4.4:
  Changed private static array-properties to const
  • Loading branch information
nicolas-grekas committed Jan 25, 2021
1 parent 0b171a3 commit 8a90f72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Inflector/EnglishInflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class EnglishInflector implements InflectorInterface
*
* @see http://english-zone.com/spelling/plurals.html
*/
private static $pluralMap = [
private const PLURAL_MAP = [
// First entry: plural suffix, reversed
// Second entry: length of plural suffix
// Third entry: Whether the suffix may succeed a vocal
Expand Down Expand Up @@ -335,7 +335,7 @@ public function singularize(string $plural): array
// The inner loop $j iterates over the characters of the plural suffix
// in the plural table to compare them with the characters of the actual
// given plural suffix
foreach (self::$pluralMap as $map) {
foreach (self::PLURAL_MAP as $map) {
$suffix = $map[0];
$suffixLength = $map[1];
$j = 0;
Expand Down

0 comments on commit 8a90f72

Please sign in to comment.