@@ -61,16 +61,16 @@ |
||
61 | 61 | */ |
62 | 62 | public function dockerComposeServiceSerialize(Service $service): array |
63 | 63 | { |
64 | - $portMap = function (array $port): string { |
|
65 | - return $port['source'] . ':' . $port['target']; |
|
64 | + $portMap = function(array $port): string { |
|
65 | + return $port['source'].':'.$port['target']; |
|
66 | 66 | }; |
67 | - $labelMap = function (string $key, array $label): string { |
|
68 | - return $key . '=' . $label['value']; |
|
67 | + $labelMap = function(string $key, array $label): string { |
|
68 | + return $key.'='.$label['value']; |
|
69 | 69 | }; |
70 | - $envMap = function (string $key, array $env): string { |
|
71 | - return $key . '=' . $env['value']; |
|
70 | + $envMap = function(string $key, array $env): string { |
|
71 | + return $key.'='.$env['value']; |
|
72 | 72 | }; |
73 | - $jsonSerializeMap = function (\JsonSerializable $obj): array { |
|
73 | + $jsonSerializeMap = function(\JsonSerializable $obj): array { |
|
74 | 74 | return $obj->jsonSerialize(); |
75 | 75 | }; |
76 | 76 | $dockerService = array( |
@@ -29,22 +29,22 @@ |
||
29 | 29 | foreach ($dockerComposeFilePathnames as $file) { |
30 | 30 | $ymlData = Yaml::parseFile($file); |
31 | 31 | if (array_key_exists('serviceName', $ymlData) && array_key_exists($payload['serviceName'], $ymlData['services'])) { |
32 | - $toDelete = 'services.' . $payload['serviceName']; |
|
32 | + $toDelete = 'services.'.$payload['serviceName']; |
|
33 | 33 | $question = $this->getDeleteConfirmationQuestion($toDelete); |
34 | 34 | $doDelete = $helper->ask($this->input, $this->output, $question); |
35 | 35 | if ($doDelete) { |
36 | - $this->log->info('deleting ' . $toDelete . ' in ' . $file); |
|
36 | + $this->log->info('deleting '.$toDelete.' in '.$file); |
|
37 | 37 | YamlTools::delete($toDelete, $file, $file); |
38 | 38 | } |
39 | 39 | } |
40 | 40 | if (array_key_exists('namedVolumes', $payload) && array_key_exists('volumes', $ymlData)) { |
41 | 41 | foreach ($payload['namedVolumes'] as $namedVolume) { |
42 | 42 | if (array_key_exists($namedVolume, $ymlData['volumes'])) { |
43 | - $toDelete = 'volumes.' . $namedVolume; |
|
43 | + $toDelete = 'volumes.'.$namedVolume; |
|
44 | 44 | $question = $this->getDeleteConfirmationQuestion($toDelete); |
45 | 45 | $doDelete = $helper->ask($this->input, $this->output, $question); |
46 | 46 | if ($doDelete) { |
47 | - $this->log->info('deleting ' . $toDelete . ' in ' . $file); |
|
47 | + $this->log->info('deleting '.$toDelete.' in '.$file); |
|
48 | 48 | YamlTools::delete($toDelete, $file, $file); |
49 | 49 | } |
50 | 50 | } |
@@ -6,7 +6,7 @@ |
||
6 | 6 | |
7 | 7 | class YamlTools |
8 | 8 | { |
9 | - public const TMP_YAML_FILE = __DIR__ . '/tmp.yml'; |
|
9 | + public const TMP_YAML_FILE = __DIR__.'/tmp.yml'; |
|
10 | 10 | |
11 | 11 | /** |
12 | 12 | * Merge the content of $inputFile2 with $inputFile1's one, then write it into $outputFile (or stdout if empty) |