| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | 516 | public function inflect(string $word) : string |
|
| 20 | { |
||
| 21 | 516 | $inflected = $this->ruleset->getIrregular()->inflect($word); |
|
| 22 | |||
| 23 | 516 | if ($inflected !== $word) { |
|
| 24 | 94 | return $inflected; |
|
| 25 | } |
||
| 26 | |||
| 27 | 425 | if ($this->ruleset->getUninflected()->isUninflected($word)) { |
|
| 28 | 246 | return $word; |
|
| 29 | } |
||
| 30 | |||
| 31 | 182 | return $this->ruleset->getRules()->inflect($word); |
|
| 32 | } |
||
| 34 |