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