@@ -286,7 +286,7 @@ |
||
286 | 286 | { |
287 | 287 | if (!isset(self::$classMap[$type])) { |
288 | 288 | throw new Exception( |
289 | - 'invalid type, please use only \'' . implode('\', \'', array_keys(self::$classMap)) . '\'' |
|
289 | + 'invalid type, please use only \''.implode('\', \'', array_keys(self::$classMap)).'\'' |
|
290 | 290 | ); |
291 | 291 | } |
292 | 292 | } |
@@ -77,7 +77,7 @@ |
||
77 | 77 | protected function getAdapter($name) |
78 | 78 | { |
79 | 79 | if (!isset($this->adapters[$name])) { |
80 | - throw new Exception('no adapter registered with name: ' . $name); |
|
80 | + throw new Exception('no adapter registered with name: '.$name); |
|
81 | 81 | } |
82 | 82 | return $this->adapters[$name]; |
83 | 83 | } |
@@ -48,39 +48,39 @@ |
||
48 | 48 | { |
49 | 49 | self::setSnippets([ |
50 | 50 | 'sBody' => 'style="font-family: Arial, Helvetica, sans-serif; ' . |
51 | - 'background-color:#343b43; ' . |
|
52 | - 'font-size: 15px; margin:0; ' . |
|
53 | - 'padding:0;"', |
|
51 | + 'background-color:#343b43; ' . |
|
52 | + 'font-size: 15px; margin:0; ' . |
|
53 | + 'padding:0;"', |
|
54 | 54 | 'sTableHeader' => 'style="width:100%; ' . |
55 | - 'font-family: Arial, Helvetica, sans-serif; ' . |
|
56 | - 'margin:0; color:#e6e6e6;" ' . |
|
57 | - 'align="center" cellpadding="5" cellspacing="0"', |
|
55 | + 'font-family: Arial, Helvetica, sans-serif; ' . |
|
56 | + 'margin:0; color:#e6e6e6;" ' . |
|
57 | + 'align="center" cellpadding="5" cellspacing="0"', |
|
58 | 58 | 'sTableError' => 'style="width:100%; ' . |
59 | - 'background-color:#e6e6e6; ' . |
|
60 | - 'margin:0 auto 15px; ' . |
|
61 | - 'border:1px solid #011516;" ' . |
|
62 | - 'align="center" cellpadding="5" cellspacing="0"', |
|
59 | + 'background-color:#e6e6e6; ' . |
|
60 | + 'margin:0 auto 15px; ' . |
|
61 | + 'border:1px solid #011516;" ' . |
|
62 | + 'align="center" cellpadding="5" cellspacing="0"', |
|
63 | 63 | 'sTableErrorCol' => 'style="border-top: 1px solid #f6f6f6; ' . |
64 | - 'border-bottom: 1px solid #c9c9c9;"', |
|
64 | + 'border-bottom: 1px solid #c9c9c9;"', |
|
65 | 65 | 'sTableContent' => 'style="width:380px; ' . |
66 | - 'font-family: Arial, Helvetica, sans-serif; ' . |
|
67 | - 'margin:0 auto;" ' . |
|
68 | - 'align="center" cellpadding="0" cellspacing="0"', |
|
66 | + 'font-family: Arial, Helvetica, sans-serif; ' . |
|
67 | + 'margin:0 auto;" ' . |
|
68 | + 'align="center" cellpadding="0" cellspacing="0"', |
|
69 | 69 | 'sTableContentCol' => 'style="padding:0 10px;"', |
70 | 70 | 'sTableStatus' => 'style="background-color:#%s; ' . |
71 | - 'width:100%%; ' . |
|
72 | - 'margin:0 auto 15px; ' . |
|
73 | - 'border:1px solid #011516;" ' . |
|
74 | - 'align="center" cellpadding="10" cellspacing="0"', |
|
71 | + 'width:100%%; ' . |
|
72 | + 'margin:0 auto 15px; ' . |
|
73 | + 'border:1px solid #011516;" ' . |
|
74 | + 'align="center" cellpadding="10" cellspacing="0"', |
|
75 | 75 | 'sTableStatusHead' => 'style="margin:0;"', |
76 | 76 | 'sTableStatusText' => 'style="font-size:16px;"', |
77 | 77 | 'sTableBackup' => 'style="width:100%; font-family: Arial, Helvetica, sans-serif; ' . |
78 | - 'background-color:#e6e6e6; ' . |
|
79 | - 'margin:0 0 15px; ' . |
|
80 | - 'border:1px solid #011516;" ' . |
|
81 | - 'align="center" cellpadding="5" cellspacing="0" width="100%"', |
|
78 | + 'background-color:#e6e6e6; ' . |
|
79 | + 'margin:0 0 15px; ' . |
|
80 | + 'border:1px solid #011516;" ' . |
|
81 | + 'align="center" cellpadding="5" cellspacing="0" width="100%"', |
|
82 | 82 | 'sTableBackupStatusColumn' => 'style="background-color:#%s; ' . |
83 | - 'border-bottom:1px solid #747474;"', |
|
83 | + 'border-bottom:1px solid #747474;"', |
|
84 | 84 | 'sTableBackupStatusText' => 'style="float:right;"', |
85 | 85 | 'sRowHead' => 'style="border-top: 1px solid #f6f6f6; border-bottom: 1px solid #c9c9c9;"', |
86 | 86 | 'sRowCheck' => 'style="border-top: 1px solid #f6f6f6; border-bottom: 1px solid #c9c9c9;"', |
@@ -47,39 +47,39 @@ |
||
47 | 47 | public static function setDefaultSnippets() |
48 | 48 | { |
49 | 49 | self::setSnippets([ |
50 | - 'sBody' => 'style="font-family: Arial, Helvetica, sans-serif; ' . |
|
51 | - 'background-color:#343b43; ' . |
|
52 | - 'font-size: 15px; margin:0; ' . |
|
50 | + 'sBody' => 'style="font-family: Arial, Helvetica, sans-serif; '. |
|
51 | + 'background-color:#343b43; '. |
|
52 | + 'font-size: 15px; margin:0; '. |
|
53 | 53 | 'padding:0;"', |
54 | - 'sTableHeader' => 'style="width:100%; ' . |
|
55 | - 'font-family: Arial, Helvetica, sans-serif; ' . |
|
56 | - 'margin:0; color:#e6e6e6;" ' . |
|
54 | + 'sTableHeader' => 'style="width:100%; '. |
|
55 | + 'font-family: Arial, Helvetica, sans-serif; '. |
|
56 | + 'margin:0; color:#e6e6e6;" '. |
|
57 | 57 | 'align="center" cellpadding="5" cellspacing="0"', |
58 | - 'sTableError' => 'style="width:100%; ' . |
|
59 | - 'background-color:#e6e6e6; ' . |
|
60 | - 'margin:0 auto 15px; ' . |
|
61 | - 'border:1px solid #011516;" ' . |
|
58 | + 'sTableError' => 'style="width:100%; '. |
|
59 | + 'background-color:#e6e6e6; '. |
|
60 | + 'margin:0 auto 15px; '. |
|
61 | + 'border:1px solid #011516;" '. |
|
62 | 62 | 'align="center" cellpadding="5" cellspacing="0"', |
63 | - 'sTableErrorCol' => 'style="border-top: 1px solid #f6f6f6; ' . |
|
63 | + 'sTableErrorCol' => 'style="border-top: 1px solid #f6f6f6; '. |
|
64 | 64 | 'border-bottom: 1px solid #c9c9c9;"', |
65 | - 'sTableContent' => 'style="width:380px; ' . |
|
66 | - 'font-family: Arial, Helvetica, sans-serif; ' . |
|
67 | - 'margin:0 auto;" ' . |
|
65 | + 'sTableContent' => 'style="width:380px; '. |
|
66 | + 'font-family: Arial, Helvetica, sans-serif; '. |
|
67 | + 'margin:0 auto;" '. |
|
68 | 68 | 'align="center" cellpadding="0" cellspacing="0"', |
69 | 69 | 'sTableContentCol' => 'style="padding:0 10px;"', |
70 | - 'sTableStatus' => 'style="background-color:#%s; ' . |
|
71 | - 'width:100%%; ' . |
|
72 | - 'margin:0 auto 15px; ' . |
|
73 | - 'border:1px solid #011516;" ' . |
|
70 | + 'sTableStatus' => 'style="background-color:#%s; '. |
|
71 | + 'width:100%%; '. |
|
72 | + 'margin:0 auto 15px; '. |
|
73 | + 'border:1px solid #011516;" '. |
|
74 | 74 | 'align="center" cellpadding="10" cellspacing="0"', |
75 | 75 | 'sTableStatusHead' => 'style="margin:0;"', |
76 | 76 | 'sTableStatusText' => 'style="font-size:16px;"', |
77 | - 'sTableBackup' => 'style="width:100%; font-family: Arial, Helvetica, sans-serif; ' . |
|
78 | - 'background-color:#e6e6e6; ' . |
|
79 | - 'margin:0 0 15px; ' . |
|
80 | - 'border:1px solid #011516;" ' . |
|
77 | + 'sTableBackup' => 'style="width:100%; font-family: Arial, Helvetica, sans-serif; '. |
|
78 | + 'background-color:#e6e6e6; '. |
|
79 | + 'margin:0 0 15px; '. |
|
80 | + 'border:1px solid #011516;" '. |
|
81 | 81 | 'align="center" cellpadding="5" cellspacing="0" width="100%"', |
82 | - 'sTableBackupStatusColumn' => 'style="background-color:#%s; ' . |
|
82 | + 'sTableBackupStatusColumn' => 'style="background-color:#%s; '. |
|
83 | 83 | 'border-bottom:1px solid #747474;"', |
84 | 84 | 'sTableBackupStatusText' => 'style="float:right;"', |
85 | 85 | 'sRowHead' => 'style="border-top: 1px solid #f6f6f6; border-bottom: 1px solid #c9c9c9;"', |
@@ -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 | /** |