@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | public function handle() |
| 45 | 45 | { |
| 46 | - $key = (string)$this->argument('key'); |
|
| 46 | + $key = (string) $this->argument('key'); |
|
| 47 | 47 | |
| 48 | 48 | if (strlen($key)) |
| 49 | 49 | $this->isValidKey($key); |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | $value = ($json) ? json_encode($env->getKeyValue($key)) : ($keyValFormat ? $env->getKeyValue($key) : $env->getValue($key)); |
| 61 | 61 | |
| 62 | 62 | $this->line(($json) |
| 63 | - ? (string)$value |
|
| 64 | - : ($keyValFormat ? "{$key}={$value[$key]}" : (string)$value) |
|
| 63 | + ? (string) $value |
|
| 64 | + : ($keyValFormat ? "{$key}={$value[$key]}" : (string) $value) |
|
| 65 | 65 | ); |
| 66 | 66 | } else { |
| 67 | 67 | $this->line("There is no variable '{$key}'"); |
@@ -45,16 +45,18 @@ |
||
| 45 | 45 | { |
| 46 | 46 | $key = (string)$this->argument('key'); |
| 47 | 47 | |
| 48 | - if (strlen($key)) |
|
| 49 | - $this->isValidKey($key); |
|
| 48 | + if (strlen($key)) { |
|
| 49 | + $this->isValidKey($key); |
|
| 50 | + } |
|
| 50 | 51 | |
| 51 | 52 | $json = $this->option('json'); |
| 52 | 53 | $keyValFormat = $this->option('key-value'); |
| 53 | 54 | |
| 54 | 55 | $env = new Env(); |
| 55 | 56 | |
| 56 | - if (!strlen($key)) |
|
| 57 | - $this->line(($json) ? json_encode($env->getVariables()) : $env->getEnvContent()); |
|
| 57 | + if (!strlen($key)) { |
|
| 58 | + $this->line(($json) ? json_encode($env->getVariables()) : $env->getEnvContent()); |
|
| 59 | + } |
|
| 58 | 60 | |
| 59 | 61 | if (strlen($key) && $env->exists($key)) { |
| 60 | 62 | $value = ($json) ? json_encode($env->getKeyValue($key)) : ($keyValFormat ? $env->getKeyValue($key) : $env->getValue($key)); |