1
1
<?php
2
2
/**
3
3
* Pterodactyl - Panel
4
- * Copyright (c) 2015 - 2016 Dane Everitt <[email protected] >
4
+ * Copyright (c) 2015 - 2016 Dane Everitt <[email protected] >.
5
5
*
6
6
* Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
* of this software and associated documentation files (the "Software"), to deal
21
21
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
* SOFTWARE.
23
23
*/
24
+
24
25
namespace Pterodactyl \Console \Commands ;
25
26
26
27
use Uuid ;
@@ -66,23 +67,22 @@ public function __construct()
66
67
*/
67
68
public function handle ()
68
69
{
69
-
70
70
$ variables = [];
71
71
$ file = base_path () . '/.env ' ;
72
- if (!file_exists ($ file )) {
72
+ if (! file_exists ($ file )) {
73
73
$ this ->error ('Missing environment file! It appears that you have not installed this panel correctly. ' );
74
74
exit ();
75
75
}
76
76
77
77
$ envContents = file_get_contents ($ file );
78
78
79
79
$ 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 )) {
81
81
$ this ->info ('No service author set, setting one now. ' );
82
82
$ variables ['SERVICE_AUTHOR ' ] = env ('SERVICE_AUTHOR ' , (string ) Uuid::generate (4 ));
83
83
}
84
84
85
- if (!env ('QUEUE_STANDARD ' , false ) || !env ('QUEUE_DRIVER ' , false )) {
85
+ if (! env ('QUEUE_STANDARD ' , false ) || ! env ('QUEUE_DRIVER ' , false )) {
86
86
$ this ->info ('Setting default queue settings. ' );
87
87
$ variables ['QUEUE_DRIVER ' ] = env ('QUEUE_DRIVER ' , 'database ' );
88
88
$ variables ['QUEUE_HIGH ' ] = env ('QUEUE_HIGH ' , 'high ' );
@@ -91,25 +91,25 @@ public function handle()
91
91
}
92
92
93
93
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 ' ));
95
95
} else {
96
96
$ variables ['DB_HOST ' ] = $ this ->option ('dbhost ' );
97
97
}
98
98
99
99
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 ' ));
101
101
} else {
102
102
$ variables ['DB_PORT ' ] = $ this ->option ('dbport ' );
103
103
}
104
104
105
105
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 ' ));
107
107
} else {
108
108
$ variables ['DB_DATABASE ' ] = $ this ->option ('dbname ' );
109
109
}
110
110
111
111
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 ' ));
113
113
} else {
114
114
$ variables ['DB_USERNAME ' ] = $ this ->option ('dbuser ' );
115
115
}
0 commit comments