@@ -52,7 +52,7 @@ |
||
| 52 | 52 | public function sync(Target $target, Result $result) |
| 53 | 53 | { |
| 54 | 54 | // silence ftp errors |
| 55 | - $old = error_reporting(0); |
|
| 55 | + $old = error_reporting(0); |
|
| 56 | 56 | if (!$ftpConnection = ftp_connect($this->host)) { |
| 57 | 57 | throw new Exception( |
| 58 | 58 | sprintf( |
@@ -57,6 +57,6 @@ |
||
| 57 | 57 | */ |
| 58 | 58 | public static function getVersionString() : string |
| 59 | 59 | { |
| 60 | - return 'phpbu ' . self::id() . ' by Sebastian Feldmann and contributors.'; |
|
| 60 | + return 'phpbu '.self::id().' by Sebastian Feldmann and contributors.'; |
|
| 61 | 61 | } |
| 62 | 62 | } |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | public function encryptFile(string $file) : OpenSSL |
| 178 | 178 | { |
| 179 | 179 | $this->sourceFile = $file; |
| 180 | - $this->targetFile = $file . '.enc'; |
|
| 180 | + $this->targetFile = $file.'.enc'; |
|
| 181 | 181 | return $this; |
| 182 | 182 | } |
| 183 | 183 | |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | { |
| 311 | 311 | $cmd->addOption('smime'); |
| 312 | 312 | $cmd->addOption('-encrypt'); |
| 313 | - $cmd->addOption('-' . $this->algorithm); |
|
| 313 | + $cmd->addOption('-'.$this->algorithm); |
|
| 314 | 314 | $cmd->addOption('-binary'); |
| 315 | 315 | $cmd->addOption('-in', $this->sourceFile, ' '); |
| 316 | 316 | $cmd->addOption('-out', $this->targetFile, ' '); |
@@ -325,12 +325,12 @@ discard block |
||
| 325 | 325 | */ |
| 326 | 326 | protected function setPasswordOptions(Cmd $cmd) |
| 327 | 327 | { |
| 328 | - $password = 'pass:' . $this->password; |
|
| 328 | + $password = 'pass:'.$this->password; |
|
| 329 | 329 | |
| 330 | 330 | $cmd->addOption('enc'); |
| 331 | 331 | $cmd->addOption('-e'); |
| 332 | 332 | $cmd->addOptionIfNotEmpty('-a', $this->base64, false); |
| 333 | - $cmd->addOption('-' . $this->algorithm); |
|
| 333 | + $cmd->addOption('-'.$this->algorithm); |
|
| 334 | 334 | $cmd->addOption('-pass', $password, ' '); |
| 335 | 335 | $cmd->addOption('-in', $this->sourceFile, ' '); |
| 336 | 336 | $cmd->addOption('-out', $this->targetFile, ' '); |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | */ |
| 81 | 81 | public function runCommand(string $command) : RedisCli |
| 82 | 82 | { |
| 83 | - if(!isset($this->availableCommands[$command])) { |
|
| 83 | + if (!isset($this->availableCommands[$command])) { |
|
| 84 | 84 | throw new Exception('Unknown redis-cli command'); |
| 85 | 85 | } |
| 86 | 86 | $this->command = $command; |
@@ -453,8 +453,8 @@ |
||
| 453 | 453 | protected function createCommandLine() : CommandLine |
| 454 | 454 | { |
| 455 | 455 | $process = new CommandLine(); |
| 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 |
@@ -102,9 +102,9 @@ |
||
| 102 | 102 | if (!empty($this->host)) { |
| 103 | 103 | // remote user |
| 104 | 104 | if (!empty($this->user)) { |
| 105 | - $return .= $this->user . '@'; |
|
| 105 | + $return .= $this->user.'@'; |
|
| 106 | 106 | } |
| 107 | - $return .= $this->host . ':'; |
|
| 107 | + $return .= $this->host.':'; |
|
| 108 | 108 | } |
| 109 | 109 | $return .= $this->path; |
| 110 | 110 | |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | public function __construct(Runner $runner = null) |
| 41 | 41 | { |
| 42 | - $this->runner = $runner ? : new Runner\Simple(); |
|
| 42 | + $this->runner = $runner ?: new Runner\Simple(); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -33,10 +33,10 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -113,7 +113,7 @@ |
||
| 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) |