Passed
Push — develop ( e3f88e...a4c009 )
by Erwin
04:16
created
src/Databases/MySQLDatabase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
         Log::debug('Starting MySQL import procedure.');
99 99
 
100 100
         $startTimeImport = microtime(true);
101
-        $backupFile = '"' . addcslashes($backupFile, '\\"') . '"';
101
+        $backupFile = '"'.addcslashes($backupFile, '\\"').'"';
102 102
         $command = sprintf('mysql %s %s < %s', $this->getCredentials(), $this->database, $backupFile);
103 103
 
104 104
         if (false === $this->processHandler->run($command)) {
Please login to merge, or discard this patch.
src/Databases/Storage.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         $configStoragePath = Config::get('db-backup.backup_folder');
23 23
         if (substr($configStoragePath, -1, 1) !== DIRECTORY_SEPARATOR) {
24 24
             Log::debug('Stored back-up folder is not probably set. Fixing.');
25
-            $configStoragePath = $configStoragePath . DIRECTORY_SEPARATOR;
25
+            $configStoragePath = $configStoragePath.DIRECTORY_SEPARATOR;
26 26
         }
27 27
 
28 28
         $this->storagePath = $configStoragePath;
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function generateBackupFilename(string $databaseIdentifier, string $databaseFileExtension): string
74 74
     {
75
-        return $this->backupFilename = $this->storagePath . $databaseIdentifier . '-' . time() . '.' . $databaseFileExtension;
75
+        return $this->backupFilename = $this->storagePath.$databaseIdentifier.'-'.time().'.'.$databaseFileExtension;
76 76
     }
77 77
 
78 78
     /**
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
         }
92 92
 
93 93
         $process = new Process(['gzip', '-d', $workableFile]);
94
-        $process->run(function ($type, $buffer): bool {
94
+        $process->run(function($type, $buffer): bool {
95 95
             if (Process::OUT === $type) {
96
-                Log::debug('gzip buffer: ' . $buffer);
96
+                Log::debug('gzip buffer: '.$buffer);
97 97
             }
98 98
             if (Process::ERR === $type) {
99
-                Log::error('Error whilst performing zip action. Output of buffer: ' . $buffer);
99
+                Log::error('Error whilst performing zip action. Output of buffer: '.$buffer);
100 100
 
101 101
                 return false;
102 102
             }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         }
127 127
 
128 128
         // Get the files matching the database identifier
129
-        $filesFilter = array_filter($files, function ($item) use ($databaseIdentifier) {
129
+        $filesFilter = array_filter($files, function($item) use ($databaseIdentifier) {
130 130
             return strpos($item, $databaseIdentifier);
131 131
         });
132 132
 
@@ -147,13 +147,13 @@  discard block
 block discarded – undo
147 147
     protected function createTmpFile(string $backupFile, Database $database): ?string
148 148
     {
149 149
         Log::debug('Creating temp back-up file to not corrupt the archives.');
150
-        $tmpFilename = 'tmp.' . microtime(true) . '.' . $database->getRealDatabase()->getFileExtension() . '.gz';
151
-        $filePath = $this->storagePath . $tmpFilename;
150
+        $tmpFilename = 'tmp.'.microtime(true).'.'.$database->getRealDatabase()->getFileExtension().'.gz';
151
+        $filePath = $this->storagePath.$tmpFilename;
152 152
 
153 153
         try {
154 154
             File::copy($backupFile, $filePath);
155 155
         } catch (Exception $e) {
156
-            Log::error('Could not create temporary archive file. Exception throw: ' . $e->getMessage());
156
+            Log::error('Could not create temporary archive file. Exception throw: '.$e->getMessage());
157 157
 
158 158
             return null;
159 159
         }
Please login to merge, or discard this patch.
src/Databases/Database.php 1 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 __construct()
33 33
     {
34 34
         $this->database = Config::get('database.default');
35
-        $this->realDatabase = Config::get('database.connections.' . $this->database);
35
+        $this->realDatabase = Config::get('database.connections.'.$this->database);
36 36
         $this->processHandler = new ProcessHandler();
37 37
     }
38 38
 
Please login to merge, or discard this patch.