@@ -27,14 +27,14 @@ discard block |
||
| 27 | 27 | public function actionConfig($key = null) |
| 28 | 28 | { |
| 29 | 29 | // get config from global variable (TODO) |
| 30 | - $data = $GLOBALS['config']; |
|
| 30 | + $data = $GLOBALS[ 'config' ]; |
|
| 31 | 31 | if ($key) { |
| 32 | 32 | $keys = explode('.', $key); |
| 33 | - if (isset($keys[0])) { |
|
| 34 | - $data = $GLOBALS['config'][$keys[0]]; |
|
| 33 | + if (isset($keys[ 0 ])) { |
|
| 34 | + $data = $GLOBALS[ 'config' ][ $keys[ 0 ] ]; |
|
| 35 | 35 | } |
| 36 | - if (isset($keys[1])) { |
|
| 37 | - $data = $GLOBALS['config'][$keys[0]][$keys[1]]; |
|
| 36 | + if (isset($keys[ 1 ])) { |
|
| 37 | + $data = $GLOBALS[ 'config' ][ $keys[ 0 ] ][ $keys[ 1 ] ]; |
|
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | $this->stdout(VarDumper::dumpAsString($data)); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | $this->stdout("\nDatabase\n"); |
| 77 | 77 | $this->stdout("--------\n"); |
| 78 | 78 | $this->run('db/create'); |
| 79 | - $this->run('migrate/up', ['interactive' => (bool) getenv('APP_INTERACTIVE')]); |
|
| 79 | + $this->run('migrate/up', [ 'interactive' => (bool) getenv('APP_INTERACTIVE') ]); |
|
| 80 | 80 | |
| 81 | 81 | $this->stdout("\nUser\n"); |
| 82 | 82 | $this->stdout("----\n"); |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | 'default' => getenv('APP_ADMIN_PASSWORD') ?: \Yii::$app->security->generateRandomString(8), |
| 87 | 87 | ] |
| 88 | 88 | ); |
| 89 | - $this->run('user/create', [getenv('APP_ADMIN_EMAIL'), 'admin', $adminPassword]); |
|
| 89 | + $this->run('user/create', [ getenv('APP_ADMIN_EMAIL'), 'admin', $adminPassword ]); |
|
| 90 | 90 | |
| 91 | 91 | $this->stdout("\n\nDone.\n"); |
| 92 | 92 | } |
@@ -94,12 +94,12 @@ discard block |
||
| 94 | 94 | /** |
| 95 | 95 | * Clean cache, assets and audit tables |
| 96 | 96 | */ |
| 97 | - public function actionCleanup(){ |
|
| 97 | + public function actionCleanup() { |
|
| 98 | 98 | $this->stdout("\nCleanup\n"); |
| 99 | 99 | $this->stdout("-------\n"); |
| 100 | 100 | $this->run('cache/flush-all'); |
| 101 | - $this->run('audit/cleanup', ['age' => 30, 'interactive' => (bool) getenv('APP_INTERACTIVE')]); |
|
| 102 | - $this->run('app/clear-assets', ['interactive' => (bool) getenv('APP_INTERACTIVE')]); |
|
| 101 | + $this->run('audit/cleanup', [ 'age' => 30, 'interactive' => (bool) getenv('APP_INTERACTIVE') ]); |
|
| 102 | + $this->run('app/clear-assets', [ 'interactive' => (bool) getenv('APP_INTERACTIVE') ]); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | /** |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | $command = new Command($cmd); |
| 120 | 120 | |
| 121 | 121 | // Prompt user |
| 122 | - $delete = $this->confirm("\nDo you really want to delete web assets?", ['default' => true]); |
|
| 122 | + $delete = $this->confirm("\nDo you really want to delete web assets?", [ 'default' => true ]); |
|
| 123 | 123 | |
| 124 | 124 | if ($delete) { |
| 125 | 125 | // Try to execute $command |