Completed
Push — master ( 3bb399...1d27bd )
by Sebastian
03:10
created
src/Backup/Crypter/Abstraction.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
         $crypt = $this->execute($target);
34 34
         $name  = strtolower(get_class($this));
35 35
 
36
-        $result->debug($name . ':' . $this->getExecutable($target)->getCommandPrintable());
36
+        $result->debug($name.':'.$this->getExecutable($target)->getCommandPrintable());
37 37
 
38 38
         if (!$crypt->isSuccessful()) {
39
-            throw new Exception($name . ' failed:' . PHP_EOL . $crypt->getStdErr());
39
+            throw new Exception($name.' failed:'.PHP_EOL.$crypt->getStdErr());
40 40
         }
41 41
     }
42 42
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     public function simulate(Target $target, Result $result)
50 50
     {
51 51
         $result->debug(
52
-            'execute encryption:' . PHP_EOL .
52
+            'execute encryption:'.PHP_EOL.
53 53
             $this->getExecutable($target)->getCommandPrintable()
54 54
         );
55 55
     }
Please login to merge, or discard this patch.
src/Backup/Crypter/Mcrypt.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -115,12 +115,12 @@
 block discarded – undo
115 115
     {
116 116
         $executable = new Executable\Mcrypt((string)$this->pathToMcrypt);
117 117
         $executable->useAlgorithm($this->algorithm)
118
-                   ->useKey($this->key)
119
-                   ->useKeyFile($this->keyFile)
120
-                   ->useConfig($this->config)
121
-                   ->useHash($this->hash)
122
-                   ->saveAt($target->getPathname())
123
-                   ->deleteUncrypted(!$this->keepUncrypted);
118
+                    ->useKey($this->key)
119
+                    ->useKeyFile($this->keyFile)
120
+                    ->useConfig($this->config)
121
+                    ->useHash($this->hash)
122
+                    ->saveAt($target->getPathname())
123
+                    ->deleteUncrypted(!$this->keepUncrypted);
124 124
         return $executable;
125 125
     }
126 126
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
      */
114 114
     protected function createExecutable(Target $target) : Executable
115 115
     {
116
-        $executable = new Executable\Mcrypt((string)$this->pathToMcrypt);
116
+        $executable = new Executable\Mcrypt((string) $this->pathToMcrypt);
117 117
         $executable->useAlgorithm($this->algorithm)
118 118
                    ->useKey($this->key)
119 119
                    ->useKeyFile($this->keyFile)
Please login to merge, or discard this patch.
src/Backup/Source/Mongodump.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -176,13 +176,13 @@
 block discarded – undo
176 176
     {
177 177
         $executable = new Executable\Mongodump($this->pathToMongodump);
178 178
         $executable->dumpToDirectory($this->getDumpDir($target))
179
-                   ->useIpv6($this->useIPv6)
180
-                   ->useHost($this->host)
181
-                   ->credentials($this->user, $this->password, $this->authenticationDatabase)
182
-                   ->dumpDatabases($this->databases)
183
-                   ->dumpCollections($this->collections)
184
-                   ->excludeCollections($this->excludeCollections)
185
-                   ->excludeCollectionsWithPrefix($this->excludeCollectionsWithPrefix);
179
+                    ->useIpv6($this->useIPv6)
180
+                    ->useHost($this->host)
181
+                    ->credentials($this->user, $this->password, $this->authenticationDatabase)
182
+                    ->dumpDatabases($this->databases)
183
+                    ->dumpCollections($this->collections)
184
+                    ->excludeCollections($this->excludeCollections)
185
+                    ->excludeCollectionsWithPrefix($this->excludeCollectionsWithPrefix);
186 186
         return $executable;
187 187
     }
188 188
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         $result->debug($mongodump->getCmdPrintable());
161 161
 
162 162
         if (!$mongodump->isSuccessful()) {
163
-            throw new Exception('mongodump failed: ' . $mongodump->getStdErr());
163
+            throw new Exception('mongodump failed: '.$mongodump->getStdErr());
164 164
         }
165 165
 
166 166
         return $this->createStatus($target);
@@ -205,6 +205,6 @@  discard block
 block discarded – undo
205 205
      */
206 206
     public function getDumpDir(Target $target) : string
207 207
     {
208
-        return $target->getPath() . '/dump';
208
+        return $target->getPath().'/dump';
209 209
     }
210 210
 }
