Completed
Push — master ( 349be7...0e8d6e )
by David
12s
created
src/DockerCompose/DockerComposeService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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(),
Please login to merge, or discard this patch.
src/Command/NewServiceEventCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
         if ($fileName === 'docker-compose.yml') {
44 44
             $envPrefix = '';
45 45
         } else {
46
-            $envPrefix = '-' . Manifest::mustGetMetadata(CommonMetadata::ENV_NAME_KEY);
46
+            $envPrefix = '-'.Manifest::mustGetMetadata(CommonMetadata::ENV_NAME_KEY);
47 47
         }
48
-        $dockerComposePath = Pheromone::getContainerProjectDirectory() . '/' . $fileName;
48
+        $dockerComposePath = Pheromone::getContainerProjectDirectory().'/'.$fileName;
49 49
 
50 50
         $this->getAentHelper()->title($fileName);
51 51
 
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
         $envFilePaths = [];
70 70
         foreach ($envMapDotEnvFile as $key => $sharedEnvVariable) {
71 71
             // TODO: name of file is certainly impacted by name of docker-compose file.
72
-            $envFilePath = '.' . $sharedEnvVariable->getContainerId() . $envPrefix . '.env';
72
+            $envFilePath = '.'.$sharedEnvVariable->getContainerId().$envPrefix.'.env';
73 73
             $envFilePaths[] = $envFilePath;
74
-            $dotEnvFile = new EnvFile(Pheromone::getContainerProjectDirectory() . '/' . $envFilePath);
74
+            $dotEnvFile = new EnvFile(Pheromone::getContainerProjectDirectory().'/'.$envFilePath);
75 75
             $dotEnvFile->set($key, $sharedEnvVariable->getValue(), $sharedEnvVariable->getComment());
76 76
         }
77 77
         $envFilePaths = array_unique($envFilePaths);
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         $formattedPayload = DockerComposeService::dockerComposeServiceSerialize($service, $envFilePaths);
81 81
         $this->log->debug(\GuzzleHttp\json_encode($formattedPayload, JSON_PRETTY_PRINT));
82 82
 
83
-        $dockerComposePath = Pheromone::getContainerProjectDirectory() . '/' . $fileName;
83
+        $dockerComposePath = Pheromone::getContainerProjectDirectory().'/'.$fileName;
84 84
         DockerComposeService::mergeContentInDockerComposeFile($formattedPayload, $dockerComposePath, true);
85 85
 
86 86
         $this->output->writeln("Service <info>$serviceName</info> has been successfully added in <info>$fileName</info>!");
Please login to merge, or discard this patch.