| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | 525 | public function build() : Ruleset |
|
| 46 | { |
||
| 47 | 525 | $transformations = $this->transformations ?? new Transformations(...Plural::getDefaultTransformations()); |
|
| 48 | 525 | $uninflected = $this->uninflected ?? new Uninflected(...Plural::getUninflectedWords()); |
|
| 49 | 525 | $irregular = $this->irregular ?? new Irregular(...Plural::getIrregularRules()); |
|
| 50 | |||
| 51 | $pluralUninflected = new Uninflected(...(static function () use ($uninflected) : iterable { |
||
| 52 | 525 | yield from $uninflected->getWords(); |
|
| 53 | 525 | yield from Uninflected::getDefaultWords(); |
|
| 54 | 525 | })()); |
|
| 55 | |||
| 56 | 525 | return new Ruleset($transformations, $pluralUninflected, $irregular); |
|
| 57 | } |
||
| 59 |