Completed
Push — master ( 4201d1...52ead2 )
by David
03:54
created
src/Command/DeleteDockerServiceCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
         $payload = json_decode($input->getArgument('payload'), true);
26 26
 
27 27
         // $dockerComposePath = getenv('PHEROMONE_CONTAINER_PROJECT_DIR') . '/docker-compose.yml';
28
-        $dockerComposePath = getenv('PHEROMONE_CONTAINER_PROJECT_DIR') . '/aenthill/docker-compose.yml';
28
+        $dockerComposePath = getenv('PHEROMONE_CONTAINER_PROJECT_DIR').'/aenthill/docker-compose.yml';
29 29
 
30 30
         if (empty($payload)) {
31 31
             $yml = Yaml::parseFile($dockerComposePath);
@@ -41,14 +41,14 @@  discard block
 block discarded – undo
41 41
             $servicesToDelete = $helper->ask($input, $output, $question);
42 42
             print_r($servicesToDelete);
43 43
             foreach ($servicesToDelete as $s) {
44
-                $this->deleteElementInDockerCompose('services.' . $s, $dockerComposePath, $output);
44
+                $this->deleteElementInDockerCompose('services.'.$s, $dockerComposePath, $output);
45 45
             }
46 46
         } else {
47
-            $elemToDelete = "services." . $payload[Cst::SERVICE_NAME_KEY];
47
+            $elemToDelete = "services.".$payload[Cst::SERVICE_NAME_KEY];
48 48
             $this->deleteElementInDockerCompose($elemToDelete, $dockerComposePath, $output);
49 49
 
50 50
             foreach ($payload[Cst::NAMED_VOLUMES_KEY] as $v) {
51
-                $elemToDelete = "volumes." . $v;
51
+                $elemToDelete = "volumes.".$v;
52 52
                 $this->deleteElementInDockerCompose($elemToDelete, $dockerComposePath, $output);
53 53
             }
54 54
         }
Please login to merge, or discard this patch.
src/Command/Utils.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
         $serviceName = $p[Cst::SERVICE_NAME_KEY] ?? "";
38 38
         if (empty($serviceName)) {
39
-            $output->writeln("   ⨯ payload error: empty " . Cst::SERVICE_NAME_KEY);
39
+            $output->writeln("   ⨯ payload error: empty ".Cst::SERVICE_NAME_KEY);
40 40
             exit(1);
41 41
         }
42 42
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
             return $formattedPayload;
102 102
         } else {
103
-            $output->writeln("  ⨯ payload error: empty " . Cst::SERVICE_KEY);
103
+            $output->writeln("  ⨯ payload error: empty ".Cst::SERVICE_KEY);
104 104
             exit(1);
105 105
         }
106 106
 
Please login to merge, or discard this patch.
src/Command/DefaultCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         try {
40 40
             $command = $this->getApplication()->find($event);
41 41
         } catch (CommandNotFoundException $e) {
42
-            $output->writeln("unrecognized event : " . $event);
42
+            $output->writeln("unrecognized event : ".$event);
43 43
             exit(0);
44 44
         }
45 45
 
@@ -47,12 +47,12 @@  discard block
 block discarded – undo
47 47
             'payload' => $input->getArgument('payload'),
48 48
         );
49 49
         $arrayInput = new ArrayInput($args);
50
-        $output->writeln("event=" . $event);
50
+        $output->writeln("event=".$event);
51 51
 
52 52
         try {
53 53
             $command->run($arrayInput, $output);
54 54
         } catch (\Exception $e) {
55
-            $output->writeln("error while running event : " . $event);
55
+            $output->writeln("error while running event : ".$event);
56 56
             // $output->writeln($e);
57 57
             exit(0);
58 58
         }
Please login to merge, or discard this patch.
src/Command/NewDockerServiceInfoCommand.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
         $yml = Yaml::dump($formattedPayload, 256, 4, Yaml::DUMP_OBJECT_AS_MAP);
28 28
         file_put_contents(Cst::TMP_YML_PATH, $yml);
