final protected function faker(string $locale = 'en_US'): Generator
    {
        static $fakers = [];

        if (!\array_key_exists($locale, $fakers)) {
            $faker = Factory::create($locale);

            $faker->seed(9001);

            $fakers[$locale] = $faker;
        }

        return $fakers[$locale];
    }
final protected function faker(string $locale = 'en_US'): Generator
    {
        static $fakers = [];

        if (!\array_key_exists($locale, $fakers)) {
            $faker = Factory::create($locale);

            $faker->seed(9001);

            $fakers[$locale] = $faker;
        }

        return $fakers[$locale];
    }
final protected function faker ( string $ locale = 'en_US' ) : Generator { static $ fakers = [ ] ; if ( ! \ array_key_exists ( $ locale , $ fakers ) ) { $ faker = Factory :: create ( $ locale ) ; $ faker -> seed ( 9001 ) ; $ fakers [ $ locale ] = $ faker ; } return $ fakers [ $ locale ] ; }
Returns a localized instance of Faker\Generator.

Useful for generating fake data in tests.

@see https://github.com/fzaninotto/Faker

@param string $locale

@return Generator
Returns a localized instance of Faker \ Generator .