Skip to content

Commit 1c9b80c

Browse files
committed
Group configuration getters calls
1 parent 5fceeed commit 1c9b80c

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

src/Console/DbUpgradeCommand.php

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -363,29 +363,6 @@ protected function checkExistingDatabase(): void
363363
}
364364
}
365365

366-
/**
367-
* @return string
368-
*/
369-
protected function getDatabaseConnection(): string
370-
{
371-
return config('database.default');
372-
}
373-
374-
/**
375-
* @return array
376-
*/
377-
protected function getDatabaseConfig(): array
378-
{
379-
$config = config('database.connections.' . $this->getDatabaseConnection());
380-
$driver = $config['driver'] ?? null;
381-
382-
if ($driver !== 'mysql') {
383-
throw new DbUpgradeException('Only driver MySQL is supported.');
384-
}
385-
386-
return $config;
387-
}
388-
389366
/**
390367
* @param string|null $path
391368
* @return string
@@ -414,6 +391,29 @@ protected function findExecutable($name): string
414391
return $executable;
415392
}
416393

394+
/**
395+
* @return string
396+
*/
397+
protected function getDatabaseConnection(): string
398+
{
399+
return config('database.default');
400+
}
401+
402+
/**
403+
* @return array
404+
*/
405+
protected function getDatabaseConfig(): array
406+
{
407+
$config = config('database.connections.' . $this->getDatabaseConnection());
408+
$driver = $config['driver'] ?? null;
409+
410+
if ($driver !== 'mysql') {
411+
throw new DbUpgradeException('Only driver MySQL is supported.');
412+
}
413+
414+
return $config;
415+
}
416+
417417
/**
418418
* @return string
419419
*/

0 commit comments

Comments
 (0)