Completed
Push — master ( 1d6e1a...19a3cd )
by Sebastian
03:35
created
src/Backup/Source/XtraBackup.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -142,11 +142,11 @@
 block discarded – undo
142 142
         if (null == $this->executable) {
143 143
             $this->executable = new Executable\Innobackupex($this->pathToXtraBackup);
144 144
             $this->executable->useHost($this->host)
145
-                             ->credentials($this->user, $this->password)
146
-                             ->dumpDatabases($this->databases)
147
-                             ->including($this->include)
148
-                             ->dumpFrom($this->dataDir)
149
-                             ->dumpTo($this->getDumpDir($target));
145
+                                ->credentials($this->user, $this->password)
146
+                                ->dumpDatabases($this->databases)
147
+                                ->including($this->include)
148
+                                ->dumpFrom($this->dataDir)
149
+                                ->dumpTo($this->getDumpDir($target));
150 150
         }
151 151
 
152 152
         return $this->executable;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         $result->debug($this->getExecutable($target)->getCommandLinePrintable());
124 124
 
125 125
         if (!$innobackupex->wasSuccessful()) {
126
-            throw new Exception('XtraBackup failed: ' . $innobackupex->getStdErr());
126
+            throw new Exception('XtraBackup failed: '.$innobackupex->getStdErr());
127 127
         }
128 128
 
129 129
         return $this->createStatus($target);
@@ -170,6 +170,6 @@  discard block
 block discarded – undo
170 170
      */
171 171
     public function getDumpDir(Target $target)
172 172
     {
173
-        return $target->getPath() . '/dump';
173
+        return $target->getPath().'/dump';
174 174
     }
175 175
 }
Please login to merge, or discard this patch.
src/Backup/Source/Arangodump.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -160,13 +160,13 @@
 block discarded – undo
160 160
         if (null == $this->executable) {
161 161
             $this->executable = new Executable\Arangodump($this->pathToArangodump);
162 162
             $this->executable->useEndpoint($this->endpoint)
163
-                             ->credentials($this->username, $this->password)
164
-                             ->dumpDatabase($this->database)
165
-                             ->dumpCollections($this->collections)
166
-                             ->disableAuthentication($this->disableAuthentication)
167
-                             ->includeSystemCollections($this->includeSystemCollections)
168
-                             ->dumpData($this->dumpData)
169
-                             ->dumpTo($this->getDumpDir($target));
163
+                                ->credentials($this->username, $this->password)
164
+                                ->dumpDatabase($this->database)
165
+                                ->dumpCollections($this->collections)
166
+                                ->disableAuthentication($this->disableAuthentication)
167
+                                ->includeSystemCollections($this->includeSystemCollections)
168
+                                ->dumpData($this->dumpData)
169
+                                ->dumpTo($this->getDumpDir($target));
170 170
         }
171 171
 
172 172
         return $this->executable;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         $result->debug($this->getExecutable($target)->getCommandLinePrintable());
142 142
 
143 143
         if (!$arangodump->wasSuccessful()) {
144
-            throw new Exception('arangodump failed: ' . $arangodump->getStdErr());
144
+            throw new Exception('arangodump failed: '.$arangodump->getStdErr());
145 145
         }
146 146
 
147 147
         return $this->createStatus($target);
@@ -190,6 +190,6 @@  discard block
 block discarded – undo
190 190
      */
191 191
     public function getDumpDir(Target $target)
192 192
     {
193
-        return $target->getPath() . '/dump';
193
+        return $target->getPath().'/dump';
194 194
     }
195 195
 }
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
@@ -130,10 +130,10 @@
 block discarded – undo
130 130
         if (null == $this->executable) {
131 131
             $this->executable = new Executable\Elasticdump($this->pathToElasticdump);
132 132
             $this->executable->useHost($this->host)
133
-                             ->credentials($this->user, $this->password)
134
-                             ->dumpIndex($this->index)
135
-                             ->dumpType($this->type)
136
-                             ->dumpTo($target->getPathnamePlain());
133
+                                ->credentials($this->user, $this->password)
134
+                                ->dumpIndex($this->index)
135
+                                ->dumpType($this->type)
136
+                                ->dumpTo($target->getPathnamePlain());
137 137
         }
138 138
         return $this->executable;
139 139
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
         $result->debug($this->getExecutable($target)->getCommandLinePrintable());
112 112
 
113 113
         if (!$elasticdump->wasSuccessful()) {
114
-            throw new Exception('elasticdump failed: ' . $elasticdump->getStdErr());
114
+            throw new Exception('elasticdump failed: '.$elasticdump->getStdErr());
115 115
         }