Please login to merge, or discard this patch.
src/Backup/Source/Elasticdump.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -126,10 +126,10 @@
 block discarded – undo
126 126
     {
127 127
             $executable = new Executable\Elasticdump($this->pathToElasticdump);
128 128
             $executable->useHost($this->host)
129
-                       ->credentials($this->user, $this->password)
130
-                       ->dumpIndex($this->index)
131
-                       ->dumpType($this->type)
132
-                       ->dumpTo($target->getPathnamePlain());
129
+                        ->credentials($this->user, $this->password)
130
+                        ->dumpIndex($this->index)
131
+                        ->dumpType($this->type)
132
+                        ->dumpTo($target->getPathnamePlain());
133 133
         return $executable;
134 134
     }
135 135
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
         $result->debug($elasticdump->getCmdPrintable());
110 110
 
111 111
         if (!$elasticdump->isSuccessful()) {
112
-            throw new Exception('elasticdump failed: ' . $elasticdump->getStdErr());
112
+            throw new Exception('elasticdump failed: '.$elasticdump->getStdErr());
113 113
         }
114 114
 
115 115
         return $this->createStatus($target);
Please login to merge, or discard this patch.
src/Backup/Source/Rsync.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -74,11 +74,11 @@
 block discarded – undo
74 74
             );
75 75
         } else {
76 76
             $executable->fromHost($this->host)
77
-                       ->fromUser($this->user)
78
-                       ->fromPath($this->path)
79
-                       ->toPath($this->getRsyncLocation($target, true))
80
-                       ->removeDeleted($this->delete)
81
-                       ->exclude($this->excludes);
77
+                        ->fromUser($this->user)
78
+                        ->fromPath($this->path)
79
+                        ->toPath($this->getRsyncLocation($target, true))
80
+                        ->removeDeleted($this->delete)
81
+                        ->exclude($this->excludes);
82 82
         }
83 83
         return $executable;
84 84
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         $result->debug($rsync->getCmd());
51 51
 
52 52
         if (!$rsync->isSuccessful()) {
53
-            throw new Exception('rsync failed:' . $rsync->getStdErr());
53
+            throw new Exception('rsync failed:'.$rsync->getStdErr());
54 54
         }
55 55
 
56 56
         return $this->createStatus($target);
Please login to merge, or discard this patch.
src/Backup/Source/Mysqldump.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -227,20 +227,20 @@
 block discarded – undo
