| Conditions | 2 |
| Paths | 2 |
| Total Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | 272 | public function inflect(string $word) : string |
|
| 45 | { |
||
| 46 | 272 | if (preg_match('/(.*)\\b(' . $this->getRegex() . ')$/i', $word, $regs) === 1) { |
|
| 47 | 109 | return $regs[1] . $word[0] . substr($this->substitutions[strtolower($regs[2])]->getTo()->getWord(), 1); |
|
| 48 | } |
||
| 49 | |||
| 50 | 168 | return $word; |
|
| 51 | } |
||
| 62 |