Completed
Push — master ( 349be7...0e8d6e )
by David
12s
created
src/Command/Exception/PayloadException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,6 +10,6 @@
 block discarded – undo
10 10
      */
11 11
     public static function emptyPayload(string $event): PayloadException
12 12
     {
13
-        return new self('payload missing for the event : ' . $event);
13
+        return new self('payload missing for the event : '.$event);
14 14
     }
15 15
 }
Please login to merge, or discard this patch.
src/aent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 
14 14
  */
15 15
 
16
-require __DIR__ . '/../vendor/autoload.php';
16
+require __DIR__.'/../vendor/autoload.php';
17 17
 
18 18
 use TheAentMachine\AentApplication;
19 19
 use TheAentMachine\AentDockerCompose\Command\AddEventCommand;
Please login to merge, or discard this patch.
src/DockerCompose/EnvFile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
             $content = \preg_replace("/^$key=.*/m", $key.'='.$value, $content);
28 28
         } else {
29 29
             $commentLines = \explode("\n", $comment ?? '');
30
-            $commentLines = \array_map(function (string $line) {
30
+            $commentLines = \array_map(function(string $line) {
31 31
                 return '# '.$line;
32 32
             }, $commentLines);
33 33
             $comments = \implode("\n", $commentLines);
Please login to merge, or discard this patch.
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.