@@ -84,15 +84,15 @@ |
||
84 | 84 | |
85 | 85 | public function inflect(string $word) : string |
86 | 86 | { |
87 | - $irregularRegex = '(?:' . implode('|', array_keys($this->irregular)) . ')'; |
|
87 | + $irregularRegex = '(?:'.implode('|', array_keys($this->irregular)).')'; |
|
88 | 88 | |
89 | - if (preg_match('/(.*)\\b(' . $irregularRegex . ')$/i', $word, $regs)) { |
|
90 | - return $regs[1] . $word[0] . substr($this->irregular[strtolower($regs[2])], 1); |
|
89 | + if (preg_match('/(.*)\\b('.$irregularRegex.')$/i', $word, $regs)) { |
|
90 | + return $regs[1].$word[0].substr($this->irregular[strtolower($regs[2])], 1); |
|
91 | 91 | } |
92 | 92 | |
93 | - $uninflectedRegex = '(?:' . implode('|', $this->uninflected) . ')'; |
|
93 | + $uninflectedRegex = '(?:'.implode('|', $this->uninflected).')'; |
|
94 | 94 | |
95 | - if (preg_match('/^(' . $uninflectedRegex . ')$/i', $word, $regs)) { |
|
95 | + if (preg_match('/^('.$uninflectedRegex.')$/i', $word, $regs)) { |
|
96 | 96 | return $word; |
97 | 97 | } |
98 | 98 |