@@ -7,12 +7,12 @@ discard block |
||
| 7 | 7 | { |
| 8 | 8 | protected $capsule; |
| 9 | 9 | |
| 10 | - public function __construct( Capsule $capsule ) |
|
| 10 | + public function __construct(Capsule $capsule) |
|
| 11 | 11 | { |
| 12 | 12 | $this->capsule = $capsule; |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | - public function settings( array $settings ) : void |
|
| 15 | + public function settings(array $settings) : void |
|
| 16 | 16 | { |
| 17 | 17 | $this->capsule->addConnection([ |
| 18 | 18 | 'driver' => $settings['databaseType'], |
@@ -33,8 +33,8 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | public function checkConnection() : void |
| 35 | 35 | { |
| 36 | - try{ |
|
| 37 | - is_a($this->capsule->getConnection()->getPdo(), \PDO::class ); |
|
| 36 | + try { |
|
| 37 | + is_a($this->capsule->getConnection()->getPdo(), \PDO::class); |
|
| 38 | 38 | } catch (\Exception $exception) |
| 39 | 39 | { |
| 40 | 40 | dd($exception->getMessage()); |
@@ -19,10 +19,10 @@ |
||
| 19 | 19 | |
| 20 | 20 | public function setLocal(string $local) |
| 21 | 21 | { |
| 22 | - if ( isset($this->mapLocal[$local]) ) |
|
| 22 | + if (isset($this->mapLocal[$local])) |
|
| 23 | 23 | { |
| 24 | 24 | config(['geography.locale' => $this->mapLocal[$local]]); |
| 25 | - } else{ |
|
| 25 | + } else { |
|
| 26 | 26 | throw new Exception('not locale'); |
| 27 | 27 | } |
| 28 | 28 | |
@@ -50,9 +50,9 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | $this->progressBar->start(); |
| 52 | 52 | |
| 53 | - $this->moveMigrate( $this->progressBar ); |
|
| 54 | - $this->moveSeeders( $this->progressBar ); |
|
| 55 | - $this->moveConfig( $this->progressBar ); |
|
| 53 | + $this->moveMigrate($this->progressBar); |
|
| 54 | + $this->moveSeeders($this->progressBar); |
|
| 55 | + $this->moveConfig($this->progressBar); |
|
| 56 | 56 | |
| 57 | 57 | $this->progressBar->finish(); |
| 58 | 58 | $output->writeln(['']); |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | protected function moveMigrate(ProgressBar $progress) |
| 63 | 63 | { |
| 64 | - $pathToMigrationsLaravel = $_SERVER["PWD"] . '/database/migrations/'; |
|
| 64 | + $pathToMigrationsLaravel = $_SERVER["PWD"] . '/database/migrations/'; |
|
| 65 | 65 | $pathToStubs = __DIR__ . '/../database/migrations/stubs/'; |
| 66 | 66 | |
| 67 | 67 | $this->createDir($pathToMigrationsLaravel); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | protected function moveSeeders(ProgressBar $progress) |
| 78 | 78 | { |
| 79 | - $pathToSeedersLaravel = $_SERVER["PWD"] . '/database/seeds/'; |
|
| 79 | + $pathToSeedersLaravel = $_SERVER["PWD"] . '/database/seeds/'; |
|
| 80 | 80 | $pathToSeed = __DIR__ . '/../database/seeds/stubs/'; |
| 81 | 81 | |
| 82 | 82 | $this->createDir($pathToSeedersLaravel); |
@@ -92,10 +92,10 @@ discard block |
||
| 92 | 92 | protected function moveConfig(ProgressBar $progress) : void |
| 93 | 93 | { |
| 94 | 94 | $pathToConfig = __DIR__ . '/../config.php'; |
| 95 | - $pathToConfigsLaravel = $_SERVER["PWD"] . '/config/'; |
|
| 95 | + $pathToConfigsLaravel = $_SERVER["PWD"] . '/config/'; |
|
| 96 | 96 | $this->createDir($pathToConfigsLaravel); |
| 97 | 97 | |
| 98 | - copy($pathToConfig,$pathToConfigsLaravel . 'geography.php' ); |
|
| 98 | + copy($pathToConfig, $pathToConfigsLaravel . 'geography.php'); |
|
| 99 | 99 | $progress->advance(); |
| 100 | 100 | } |
| 101 | 101 | |
@@ -128,8 +128,8 @@ discard block |
||
| 128 | 128 | protected function getDateNormalize() : string |
| 129 | 129 | { |
| 130 | 130 | $date = Carbon::now(); |
| 131 | - $date = preg_replace('/-|\s/','_', $date); |
|
| 132 | - $data = preg_replace('/:/','', $date); |
|
| 131 | + $date = preg_replace('/-|\s/', '_', $date); |
|
| 132 | + $data = preg_replace('/:/', '', $date); |
|
| 133 | 133 | |
| 134 | 134 | return $data; |
| 135 | 135 | } |