| Total Complexity | 4 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class DemoSeeder extends Seeder |
||
| 17 | { |
||
| 18 | public $enabled = false; |
||
| 19 | |||
| 20 | public $service; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * DemoSeeder constructor. |
||
| 24 | * |
||
| 25 | * @param bool $seed |
||
| 26 | */ |
||
| 27 | public function __construct(Auth0ServiceContract $auth0Service) |
||
| 28 | { |
||
| 29 | $this->service = $auth0Service; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Run the database seeds. |
||
| 34 | * |
||
| 35 | * @return void |
||
| 36 | */ |
||
| 37 | public function run() |
||
| 38 | { |
||
| 39 | $user = $this->seedUser(); |
||
| 40 | $machines = $this->seedMachines($user); |
||
|
|
|||
| 41 | } |
||
| 42 | |||
| 43 | protected function seedUser() |
||
| 44 | { |
||
| 45 | $user = $this->service->getTestUser(); |
||
| 46 | $user->assignRole(Role::ADMIN); |
||
| 47 | return $user; |
||
| 48 | } |
||
| 49 | |||
| 50 | protected function seedMachines($user) |
||
| 57 | } |
||
| 58 | } |
||
| 59 |