@@ -10,6 +10,6 @@ |
||
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 | } |
@@ -13,7 +13,7 @@ |
||
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; |
@@ -38,7 +38,7 @@ |
||
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 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | ->ask(); |
35 | 35 | |
36 | 36 | if ($doDelete) { |
37 | - $this->log->debug('deleting ' . implode('->', $elemToDelete) . ' in ' . $file); |
|
37 | + $this->log->debug('deleting '.implode('->', $elemToDelete).' in '.$file); |
|
38 | 38 | YamlTools::deleteYamlItem($elemToDelete, $file); |
39 | 39 | } |
40 | 40 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | ->ask(); |
51 | 51 | |
52 | 52 | if ($doDelete) { |
53 | - $this->log->debug('deleting ' . implode('->', $elemToDelete) . ' in ' . $file); |
|
53 | + $this->log->debug('deleting '.implode('->', $elemToDelete).' in '.$file); |
|
54 | 54 | YamlTools::deleteYamlItem($elemToDelete, $file); |
55 | 55 | } |
56 | 56 | } |
@@ -37,21 +37,21 @@ discard block |
||
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 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | { |
80 | 80 | // TODO ask questions about version and so on! |
81 | 81 | $fileSystem = new Filesystem(); |
82 | - $fileSystem->dumpFile($path, "version: '" . self::VERSION . "'"); |
|
82 | + $fileSystem->dumpFile($path, "version: '".self::VERSION."'"); |
|
83 | 83 | |
84 | 84 | $dirInfo = new \SplFileInfo(\dirname($path)); |
85 | 85 | chown($path, $dirInfo->getOwner()); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | |
88 | 88 | $file = new DockerComposeFile(new \SplFileInfo($path)); |
89 | 89 | $this->files[] = $file; |
90 | - $this->log->info($file->getFilename() . ' was successfully created!'); |
|
90 | + $this->log->info($file->getFilename().' was successfully created!'); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | /** |
@@ -97,20 +97,20 @@ discard block |
||
97 | 97 | */ |
98 | 98 | public static function dockerComposeServiceSerialize(Service $service, string $version = self::VERSION): array |
99 | 99 | { |
100 | - $portMap = function (array $port): string { |
|
101 | - return $port['source'] . ':' . $port['target']; |
|
100 | + $portMap = function(array $port): string { |
|
101 | + return $port['source'].':'.$port['target']; |
|
102 | 102 | }; |
103 | - $labelMap = function (array $label): string { |
|
103 | + $labelMap = function(array $label): string { |
|
104 | 104 | return $label['value']; |
105 | 105 | }; |
106 | - $envMap = function (EnvVariable $e): string { |
|
106 | + $envMap = function(EnvVariable $e): string { |
|
107 | 107 | return $e->getValue(); |
108 | 108 | }; |
109 | 109 | /** |
110 | 110 | * @param NamedVolume|BindVolume|TmpfsVolume $v |
111 | 111 | * @return array |
112 | 112 | */ |
113 | - $volumeMap = function ($v): array { |
|
113 | + $volumeMap = function($v): array { |
|
114 | 114 | $array = [ |
115 | 115 | 'type' => $v->getType(), |
116 | 116 | 'source' => $v->getSource(), |