@@ -62,7 +62,7 @@ protected function buildDockerCompose(array $services)
62
62
63
63
// Adds the new services as dependencies of the core service...
64
64
if (! array_key_exists ('core ' , $ compose ['services ' ])) {
65
- $ this ->warn ('Couldn \'t find the --core-- service. Make sure you add [ ' . implode (', ' , $ services ). '] to the depends_on config. ' );
65
+ $ this ->warn ('Couldn \'t find the --core-- service. Make sure you add [ ' . implode (', ' , $ services ) . '] to the depends_on config. ' );
66
66
} else {
67
67
$ compose ['services ' ]['core ' ]['depends_on ' ] = collect ($ compose ['services ' ]['core ' ]['depends_on ' ] ?? [])
68
68
->merge ($ services )
@@ -111,9 +111,11 @@ protected function replaceEnvVariables(array $services)
111
111
{
112
112
$ environment = file_get_contents ($ this ->laravel ->basePath ('.env ' ));
113
113
114
- if (in_array ('mysql ' , $ services ) ||
114
+ if (
115
+ in_array ('mysql ' , $ services ) ||
115
116
in_array ('mariadb ' , $ services ) ||
116
- in_array ('pgsql ' , $ services )) {
117
+ in_array ('pgsql ' , $ services )
118
+ ) {
117
119
$ defaults = [
118
120
'# DB_HOST=127.0.0.1 ' ,
119
121
'# DB_PORT=3306 ' ,
@@ -130,7 +132,7 @@ protected function replaceEnvVariables(array $services)
130
132
if (in_array ('mysql ' , $ services )) {
131
133
$ environment = preg_replace ('/DB_CONNECTION=.*/ ' , 'DB_CONNECTION=mysql ' , $ environment );
132
134
$ environment = str_replace ('DB_HOST=127.0.0.1 ' , "DB_HOST=mysql " , $ environment );
133
- }elseif (in_array ('pgsql ' , $ services )) {
135
+ } elseif (in_array ('pgsql ' , $ services )) {
134
136
$ environment = preg_replace ('/DB_CONNECTION=.*/ ' , 'DB_CONNECTION=pgsql ' , $ environment );
135
137
$ environment = str_replace ('DB_HOST=127.0.0.1 ' , "DB_HOST=pgsql " , $ environment );
136
138
$ environment = str_replace ('DB_PORT=3306 ' , "DB_PORT=5432 " , $ environment );
@@ -207,7 +209,7 @@ protected function prepareInstallation($services)
207
209
208
210
if (count ($ services ) > 0 ) {
209
211
$ this ->runCommands ([
210
- './vendor/bin/nge pull ' . implode (' ' , $ services ),
212
+ './vendor/bin/nge pull ' . implode (' ' , $ services ),
211
213
]);
212
214
}
213
215
@@ -230,12 +232,12 @@ protected function runCommands($commands)
230
232
try {
231
233
$ process ->setTty (true );
232
234
} catch (\RuntimeException $ e ) {
233
- $ this ->output ->writeln (' <bg=yellow;fg=black> WARN </> ' . $ e ->getMessage (). PHP_EOL );
235
+ $ this ->output ->writeln (' <bg=yellow;fg=black> WARN </> ' . $ e ->getMessage () . PHP_EOL );
234
236
}
235
237
}
236
238
237
239
return $ process ->run (function ($ type , $ line ) {
238
- $ this ->output ->write (' ' . $ line );
240
+ $ this ->output ->write (' ' . $ line );
239
241
});
240
242
}
241
243
}
0 commit comments