116 116
 
117 117
         return $this->createStatus($target);
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
@@ -178,13 +178,13 @@
 block discarded – undo
178 178
         if (null == $this->executable) {
179 179
             $this->executable = new Executable\Mongodump($this->pathToMongodump);
180 180
             $this->executable->dumpToDirectory($this->getDumpDir($target))
181
-                             ->useIpv6($this->useIPv6)
182
-                             ->useHost($this->host)
183
-                             ->credentials($this->user, $this->password, $this->authenticationDatabase)
184
-                             ->dumpDatabases($this->databases)
185
-                             ->dumpCollections($this->collections)
186
-                             ->excludeCollections($this->excludeCollections)
187
-                             ->excludeCollectionsWithPrefix($this->excludeCollectionsWithPrefix);
181
+                                ->useIpv6($this->useIPv6)
182
+                                ->useHost($this->host)
183
+                                ->credentials($this->user, $this->password, $this->authenticationDatabase)
184
+                                ->dumpDatabases($this->databases)
185
+                                ->dumpCollections($this->collections)
186
+                                ->excludeCollections($this->excludeCollections)
187
+                                ->excludeCollectionsWithPrefix($this->excludeCollectionsWithPrefix);
188 188
         }
189 189
 
190 190
         return $this->executable;
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($this->getExecutable($target)->getCommandLinePrintable());
161 161
 
162 162
         if (!$mongodump->wasSuccessful()) {
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);
@@ -208,6 +208,6 @@  discard block
 block discarded – undo
208 208
      */
209 209
     public function getDumpDir(Target $target)
210 210
     {
211
-        return $target->getPath() . '/dump';
211
+        return $target->getPath().'/dump';
212 212
     }
213 213
 }
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
@@ -127,9 +127,9 @@
 block discarded – undo
127 127
         if (null == $this->executable) {
128 128
             $this->executable = new Executable\RedisCli($this->pathToRedisCli);
129 129
             $this->executable->backup()
130
-                             ->useHost($this->host)
131
-                             ->usePort($this->port)
132
-                             ->usePassword($this->password);
130
+                                ->useHost($this->host)
131
+                                ->usePort($this->port)
132
+                                ->usePassword($this->password);
133 133
         }
134 134
         return $this->executable;
135 135
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         $saveResult = $redisSave->run();
107 107
         $result->debug($this->getExecutable($target)->getCommandLinePrintable());
108 108
         if (!$saveResult->wasSuccessful()) {
109
-            throw new Exception('redis-cli BGSAVE failed:' . $saveResult->getStdErr());
109
+            throw new Exception('redis-cli BGSAVE failed:'.$saveResult->getStdErr());
110 110
         }
111 111
         // check if the save process is finished
112 112
         $this->isDumpCreatedYet($lastBackupTimestamp, $redisLast);
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
     private function copyDumpToTarget(Target $target)
