| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | private function initial() |
||
| 20 | { |
||
| 21 | while (true) { |
||
| 22 | $username = $this->ask('You should input administrator username'); |
||
| 23 | /** @var User $user */ |
||
| 24 | $user = app(UserService::class)->findByName($username); |
||
| 25 | if ($user) { |
||
| 26 | $this->info('User Id is '.$user->id); |
||
| 27 | $this->assignAdmin($user); |
||
| 28 | $this->info('Assign Done'); |
||
| 29 | break; |
||
| 30 | } |
||
| 31 | $this->error('User is not found!'); |
||
| 32 | } |
||
| 67 |