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