Completed
Pull Request — master (#12)
by ophelie
02:29
created
src/DockerCompose/Manager/ComposeManager.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -69,12 +69,12 @@
 block discarded – undo
69 69
         );
70 70
     }
71 71
 
72
-     /**
73
-     * Stop service containers
74
-     *
75
-     * @param mixed   $composeFiles  The compose files names
76
-     * @param string  $signal        Optionnal to precise SIGNAL to send to the container for SIGKILL replacement.
77
-     */
72
+        /**
73
+         * Stop service containers
74
+         *
75
+         * @param mixed   $composeFiles  The compose files names
76
+         * @param string  $signal        Optionnal to precise SIGNAL to send to the container for SIGKILL replacement.
77
+         */
78 78
     public function kill($composeFiles = array(), $signal = 'SIGKILL')
79 79
     {
80 80
         $command = 'kill';
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         $command = 'kill';
81 81
 
82 82
         if ($signal !== 'SIGKILL') {
83
-            $command .= ' -s ' . $signal;
83
+            $command .= ' -s '.$signal;
84 84
         }
85 85
 
86 86
         return $this->processResult(
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
      */
169 169
     public function run($service, $command, $composeFiles = array())
170 170
     {
171
-        $command = 'run --rm ' . $service . ' ' . $command;
171
+        $command = 'run --rm '.$service.' '.$command;
172 172
         $result = $this->execute(
173 173
             $this->formatCommand($command, $this->createComposeFileCollection($composeFiles))
174 174
         );
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
     {
204 204
         $command = $this->formatCommand('ps', $this->createComposeFileCollection($composeFiles));
205 205
 
206
-        $command = 'for CONTAINER in $(' . $command . ' -q); ';
206
+        $command = 'for CONTAINER in $('.$command.' -q); ';
207 207
         $command .= 'do echo "$(docker inspect --format \' {{ .Name }} \' $CONTAINER)\t';
208 208
         $command .= '$(docker inspect --format \' {{ .NetworkSettings.IPAddress }} \' $CONTAINER)"; done';
209 209
 
@@ -275,11 +275,11 @@  discard block
 block discarded – undo
275 275
 
276 276
         # Add project name, and network options
277 277
         if ($composeFiles->getProjectName() != null) {
278
-            $project = ' --project-name ' . $composeFiles->getProjectName();
278
+            $project = ' --project-name '.$composeFiles->getProjectName();
279 279
             if ($composeFiles->isNetworking()) {
280 280
                 $networking = ' --x-networking';
281 281
                 if ($composeFiles->getNetworkDriver() != null) {
282
-                    $networkDriver = ' --x-network-driver ' . $composeFiles->getNetworkDriver();
282
+                    $networkDriver = ' --x-network-driver '.$composeFiles->getNetworkDriver();
283 283
                 }
284 284
             }
285 285
         }
@@ -287,10 +287,10 @@  discard block
 block discarded – undo
287 287
         # Add files names
288 288
         $preciseFiles = '';
289 289
         foreach ($composeFiles->getAll() as $composeFile) {
290
-            $preciseFiles .= ' -f ' . $composeFile->getFileName();
290
+            $preciseFiles .= ' -f '.$composeFile->getFileName();
291 291
         }
292 292
 
293
-        $command = 'docker-compose' . $preciseFiles . $networking . $networkDriver . $project . ' ' . $subcommand;
293
+        $command = 'docker-compose'.$preciseFiles.$networking.$networkDriver.$project.' '.$subcommand;
294 294
 
295 295
         return $command;
296 296
     }
Please login to merge, or discard this patch.
src/DockerCompose/ComposeFile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
             $this->setFileName($name);
29 29
         } else {
30 30
             throw new Exception(
31
-                'Invalid fileName definition "(' . gettype($name) . ') ' . var_export($name, true) . '"'
31
+                'Invalid fileName definition "('.gettype($name).') '.var_export($name, true).'"'
32 32
             );
33 33
         }
34 34
     }
Please login to merge, or discard this patch.
src/DockerCompose/ComposeFileCollection.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $args = func_get_arg(0);
40 40
 
41 41
         if (!is_array($args)) {
42
-            throw new \Exception('Invalid parameter "(' . gettype($args) . ')');
42
+            throw new \Exception('Invalid parameter "('.gettype($args).')');
43 43
         }
44 44
 
45 45
         foreach ($args as $composeFile) {
@@ -49,12 +49,12 @@  discard block
 block discarded – undo
49 49
                 $this->add(new ComposeFile($composeFile));
50 50
             } else {
51 51
                 throw new \Exception(
52
-                    'Invalid composeFile definition "(' . gettype(
52
+                    'Invalid composeFile definition "('.gettype(
53 53
                         $composeFile
54
-                    ) . ') ' . var_export(
54
+                    ).') '.var_export(
55 55
                         $composeFile,
56 56
                         true
57
-                    ) . '"'
57
+                    ).'"'
58 58
                 );
59 59
             }
60 60
         }
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     public function setNetworkDriver($networkDriver)
137 137
     {
138 138
         if ($networkDriver != 'overlay' && $networkDriver != 'bridge' && $networkDriver != 'host') {
139
-            throw new Exception($networkDriver . ' is not a valid driver.');
139
+            throw new Exception($networkDriver.' is not a valid driver.');
140 140
         }
141 141
 
142 142
         $this->networkDriver = $networkDriver;
Please login to merge, or discard this patch.