Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
22 | 73 | public function getGeneratorForLocale(?string $locale = null): Generator |
|
23 | { |
||
24 | 73 | $locale = $locale ?? Factory::DEFAULT_LOCALE; |
|
25 | |||
26 | 73 | if (empty($this->generators[$locale])) { |
|
27 | 73 | $this->generators[$locale] = $this->instantiate($locale); |
|
28 | } |
||
29 | |||
30 | 73 | return $this->generators[$locale]; |
|
31 | } |
||
45 |