@@ -46,11 +46,13 @@ |
||
| 46 | 46 | |
| 47 | 47 | $fs = new Files(); |
| 48 | 48 | |
| 49 | - if ($fs->isDirectory($this->app->dir('app') . 'src/Service')) { |
|
| 49 | + if ($fs->isDirectory($this->app->dir('app') . 'src/Service')) |
|
| 50 | + { |
|
| 50 | 51 | $fs->deleteDirectory($this->app->dir('app') . 'src/Service'); |
| 51 | 52 | } |
| 52 | 53 | |
| 53 | - if ($fs->isDirectory($this->app->dir('app') . 'src/GPBMetadata')) { |
|
| 54 | + if ($fs->isDirectory($this->app->dir('app') . 'src/GPBMetadata')) |
|
| 55 | + { |
|
| 54 | 56 | $fs->deleteDirectory($this->app->dir('app') . 'src/GPBMetadata'); |
| 55 | 57 | } |
| 56 | 58 | } |
@@ -33,11 +33,13 @@ |
||
| 33 | 33 | |
| 34 | 34 | $fs = new Files(); |
| 35 | 35 | |
| 36 | - if ($fs->isDirectory($this->app->dir('app') . 'src/Service')) { |
|
| 36 | + if ($fs->isDirectory($this->app->dir('app') . 'src/Service')) |
|
| 37 | + { |
|
| 37 | 38 | $fs->deleteDirectory($this->app->dir('app') . 'src/Service'); |
| 38 | 39 | } |
| 39 | 40 | |
| 40 | - if ($fs->isDirectory($this->app->dir('app') . 'src/GPBMetadata')) { |
|
| 41 | + if ($fs->isDirectory($this->app->dir('app') . 'src/GPBMetadata')) |
|
| 42 | + { |
|
| 41 | 43 | $fs->deleteDirectory($this->app->dir('app') . 'src/GPBMetadata'); |
| 42 | 44 | } |
| 43 | 45 | } |
@@ -55,21 +55,26 @@ |
||
| 55 | 55 | $this->sprintf("<info>New encryption key:</info> <fg=cyan>%s</fg=cyan>\n", $key); |
| 56 | 56 | |
| 57 | 57 | $file = $this->option('mount'); |
| 58 | - if ($file === null) { |
|
| 58 | + if ($file === null) |
|
| 59 | + { |
|
| 59 | 60 | return; |
| 60 | 61 | } |
| 61 | 62 | |
| 62 | - if (!$files->exists($file)) { |
|
| 63 | + if (!$files->exists($file)) |
|
| 64 | + { |
|
| 63 | 65 | $this->sprintf("<error>Unable to find `%s`</error>", $file); |
| 64 | 66 | return; |
| 65 | 67 | } |
| 66 | 68 | |
| 67 | 69 | $content = $files->read($file); |
| 68 | 70 | |
| 69 | - try { |
|
| 71 | + try |
|
| 72 | + { |
|
| 70 | 73 | $content = str_replace($this->option('placeholder'), $key, $content); |
| 71 | 74 | $content = str_replace($enc->getKey(), $key, $content); |
| 72 | - } catch (\Throwable $e) { |
|
| 75 | + } |
|
| 76 | + catch (\Throwable $e) |
|
| 77 | + { |
|
| 73 | 78 | // current keys is not set |
| 74 | 79 | } |
| 75 | 80 | |