@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $this->prompt->printAltBlock('Docker Compose: creating dot env file...'); |
41 | 41 | $serialized = $this->createDotEnv($service); |
42 | 42 | } else { |
43 | - $serialized= DockerComposeHelper::dockerComposeServiceSerialize($service); |
|
43 | + $serialized = DockerComposeHelper::dockerComposeServiceSerialize($service); |
|
44 | 44 | } |
45 | 45 | DockerComposeHelper::mergeContentInDockerComposeFile($serialized, $this->context->getDockerComposeFilePath(), true); |
46 | 46 | } |
@@ -75,9 +75,9 @@ discard block |
||
75 | 75 | * @var SharedEnvVariable $sharedEnvVariable |
76 | 76 | */ |
77 | 77 | foreach ($envMapDotEnvFile as $key => $sharedEnvVariable) { |
78 | - $envFilePath = '.' . $sharedEnvVariable->getContainerId() . $this->context->getEnvironmentName() . '.env'; |
|
78 | + $envFilePath = '.'.$sharedEnvVariable->getContainerId().$this->context->getEnvironmentName().'.env'; |
|
79 | 79 | $envFilePaths[] = $envFilePath; |
80 | - $dotEnvFile = new EnvFileHelper($this->context->getProjectDir() . '/' . $envFilePath); |
|
80 | + $dotEnvFile = new EnvFileHelper($this->context->getProjectDir().'/'.$envFilePath); |
|
81 | 81 | $dotEnvFile->set($key, $sharedEnvVariable->getValue(), $sharedEnvVariable->getComment()); |
82 | 82 | } |
83 | 83 | $envFilePaths = array_unique($envFilePaths); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | { |
38 | 38 | parent::toMetadata(); |
39 | 39 | Aenthill::update([ |
40 | - 'DOCKER_COMPOSE_FILENAME' => $this->dockerComposeFilename, |
|
40 | + 'DOCKER_COMPOSE_FILENAME' => $this->dockerComposeFilename, |
|
41 | 41 | ]); |
42 | 42 | } |
43 | 43 |
@@ -1,7 +1,7 @@ |
||
1 | 1 | #!/usr/bin/env php |
2 | 2 | <?php |
3 | 3 | |
4 | -require __DIR__ . '/../vendor/autoload.php'; |
|
4 | +require __DIR__.'/../vendor/autoload.php'; |
|
5 | 5 | |
6 | 6 | use \TheAentMachine\Aent\OrchestratorAent; |
7 | 7 | use \TheAentMachine\AentDockerCompose\Event\AddEvent; |
@@ -30,12 +30,12 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public static function dockerComposeServiceSerialize(Service $service, array $envFileNames = [], string $version = self::VERSION): array |
32 | 32 | { |
33 | - $portMap = function (array $port): string { |
|
34 | - return $port['source'] . ':' . $port['target']; |
|
33 | + $portMap = function(array $port): string { |
|
34 | + return $port['source'].':'.$port['target']; |
|
35 | 35 | }; |
36 | 36 | $envMapDockerCompose = self::getEnvironmentVariablesForDockerCompose($service); |
37 | 37 | |
38 | - $envMap = function (EnvVariable $e) { |
|
38 | + $envMap = function(EnvVariable $e) { |
|
39 | 39 | if ($e->getComment() !== null) { |
40 | 40 | return new CommentedItem($e->getValue(), $e->getComment()); |
41 | 41 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * @param NamedVolume|BindVolume|TmpfsVolume $v |
46 | 46 | * @return array |
47 | 47 | */ |
48 | - $volumeMap = function ($v): array { |
|
48 | + $volumeMap = function($v): array { |
|
49 | 49 | $array = [ |
50 | 50 | 'type' => $v->getType(), |
51 | 51 | 'source' => $v->getSource(), |
@@ -41,8 +41,8 @@ |
||
41 | 41 | $content = \preg_replace("/^$key=.*/m", $key.'='.$value, $content); |
42 | 42 | } else { |
43 | 43 | $commentLines = \explode("\n", $comment ?? ''); |
44 | - $commentLines = \array_map(function (string $line) { |
|
45 | - return '# '. $line; |
|
44 | + $commentLines = \array_map(function(string $line) { |
|
45 | + return '# '.$line; |
|
46 | 46 | }, $commentLines); |
47 | 47 | $comments = \implode("\n", $commentLines); |
48 | 48 | if ($comment) { |