@@ -33,15 +33,15 @@ |
||
33 | 33 | public function inflect(string $word) : string |
34 | 34 | { |
35 | 35 | $irregular = $this->ruleset->getIrregular(); |
36 | - $irregularRegex = '(?:' . implode('|', array_keys($irregular)) . ')'; |
|
36 | + $irregularRegex = '(?:'.implode('|', array_keys($irregular)).')'; |
|
37 | 37 | |
38 | - if (preg_match('/(.*)\\b(' . $irregularRegex . ')$/i', $word, $regs)) { |
|
39 | - return $regs[1] . $word[0] . substr($irregular[strtolower($regs[2])], 1); |
|
38 | + if (preg_match('/(.*)\\b('.$irregularRegex.')$/i', $word, $regs)) { |
|
39 | + return $regs[1].$word[0].substr($irregular[strtolower($regs[2])], 1); |
|
40 | 40 | } |
41 | 41 | |
42 | - $uninflectedRegex = '(?:' . implode('|', $this->ruleset->getUninflected()) . ')'; |
|
42 | + $uninflectedRegex = '(?:'.implode('|', $this->ruleset->getUninflected()).')'; |
|
43 | 43 | |
44 | - if (preg_match('/^(' . $uninflectedRegex . ')$/i', $word, $regs)) { |
|
44 | + if (preg_match('/^('.$uninflectedRegex.')$/i', $word, $regs)) { |
|
45 | 45 | return $word; |
46 | 46 | } |
47 | 47 |