Completed
Pull Request — master (#18)
by Jindun
06:00
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/YamlTools/YamlTools.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
      */
47 47
     public static function mergeContentIntoFile(string $content, string $file): void
48 48
     {
49
-        $tmpFile = __DIR__ . '/tmp-yaml-tools-file.yml';
49
+        $tmpFile = __DIR__.'/tmp-yaml-tools-file.yml';
50 50
         $fileSystem = new Filesystem();
51 51
         $fileSystem->dumpFile($tmpFile, $content);
52 52
         self::mergeTwoFiles($file, $tmpFile);
Please login to merge, or discard this patch.
src/Command/DeleteServiceEventCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
                     ->ask();
35 35
 
36 36
                 if ($doDelete) {
37
-                    $this->log->debug('deleting ' . $elemToDelete . ' in ' . $file);
37
+                    $this->log->debug('deleting '.$elemToDelete.' in '.$file);
38 38
                     YamlTools::deleteYamlItem($elemToDelete, $file);
39 39
                 }
40 40
             }
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                             ->ask();
51 51
 
52 52
                         if ($doDelete) {
53
-                            $this->log->debug('deleting ' . $elemToDelete . ' in ' . $file);
53
+                            $this->log->debug('deleting '.$elemToDelete.' in '.$file);
54 54
                             YamlTools::deleteYamlItem($elemToDelete, $file);
55 55
                         }
56 56
                     }
Please login to merge, or discard this patch.
src/Command/RemoveEventCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 
39 39
                 if (!empty($toDelete)) {
40 40
                     foreach ($toDelete as $file) {
41
-                        $this->log->info('Deleting ' . $file);
41
+                        $this->log->info('Deleting '.$file);
42 42
                         unlink($file);
43 43
                     }
44 44
                 }
Please login to merge, or discard this patch.
src/DockerCompose/DockerComposeService.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -37,21 +37,21 @@  discard block
 block discarded – undo
37 37
         $containerProjectDir = Pheromone::getContainerProjectDirectory();
38 38
 
39 39
         $finder = new Finder();
40
-        $dockerComposeFileFilter = function (\SplFileInfo $file) {
40
+        $dockerComposeFileFilter = function(\SplFileInfo $file) {
41 41
             return $file->isFile() && preg_match('/^docker-compose(.)*\.(yaml|yml)$/', $file->getFilename());
42 42
         };
43 43
         $finder->files()->filter($dockerComposeFileFilter)->in($containerProjectDir)->depth('== 0');
44 44
 
45 45
         if (!$finder->hasResults()) {
46 46
             $this->log->info("no docker-compose file found, let's create it");
47
-            $this->createDockerComposeFile($containerProjectDir . '/docker-compose.yml');
47
+            $this->createDockerComposeFile($containerProjectDir.'/docker-compose.yml');
48 48
             return;
49 49
         }
50 50
 
51 51
         /** @var \SplFileInfo $file */
52 52
         foreach ($finder as $file) {
53 53
             $this->files[] = new DockerComposeFile($file);
54
-            $this->log->info($file->getFilename() . ' has been found');
54
+            $this->log->info($file->getFilename().' has been found');
55 55
         }
56 56
     }
57 57
 
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
     {
81 81
         // TODO ask questions about version and so on!
82 82
         $fileSystem = new Filesystem();
83
-        $fileSystem->dumpFile($path, "version: '" . self::VERSION . "'");
83
+        $fileSystem->dumpFile($path, "version: '".self::VERSION."'");
84 84
         $fileSystem->chown($path, fileowner(\dirname($path)));
85 85
         $fileSystem->chgrp($path, filegroup(\dirname($path)));
86 86
 
87 87
         $file = new DockerComposeFile(new \SplFileInfo($path));
88 88
         $this->files[] = $file;
89
-        $this->log->info($file->getFilename() . ' was successfully created!');
89
+        $this->log->info($file->getFilename().' was successfully created!');
90 90
     }
91 91
 
92 92
     /**
@@ -96,20 +96,20 @@  discard block
 block discarded – undo
96 96
      */
97 97
     public static function dockerComposeServiceSerialize(Service $service, string $version = self::VERSION): array
98 98
     {
99
-        $portMap = function (array $port): string {
100
-            return $port['source'] . ':' . $port['target'];
99
+        $portMap = function(array $port): string {
100
+            return $port['source'].':'.$port['target'];
101 101
         };
102
-        $labelMap = function (array $label): string {
102
+        $labelMap = function(array $label): string {
103 103
             return $label['value'];
104 104
         };
105
-        $envMap = function (EnvVariable $e): string {
105
+        $envMap = function(EnvVariable $e): string {
106 106
             return $e->getValue();
107 107
         };
108 108
         /**
109 109
          * @param NamedVolume|BindVolume|TmpfsVolume $v
110 110
          * @return array
111 111
          */
112
-        $volumeMap = function ($v): array {
112
+        $volumeMap = function($v): array {
113 113
             $array = [
114 114
                 'type' => $v->getType(),
115 115
                 'source' => $v->getSource(),
@@ -180,8 +180,8 @@  discard block
 block discarded – undo
180 180
      */
181 181
     public static function mergeContentInDockerComposeFiles($content, array $files, bool $checkValidity = true): void
182 182
     {
183
-        $tmpFile = __DIR__ . '/tmp-merge-content-file.yml';
184
-        $tmpMergedFile = __DIR__ . '/tmp-merged-content-file.yml';
183
+        $tmpFile = __DIR__.'/tmp-merge-content-file.yml';
184
+        $tmpMergedFile = __DIR__.'/tmp-merged-content-file.yml';
185 185
 
186 186
         if (\is_array($content)) {
187 187
             $content = Yaml::dump($content, 256, 2, Yaml::DUMP_OBJECT_AS_MAP);
Please login to merge, or discard this patch.