29 29
 
30
-        $dockerComposePath = getenv('PHEROMONE_CONTAINER_PROJECT_DIR') . '/docker-compose.yml';
30
+        $dockerComposePath = getenv('PHEROMONE_CONTAINER_PROJECT_DIR').'/docker-compose.yml';
31 31
 
32 32
         $yamlToolsCmd = array("yaml-tools", "merge", "-i", $dockerComposePath, Cst::TMP_YML_PATH, "-o", $dockerComposePath);
33 33
         $process = Utils::runAndGetProcess($yamlToolsCmd, $output);
Please login to merge, or discard this patch.
src/Aenthill/Exception/ContainerProjectDirEnvVariableEmptyException.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 function __construct()
12 12
     {
13
-        parent::__construct('environment variable ' . PheromoneEnum::PHEROMONE_CONTAINER_PROJECT_DIR . ' is empty');
13
+        parent::__construct('environment variable '.PheromoneEnum::PHEROMONE_CONTAINER_PROJECT_DIR.' is empty');
14 14
     }
15 15
 }
Please login to merge, or discard this patch.
src/Aenthill/Hermes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      */
15 15
     public static function dispatch(string $event, ?string $payload = null): int
16 16
     {
17
-        $command = Hermes::BINARY . " dispatch $event";
17
+        $command = Hermes::BINARY." dispatch $event";
18 18
         if (!empty($payload)) {
19 19
             $command .= " $payload";
20 20
         }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public static function reply(string $event, ?string $payload = null): int
35 35
     {
36
-        $command = Hermes::BINARY . " reply $event";
36
+        $command = Hermes::BINARY." reply $event";
37 37
         if (!empty($payload)) {
38 38
             $command .= " $payload";
39 39
         }
Please login to merge, or discard this patch.
src/Aenthill/Hercule.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
     public static function setHandledEvents(array $events): int
15 15
     {
16
-        $command = Hercule::BINARY . ' set:handled-events';
16
+        $command = Hercule::BINARY.' set:handled-events';
17 17
         foreach ($events as $event) {
18 18
             $command .= " $event";
19 19
         }
Please login to merge, or discard this patch.
src/DockerCompose/DockerCompose.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,14 +36,14 @@  discard block
 block discarded – undo
36 36
         }
37 37
 
38 38
         $finder = new Finder();
39
-        $dockerComposeFileFilter = function (\SplFileInfo $file) {
39
+        $dockerComposeFileFilter = function(\SplFileInfo $file) {
40 40
             return $file->isFile() && preg_match('/^docker-compose(.)*\.(yaml|yml)$/', $file->getFilename());
41 41
         };
42 42
         $finder->files()->filter($dockerComposeFileFilter)->in($containerProjectDir)->depth('== 0');
43 43
 
44 44
         if (!$finder->hasResults()) {
45 45
             $this->log->infoln("no docker-compose file found, let's create it");
46
-            $this->createDockerComposeFile($containerProjectDir . '/docker-compose.yml');
46
+            $this->createDockerComposeFile($containerProjectDir.'/docker-compose.yml');
47 47
             return;
48 48
         }
49 49
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         }
54 54
 
55 55
         if (count($this->files) === 1) {
56
-            $this->log->infoln($this->files[0]->getFilename() . ' has been found');
56
+            $this->log->infoln($this->files[0]->getFilename().' has been found');
57 57
             return;
58 58
         }
59 59
 
@@ -71,6 +71,6 @@  discard block
 block discarded – undo
71 71
 
72 72
         $file = new DockerComposeFile(new \SplFileInfo($path));
73 73
         $this->files[] = $file;
74
-        $this->log->infoln($file->getFilename() . ' was successfully created!');
74
+        $this->log->infoln($file->getFilename().' was successfully created!');
75 75
     }
76 76
 }
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
@@ -1,7 +1,7 @@
 block discarded – undo
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 Symfony\Component\Console\Application;
7 7
 use TheAentMachine\AentDockerCompose\Command\RootCommand;
Please login to merge, or discard this patch.