227 227
     {
228 228
         $executable = new Executable\Mysqldump($this->pathToMysqldump);
229 229
         $executable->credentials($this->user, $this->password)
230
-                   ->useHost($this->host)
231
-                   ->useQuickMode($this->quick)
232
-                   ->lockTables($this->lockTables)
233
-                   ->dumpBlobsHexadecimal($this->hexBlob)
234
-                   ->useCompression($this->compress)
235
-                   ->useExtendedInsert($this->extendedInsert)
236
-                   ->dumpTables($this->tables)
237
-                   ->singleTransaction($this->singleTransaction)
238
-                   ->dumpDatabases($this->databases)
239
-                   ->ignoreTables($this->ignoreTables)
240
-                   ->produceFilePerTable($this->filePerTable)
241
-                   ->dumpNoData($this->noData)
242
-                   ->dumpStructureOnly($this->structureOnly)
243
-                   ->dumpTo($this->getDumpTarget($target));
230
+                    ->useHost($this->host)
231
+                    ->useQuickMode($this->quick)
232
+                    ->lockTables($this->lockTables)
233
+                    ->dumpBlobsHexadecimal($this->hexBlob)
234
+                    ->useCompression($this->compress)
235
+                    ->useExtendedInsert($this->extendedInsert)
236
+                    ->dumpTables($this->tables)
237
+                    ->singleTransaction($this->singleTransaction)
238
+                    ->dumpDatabases($this->databases)
239
+                    ->ignoreTables($this->ignoreTables)
240
+                    ->produceFilePerTable($this->filePerTable)
241
+                    ->dumpNoData($this->noData)
242
+                    ->dumpStructureOnly($this->structureOnly)
243
+                    ->dumpTo($this->getDumpTarget($target));
244 244
         // if compression is active and commands can be piped
245 245
         if ($this->isHandlingCompression($target)) {
246 246
             $executable->compressOutput($target->getCompression());
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         $result->debug($this->getExecutable($target)->getCommandPrintable());
212 212
 
213 213
         if (!$mysqldump->isSuccessful()) {
214
-            throw new Exception('mysqldump failed:' . $mysqldump->getStdErr());
214
+            throw new Exception('mysqldump failed:'.$mysqldump->getStdErr());
215 215
         }
216 216
 
217 217
         return $this->createStatus($target);
@@ -290,6 +290,6 @@  discard block
 block discarded – undo
290 290
      */
291 291
     private function getDumpTarget(Target $target) : string
292 292
     {
293
-        return $target->getPathnamePlain() . ($this->filePerTable ? '.dump' : '');
293
+        return $target->getPathnamePlain().($this->filePerTable ? '.dump' : '');
294 294
     }
295 295
 }
Please login to merge, or discard this patch.
src/Backup/Source/Redis.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -124,9 +124,9 @@
 block discarded – undo
124 124
     {
125 125
         $executable = new Executable\RedisCli($this->pathToRedisCli);
126 126
         $executable->backup()
127
-                   ->useHost($this->host)
128
-                   ->usePort($this->port)
129
-                   ->usePassword($this->password);
127
+                    ->useHost($this->host)
128
+                    ->usePort($this->port)
129
+                    ->usePassword($this->password);
130 130
         return $executable;
131 131
     }
132 132
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         $saveResult          = $this->runCommand($redisSave);
106 106
         $result->debug($this->getExecutable($target)->getCommandPrintable());
107 107
         if (!$saveResult->isSuccessful()) {
108
-            throw new Exception('redis-cli BGSAVE failed:' . $saveResult->getStdErr());
108
+            throw new Exception('redis-cli BGSAVE failed:'.$saveResult->getStdErr());
109 109
         }
110 110
         // check if the save process is finished
111 111
         $this->isDumpCreatedYet($lastBackupTimestamp, $redisLast);
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     private function copyDumpToTarget(Target $target) : string
193 193
     {
194 194
         if (!file_exists($this->pathToRedisData)) {
195
-            throw new Exception('Redis data not found at: \'' . $this->pathToRedisCli . '\'');
195
+            throw new Exception('Redis data not found at: \''.$this->pathToRedisCli.'\'');
196 196
         }
197 197
         $targetFile = $target->getPathnamePlain();
198 198
         copy($this->pathToRedisData, $targetFile);
Please login to merge, or discard this patch.
src/Backup/Source/SimulatorExecutable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      */
28 28
     public function simulate(Target $target, Result $result) : Status
29 29
     {
30
-        $result->debug('backup data:' . PHP_EOL . $this->getExecutable($target)->getCommandPrintable());
30
+        $result->debug('backup data:'.PHP_EOL.$this->getExecutable($target)->getCommandPrintable());
31 31
 
32 32
         return $this->createStatus($target);
33 33
     }
Please login to merge, or discard this patch.
src/Backup/Source/Tar.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -152,10 +152,10 @@
 block discarded – undo
152 152
 
153 153
         $executable = new Executable\Tar($this->pathToTar);
154 154
         $executable->archiveDirectory($this->path)
155
-                   ->useCompression($this->compression)
156
-                   ->ignoreFailedRead($this->ignoreFailedRead)
157
-                   ->removeSourceDirectory($this->removeSourceDir)
158
-                   ->archiveTo($this->pathToArchive);
155
+                    ->useCompression($this->compression)
156
+                    ->ignoreFailedRead($this->ignoreFailedRead)
157
+                    ->removeSourceDirectory($this->removeSourceDir)
158
+                    ->archiveTo($this->pathToArchive);
159 159
         return $executable;
160 160
     }
161 161
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
         $result->debug($tar->getCmdPrintable());
111 111
 
112 112
         if ($this->tarFailed($tar)) {
113
-            throw new Exception('tar failed: ' . $tar->getStdErr());
113
+            throw new Exception('tar failed: '.$tar->getStdErr());
114 114
         }
115 115
 
116 116
         return $this->createStatus($target);
Please login to merge, or discard this patch.