arrilot / data-anonymization

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in set Generator

Pwelling opened this issue · comments

When i set the generator faker with another locale (I want to use nl_NL) it is allways replaced by the default one:

` public function setGenerator($generator)
{
if ($generator !== null) {
$this->generator = $generator;
}

    if (class_exists('\Faker\Factory')) {
        $this->generator = Factory::create();
    }

    return $this;
}`

Better would be to add a check if the given generator is null

Hi, I'm on vacation atm. Could you send a PR?

I will do this weekend!

PR was sent...

I've just tweaked some things e97a020 and released version 1.0.3