@@ -105,7 +105,7 @@ discard block |
||
| 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 |
||
| 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); |
@@ -27,7 +27,7 @@ |
||
| 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 | } |
@@ -246,7 +246,7 @@ |
||
| 246 | 246 | $result->debug($pgDump->getCmdPrintable()); |
| 247 | 247 | |
| 248 | 248 | if (!$pgDump->isSuccessful()) { |
| 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); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $result->debug($this->getExecutable($target)->getCommandPrintable()); |
| 124 | 124 | |
| 125 | 125 | if (!$innobackupex->isSuccessful()) { |
| 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); |
@@ -167,6 +167,6 @@ discard block |
||
| 167 | 167 | */ |
| 168 | 168 | public function getDumpDir(Target $target) : string |
| 169 | 169 | { |
| 170 | - return $target->getPath() . '/dump'; |
|
| 170 | + return $target->getPath().'/dump'; |
|
| 171 | 171 | } |
| 172 | 172 | } |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | $result->debug($arangodump->getCmdPrintable()); |
| 145 | 145 | |
| 146 | 146 | if (!$arangodump->isSuccessful()) { |
| 147 | - throw new Exception('arangodump failed: ' . $arangodump->getStdErr()); |
|
| 147 | + throw new Exception('arangodump failed: '.$arangodump->getStdErr()); |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | return $this->createStatus($target); |
@@ -190,6 +190,6 @@ discard block |
||
| 190 | 190 | */ |
| 191 | 191 | public function getDumpDir(Target $target) : string |
| 192 | 192 | { |
| 193 | - return $target->getPath() . '/dump'; |
|
| 193 | + return $target->getPath().'/dump'; |
|
| 194 | 194 | } |
| 195 | 195 | } |
@@ -64,14 +64,14 @@ |
||
| 64 | 64 | public function compress(Target $target, Result $result) |
| 65 | 65 | { |
| 66 | 66 | if (!$this->isPathValid($this->path)) { |
| 67 | - throw new Exception('path to compress should be valid: ' . $this->path); |
|
| 67 | + throw new Exception('path to compress should be valid: '.$this->path); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | $res = $this->execute($target); |
| 71 | 71 | $result->debug($res->getCmd()); |
| 72 | 72 | |
| 73 | 73 | if (!$res->isSuccessful()) { |
| 74 | - throw new Exception('Failed to \'compress\' file: ' . $this->path); |
|
| 74 | + throw new Exception('Failed to \'compress\' file: '.$this->path); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | return $this->getArchiveFile($target); |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $result->debug($rsync->getCmd()); |
| 60 | 60 | |
| 61 | 61 | if (!$rsync->isSuccessful()) { |
| 62 | - throw new Exception('rsync failed: ' . $rsync->getStdErr()); |
|
| 62 | + throw new Exception('rsync failed: '.$rsync->getStdErr()); |
|
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | public function simulate(Target $target, Result $result) |
| 73 | 73 | { |
| 74 | 74 | $result->debug( |
| 75 | - 'sync backup with rsync' . PHP_EOL |
|
| 75 | + 'sync backup with rsync'.PHP_EOL |
|
| 76 | 76 | . $this->getExecutable($target)->getCommandPrintable() |
| 77 | 77 | ); |
| 78 | 78 | } |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | $this->pathElementsChanging[] = $d; |
| 180 | 180 | $foundChangingElement = true; |
| 181 | 181 | } else { |
| 182 | - $this->pathNotChanging .= DIRECTORY_SEPARATOR . $d; |
|
| 182 | + $this->pathNotChanging .= DIRECTORY_SEPARATOR.$d; |
|
| 183 | 183 | } |
| 184 | 184 | } |
| 185 | 185 | } |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | */ |
| 272 | 272 | public function getFilename(bool $plain = false) : string |
| 273 | 273 | { |
| 274 | - return $this->filename . $this->getFilenameSuffix($plain); |
|
| 274 | + return $this->filename.$this->getFilenameSuffix($plain); |
|
| 275 | 275 | } |
| 276 | 276 | |
| 277 | 277 | /** |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | */ |
| 293 | 293 | public function getFilenameRaw($plain = false) : string |
| 294 | 294 | { |
| 295 | - return $this->filenameRaw . $this->getFilenameSuffix($plain); |
|
| 295 | + return $this->filenameRaw.$this->getFilenameSuffix($plain); |
|
| 296 | 296 | } |
| 297 | 297 | |
| 298 | 298 | /** |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | */ |
| 304 | 304 | public function getFilenameSuffix($plain = false) : string |
| 305 | 305 | { |
| 306 | - return $this->getSuffixToAppend() . ($plain ? '' : $this->getCompressionSuffix() . $this->getCrypterSuffix()); |
|
| 306 | + return $this->getSuffixToAppend().($plain ? '' : $this->getCompressionSuffix().$this->getCrypterSuffix()); |
|
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | /** |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | */ |
| 314 | 314 | public function getSuffixToAppend() : string |
| 315 | 315 | { |
| 316 | - return count($this->fileSuffixes) ? '.' . implode('.', $this->fileSuffixes) : ''; |
|
| 316 | + return count($this->fileSuffixes) ? '.'.implode('.', $this->fileSuffixes) : ''; |
|
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | /** |
@@ -323,7 +323,7 @@ discard block |
||
| 323 | 323 | */ |
| 324 | 324 | public function getCompressionSuffix() : string |
| 325 | 325 | { |
| 326 | - return $this->shouldBeCompressed() ? '.' . $this->compression->getSuffix() : ''; |
|
| 326 | + return $this->shouldBeCompressed() ? '.'.$this->compression->getSuffix() : ''; |
|
| 327 | 327 | } |
| 328 | 328 | |
| 329 | 329 | /** |
@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | */ |
| 334 | 334 | public function getCrypterSuffix() : string |
| 335 | 335 | { |
| 336 | - return $this->shouldBeEncrypted() ? '.' . $this->crypter->getSuffix() : ''; |
|
| 336 | + return $this->shouldBeEncrypted() ? '.'.$this->crypter->getSuffix() : ''; |
|
| 337 | 337 | } |
| 338 | 338 | |
| 339 | 339 | /** |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | */ |
| 407 | 407 | public function getPathname(bool $plain = false) : string |
| 408 | 408 | { |
| 409 | - return $this->path . DIRECTORY_SEPARATOR . $this->getFilename($plain); |
|
| 409 | + return $this->path.DIRECTORY_SEPARATOR.$this->getFilename($plain); |
|
| 410 | 410 | } |
| 411 | 411 | |
| 412 | 412 | /** |
@@ -64,11 +64,11 @@ |
||
| 64 | 64 | protected function findConfigurationInDir(string $path) : string |
| 65 | 65 | { |
| 66 | 66 | foreach ($this->defaultConfigNames as $file) { |
| 67 | - $configurationFile = $path . DIRECTORY_SEPARATOR . $file; |
|
| 67 | + $configurationFile = $path.DIRECTORY_SEPARATOR.$file; |
|
| 68 | 68 | if (file_exists($configurationFile)) { |
| 69 | 69 | return realpath($configurationFile); |
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | - throw new Exception('Can\'t find configuration in directory \'' . $path . '\'.'); |
|
| 72 | + throw new Exception('Can\'t find configuration in directory \''.$path.'\'.'); |
|
| 73 | 73 | } |
| 74 | 74 | } |