| Conditions | 2 |
| Paths | 2 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | public function handle(GrammarFactory $grammars) |
||
| 48 | { |
||
| 49 | $dryRun = (bool) $this->option('dry-run'); |
||
| 50 | |||
| 51 | if ($dryRun) { |
||
| 52 | $this->info('[DRY] Running in dry-run.'); |
||
| 53 | } |
||
| 54 | |||
| 55 | $connection = config('database.default'); |
||
| 56 | $configs = config(sprintf('database.connections.%s', $connection)); |
||
| 57 | |||
| 58 | $builder = new Builder( |
||
| 59 | $this->makeConnector($configs, $dryRun), |
||
| 60 | $grammars |
||
| 61 | ); |
||
| 62 | |||
| 63 | $builder->recreateDatabase($configs); |
||
| 64 | |||
| 65 | $this->info(sprintf('Database "%s" re-created successfully.', $configs['database'])); |
||
| 66 | } |
||
| 67 | |||
| 77 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.