| 1 | <?php |
||
| 5 | trait Faker |
||
| 6 | { |
||
| 7 | protected $fakerClass = 'Faker\Factory'; |
||
| 8 | |||
| 9 | protected $faker; |
||
| 10 | |||
| 11 | protected $fakerString; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Call faker. |
||
| 15 | * |
||
| 16 | * @param $name |
||
| 17 | * @param $arguments |
||
| 18 | * @return mixed |
||
| 19 | * @throws \Exception |
||
| 20 | */ |
||
| 21 | 2 | public function __call($name, $arguments) |
|
| 31 | |||
| 32 | /** |
||
| 33 | * Instantiate and get Faker. |
||
| 34 | * |
||
| 35 | * @return \Faker\Generator|null |
||
| 36 | */ |
||
| 37 | 2 | public function getFaker() |
|
| 45 | |||
| 46 | /** |
||
| 47 | * Set the faker class. |
||
| 48 | * |
||
| 49 | * @param $class |
||
| 50 | * @return $this |
||
| 51 | */ |
||
| 52 | 1 | public function fakerClass($class) |
|
| 58 | } |
||
| 59 |