Skip to content

Commit 828ec04

Browse files
authored
Merge pull request #8 from jedymatt/7-improve-naming-in-servicesfromdockercompose-method
Improve variable naming
2 parents 8166250 + 7b3c6ae commit 828ec04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Console/SailEnvCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ public function handle()
7373

7474
protected function servicesFromDockerCompose(): array
7575
{
76-
$environment = file_get_contents($this->laravel->basePath('docker-compose.yml'));
76+
$dockerComposeContent = file_get_contents($this->laravel->basePath('docker-compose.yml'));
7777

7878
$regex = '/'.implode('|', array_map(function ($service) {
7979
return '(?<=\s)'.$service.'(?=:)'; // Match service name followed by ':' (e.g. mysql:) and preceded by whitespace
8080
}, $this->services)).'/';
8181

82-
preg_match_all($regex, $environment, $matches);
82+
preg_match_all($regex, $dockerComposeContent, $matches);
8383

8484
return array_values($matches[0]);
8585
}

0 commit comments

Comments
 (0)