11<?php
22/**
33 * Pterodactyl - Panel
4- * Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com>
4+ * Copyright (c) 2015 - 2016 Dane Everitt <dane@daneeveritt.com>.
55 *
66 * Permission is hereby granted, free of charge, to any person obtaining a copy
77 * of this software and associated documentation files (the "Software"), to deal
2121 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222 * SOFTWARE.
2323 */
24+
2425namespace Pterodactyl \Console \Commands ;
2526
2627use Uuid ;
@@ -66,23 +67,22 @@ public function __construct()
6667 */
6768 public function handle ()
6869 {
69-
7070 $ variables = [];
7171 $ file = base_path () . '/.env ' ;
72- if (!file_exists ($ file )) {
72+ if (! file_exists ($ file )) {
7373 $ this ->error ('Missing environment file! It appears that you have not installed this panel correctly. ' );
7474 exit ();
7575 }
7676
7777 $ envContents = file_get_contents ($ file );
7878
7979 $ this ->info ('Simply leave blank and press enter to fields that you do not wish to update. ' );
80- if (!env ('SERVICE_AUTHOR ' , false )) {
80+ if (! env ('SERVICE_AUTHOR ' , false )) {
8181 $ this ->info ('No service author set, setting one now. ' );
8282 $ variables ['SERVICE_AUTHOR ' ] = env ('SERVICE_AUTHOR ' , (string ) Uuid::generate (4 ));
8383 }
8484
85- if (!env ('QUEUE_STANDARD ' , false ) || !env ('QUEUE_DRIVER ' , false )) {
85+ if (! env ('QUEUE_STANDARD ' , false ) || ! env ('QUEUE_DRIVER ' , false )) {
8686 $ this ->info ('Setting default queue settings. ' );
8787 $ variables ['QUEUE_DRIVER ' ] = env ('QUEUE_DRIVER ' , 'database ' );
8888 $ variables ['QUEUE_HIGH ' ] = env ('QUEUE_HIGH ' , 'high ' );
@@ -91,25 +91,25 @@ public function handle()
9191 }
9292
9393 if (is_null ($ this ->option ('dbhost ' ))) {
94- $ variables ['DB_HOST ' ] = $ this ->anticipate ('Database Host ' , [ 'localhost ' , '127.0.0.1 ' , env ('DB_HOST ' ) ], env ('DB_HOST ' ));
94+ $ variables ['DB_HOST ' ] = $ this ->anticipate ('Database Host ' , ['localhost ' , '127.0.0.1 ' , env ('DB_HOST ' )], env ('DB_HOST ' ));
9595 } else {
9696 $ variables ['DB_HOST ' ] = $ this ->option ('dbhost ' );
9797 }
9898
9999 if (is_null ($ this ->option ('dbport ' ))) {
100- $ variables ['DB_PORT ' ] = $ this ->anticipate ('Database Port ' , [ 3306 , env ('DB_PORT ' ) ], env ('DB_PORT ' ));
100+ $ variables ['DB_PORT ' ] = $ this ->anticipate ('Database Port ' , [3306 , env ('DB_PORT ' )], env ('DB_PORT ' ));
101101 } else {
102102 $ variables ['DB_PORT ' ] = $ this ->option ('dbport ' );
103103 }
104104
105105 if (is_null ($ this ->option ('dbname ' ))) {
106- $ variables ['DB_DATABASE ' ] = $ this ->anticipate ('Database Name ' , [ 'pterodactyl ' , 'homestead ' , ENV ('DB_DATABASE ' ) ], env ('DB_DATABASE ' ));
106+ $ variables ['DB_DATABASE ' ] = $ this ->anticipate ('Database Name ' , ['pterodactyl ' , 'homestead ' , ENV ('DB_DATABASE ' )], env ('DB_DATABASE ' ));
107107 } else {
108108 $ variables ['DB_DATABASE ' ] = $ this ->option ('dbname ' );
109109 }
110110
111111 if (is_null ($ this ->option ('dbuser ' ))) {
112- $ variables ['DB_USERNAME ' ] = $ this ->anticipate ('Database Username ' , [ ENV ('DB_DATABASE ' ) ], env ('DB_USERNAME ' ));
112+ $ variables ['DB_USERNAME ' ] = $ this ->anticipate ('Database Username ' , [ENV ('DB_DATABASE ' )], env ('DB_USERNAME ' ));
113113 } else {
114114 $ variables ['DB_USERNAME ' ] = $ this ->option ('dbuser ' );
115115 }
0 commit comments