196 196
     {
197 197
         if (!file_exists($this->pathToRedisData)) {
198
-            throw new Exception('Redis data not found at: \'' . $this->pathToRedisCli . '\'');
198
+            throw new Exception('Redis data not found at: \''.$this->pathToRedisCli.'\'');
199 199
         }
200 200
         $targetFile = $target->getPathnamePlain();
201 201
         copy($this->pathToRedisData, $targetFile);
Please login to merge, or discard this patch.
src/Cli/Executable/Pgdump.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -397,7 +397,7 @@
 block discarded – undo
397 397
      * Do not dump commands setting ownership.
398 398
      * --no-owner
399 399
      *
400
-     * @param $bool
400
+     * @param boolean $bool
401 401
      * @return \phpbu\App\Cli\Executable\Pgdump
402 402
      */
403 403
     public function dumpNoOwner($bool)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -453,8 +453,8 @@
 block discarded – undo
453 453
     protected function createProcess()
454 454
     {
455 455
         $process  = new Process();
456
-        $password = $this->password ? 'PGPASSWORD=' . escapeshellarg($this->password) . ' ' : '';
457
-        $cmd      = new Cmd($password . $this->binary);
456
+        $password = $this->password ? 'PGPASSWORD='.escapeshellarg($this->password).' ' : '';
457
+        $cmd      = new Cmd($password.$this->binary);
458 458
         $process->addCommand($cmd);
459 459
 
460 460
         // always disable password prompt
Please login to merge, or discard this patch.
src/Backup/Source/Pgdump.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -263,20 +263,20 @@
 block discarded – undo
263 263
         if (null == $this->executable) {
264 264
             $this->executable = new Executable\Pgdump($this->pathToPgdump);
265 265
             $this->executable->credentials($this->user, $this->password)
266
-                             ->useHost($this->host)
267
-                             ->usePort($this->port)
268
-                             ->dumpDatabase($this->database)
269
-                             ->dumpSchemas($this->schemas)
270
-                             ->excludeSchemas($this->excludeSchemas)
271
-                             ->dumpTables($this->tables)
272
-                             ->excludeTables($this->excludeTables)
273
-                             ->excludeTableData($this->excludeTableData)
274
-                             ->dumpSchemaOnly($this->schemaOnly)
275
-                             ->dumpDataOnly($this->dataOnly)
276
-                             ->dumpNoPrivileges($this->noPrivileges)
277
-                             ->dumpNoOwner($this->noOwner)
278
-                             ->dumpFormat($this->format)
279
-                             ->dumpTo($target->getPathnamePlain());
266
+                                ->useHost($this->host)
267
+                                ->usePort($this->port)
268
+                                ->dumpDatabase($this->database)
269
+                                ->dumpSchemas($this->schemas)
270
+                                ->excludeSchemas($this->excludeSchemas)
271
+                                ->dumpTables($this->tables)
272
+                                ->excludeTables($this->excludeTables)
273
+                                ->excludeTableData($this->excludeTableData)
274
+                                ->dumpSchemaOnly($this->schemaOnly)
275
+                                ->dumpDataOnly($this->dataOnly)
276
+                                ->dumpNoPrivileges($this->noPrivileges)
277
+                                ->dumpNoOwner($this->noOwner)
278
+                                ->dumpFormat($this->format)
279
+                                ->dumpTo($target->getPathnamePlain());
280 280
         }
281 281
         return $this->executable;
282 282
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -246,7 +246,7 @@
 block discarded – undo
246 246
         $result->debug($this->getExecutable($target)->getCommandLinePrintable());
247 247
 
248 248
         if (!$pgDump->wasSuccessful()) {
249
-            throw new Exception('mysqldump failed:' . $pgDump->getStdErr());
249
+            throw new Exception('mysqldump failed:'.$pgDump->getStdErr());
250 250
         }
251 251
 
252 252
         return $this->createStatus($target);
Please login to merge, or discard this patch.
src/Backup/Sync/AmazonS3v2.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,6 @@
 block discarded – undo
5 5
 use phpbu\App\Result;
6 6
 use phpbu\App\Backup\Sync;
7 7
 use phpbu\App\Backup\Target;
8
-use phpbu\App\Util\Arr;
9
-use phpbu\App\Util\Str;
10 8
 
11 9
 /**
12 10
  * Amazon S3 Sync
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     public function sync(Target $target, Result $result)
33 33
     {
34 34
         $sourcePath = $target->getPathname();
35
-        $targetPath = $this->path . $target->getFilename();
35
+        $targetPath = $this->path.$target->getFilename();
36 36
 
37 37
         $s3 = S3Client::factory(
38 38
             [
Please login to merge, or discard this patch.
src/Backup/Sync/AmazonS3v3.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,9 +68,9 @@
 block discarded – undo
68 68
     public function getUploadPath(Target $target)
69 69
     {
70 70
         return 's3://' . $this->bucket
71
-               . (substr($this->path, 0, 1) == '/' ? '' : '/')
72
-               . $this->path
73
-               . (substr($this->path, -1, 1) == '/' ? '' : '/')
74
-               . $target->getFilename();
71
+                . (substr($this->path, 0, 1) == '/' ? '' : '/')
72
+                . $this->path
73
+                . (substr($this->path, -1, 1) == '/' ? '' : '/')
74
+                . $target->getFilename();
75 75
     }
76 76
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $stream = $this->getFileHandle($this->getUploadPath($target), 'w');
44 44
 
45 45
         try {
46
-            while(!feof($source)) {
46
+            while (!feof($source)) {
47 47
                 fwrite($stream, fread($source, 4096));
48 48
             }
49 49
             fclose($stream);
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     {
67 67
         $handle = fopen($path, $mode);
68 68
         if (!is_resource($handle)) {
69
-            throw new Exception('fopen failed: could not open stream ' . $path);
69
+            throw new Exception('fopen failed: could not open stream '.$path);
70 70
         }
71 71
         return $handle;
72 72
     }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     public function getUploadPath(Target $target)
81 81
     {
82
-        return 's3://' . $this->bucket
82
+        return 's3://'.$this->bucket
83 83
                . (substr($this->path, 0, 1) == '/' ? '' : '/')
84 84
                . $this->path
85 85
                . (substr($this->path, -1, 1) == '/' ? '' : '/')
Please login to merge, or discard this patch.