Completed
Pull Request — master (#13)
by
unknown
02:37
created
src/DockerCompose/DockerComposeService.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -41,21 +41,21 @@  discard block
 block discarded – undo
41 41
         }
42 42
 
43 43
         $finder = new Finder();
44
-        $dockerComposeFileFilter = function (\SplFileInfo $file) {
44
+        $dockerComposeFileFilter = function(\SplFileInfo $file) {
45 45
             return $file->isFile() && preg_match('/^docker-compose(.)*\.(yaml|yml)$/', $file->getFilename());
46 46
         };
47 47
         $finder->files()->filter($dockerComposeFileFilter)->in($containerProjectDir)->depth('== 0');
48 48
 
49 49
         if (!$finder->hasResults()) {
50 50
             $this->log->info("no docker-compose file found, let's create it");
51
-            $this->createDockerComposeFile($containerProjectDir . '/docker-compose.yml');
51
+            $this->createDockerComposeFile($containerProjectDir.'/docker-compose.yml');
52 52
             return;
53 53
         }
54 54
 
55 55
         /** @var \SplFileInfo $file */
56 56
         foreach ($finder as $file) {
57 57
             $this->files[] = new DockerComposeFile($file);
58
-            $this->log->info($file->getFilename() . ' has been found');
58
+            $this->log->info($file->getFilename().' has been found');
59 59
         }
60 60
 
61 61
         /*if (count($this->files) === 1) {
@@ -89,12 +89,12 @@  discard block
 block discarded – undo
89 89
     {
90 90
         // TODO ask questions about version and so on!
91 91
         $fp = fopen($path, 'w+b');
92
-        fwrite($fp, "version: '" . self::VERSION . "'");
92
+        fwrite($fp, "version: '".self::VERSION."'");
93 93
         fclose($fp);
94 94
 
95 95
         $file = new DockerComposeFile(new \SplFileInfo($path));
96 96
         $this->files[] = $file;
97
-        $this->log->info($file->getFilename() . ' was successfully created!');
97
+        $this->log->info($file->getFilename().' was successfully created!');
98 98
     }
99 99
 
100 100
     /**
@@ -104,20 +104,20 @@  discard block
 block discarded – undo
104 104
      */
105 105
     public static function dockerComposeServiceSerialize(Service $service, string $version = self::VERSION): array
106 106
     {
107
-        $portMap = function (array $port): string {
108
-            return $port['source'] . ':' . $port['target'];
107
+        $portMap = function(array $port): string {
108
+            return $port['source'].':'.$port['target'];
109 109
         };
110
-        $labelMap = function (array $label): string {
110
+        $labelMap = function(array $label): string {
111 111
             return $label['value'];
112 112
         };
113
-        $envMap = function (EnvVariable $e): string {
113
+        $envMap = function(EnvVariable $e): string {
114 114
             return $e->getValue();
115 115
         };
116 116
         /**
117 117
          * @param NamedVolume|BindVolume|TmpfsVolume $v
118 118
          * @return array
119 119
          */
120
-        $volumeMap = function ($v): array {
120
+        $volumeMap = function($v): array {
121 121
             $array = [
122 122
                 'type' => $v->getType(),
123 123
                 'source' => $v->getSource(),
Please login to merge, or discard this patch.