@@ -83,7 +83,7 @@ |
||
83 | 83 | $process = new Process(['gzip', '-9', $this->getRealDatabase()->getBackupFilename()]); |
84 | 84 | |
85 | 85 | $processFailure = false; |
86 | - $process->run(function ($type, $buffer) use ($processFailure): bool { |
|
86 | + $process->run(function($type, $buffer) use ($processFailure): bool { |
|
87 | 87 | if (Process::OUT === $type) { |
88 | 88 | Log::debug('gzip buffer: '.$buffer); |
89 | 89 | } |
@@ -73,7 +73,7 @@ |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | $process = new Process(['gzip', '-d', $workableFile]); |
76 | - $process->run(function ($type, $buffer): bool { |
|
76 | + $process->run(function($type, $buffer): bool { |
|
77 | 77 | if (Process::OUT === $type) { |
78 | 78 | Log::debug('gzip buffer: '.$buffer); |
79 | 79 | } |
@@ -116,7 +116,7 @@ |
||
116 | 116 | } |
117 | 117 | |
118 | 118 | // Get the files matching the database identifier |
119 | - $filesFilter = array_filter($files, function ($item) { |
|
119 | + $filesFilter = array_filter($files, function($item) { |
|
120 | 120 | return strpos($item, $this->database->getRealDatabase()->getDatabaseIdentifier()); |
121 | 121 | }); |
122 | 122 |
@@ -12,13 +12,13 @@ |
||
12 | 12 | $process = Process::fromShellCommandline($command, null, null, null, 999.00); |
13 | 13 | |
14 | 14 | $processStatus = false; |
15 | - $process->run(function ($type, $buffer) use ($processStatus): bool { |
|
15 | + $process->run(function($type, $buffer) use ($processStatus): bool { |
|
16 | 16 | if (Process::OUT === $type) { |
17 | - Log::debug('Process buffer: ' . $buffer); |
|
17 | + Log::debug('Process buffer: '.$buffer); |
|
18 | 18 | } |
19 | 19 | if (Process::ERR === $type) { |
20 | 20 | if (!strpos($buffer, '[Warning]')) { |
21 | - Log::error('Error will running processor. Output of buffer: ' . $buffer); |
|
21 | + Log::error('Error will running processor. Output of buffer: '.$buffer); |
|
22 | 22 | $processStatus = true; |
23 | 23 | } |
24 | 24 | } |
@@ -7,12 +7,12 @@ |
||
7 | 7 | |
8 | 8 | class ProcessHandler |
9 | 9 | { |
10 | - /** |
|
11 | - * Run the Symfony fromShellCommandLine |
|
12 | - * |
|
13 | - * @param string $command |
|
14 | - * @return boolean |
|
15 | - */ |
|
10 | + /** |
|
11 | + * Run the Symfony fromShellCommandLine |
|
12 | + * |
|
13 | + * @param string $command |
|
14 | + * @return boolean |
|
15 | + */ |
|
16 | 16 | public function run(string $command): bool |
17 | 17 | { |
18 | 18 | $process = Process::fromShellCommandline($command, null, null, null, 999.00); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | */ |
79 | 79 | protected function createBackupFilename(): void |
80 | 80 | { |
81 | - $this->backupFilename = $this->storageFolder . $this->getDatabaseIdentifier() . '-' . microtime(true) . '.' . $this->getFileExtension(); |
|
81 | + $this->backupFilename = $this->storageFolder.$this->getDatabaseIdentifier().'-'.microtime(true).'.'.$this->getFileExtension(); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | Log::debug('Starting MySQL import procedure.'); |
118 | 118 | |
119 | 119 | $startTimeImport = microtime(true); |
120 | - $backupFile = '"' . addcslashes($backupFile, '\\"') . '"'; |
|
120 | + $backupFile = '"'.addcslashes($backupFile, '\\"').'"'; |
|
121 | 121 | $command = sprintf('mysql %s %s < %s', $this->getCredentials(), $this->database, $backupFile); |
122 | 122 | |
123 | 123 | $processHandler = new ProcessHandler(); |