| Total Complexity | 3 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class SimpleGenerator implements FakeDataGeneratorInterface |
||
| 9 | { |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | private $fakerProperty; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var Generator |
||
| 18 | */ |
||
| 19 | private $faker; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * SimpleGenerator constructor. |
||
| 23 | * @param string $fakerProperty |
||
| 24 | * @param bool $generateUniqueValues |
||
| 25 | */ |
||
| 26 | public function __construct(string $fakerProperty, bool $generateUniqueValues = false) |
||
| 27 | { |
||
| 28 | $this->faker = Factory::create(); |
||
| 29 | if ($generateUniqueValues){ |
||
| 30 | $this->faker->unique(); |
||
| 31 | } |
||
| 32 | $this->fakerProperty = $fakerProperty; |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @return mixed |
||
| 37 | */ |
||
| 38 | public function __invoke() |
||
| 41 | } |
||
| 42 | |||
| 44 | } |