Passed
Push — master ( 49df9d...566a3a )
by 世昌
02:42
created
suda/src/framework/debug/log/logger/FileLogger.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             throw new FileLoggerException(__CLASS__.':'.sprintf('cannot create log file'));
95 95
         }
96 96
         $this->latest = $save.'/'.$this->getConfig('file-name');
97
-        register_shutdown_function([$this,'save']);
97
+        register_shutdown_function([$this, 'save']);
98 98
     }
99 99
 
100 100
     public function getDefaultConfig():array
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
     protected function packLogFile()
114 114
     {
115 115
         $logFile = $this->latest;
116
-        $path = preg_replace('/[\\\\]+/', '/', $this->getConfig('save-zip-path') .'/'.date('Y-m-d').'.zip');
116
+        $path = preg_replace('/[\\\\]+/', '/', $this->getConfig('save-zip-path').'/'.date('Y-m-d').'.zip');
117 117
         $zip = $this->getZipArchive($path);
118 118
         if ($zip !== null) {
119
-            if ($zip->addFile($logFile, date('Y-m-d'). '-'. $zip->numFiles .'.log')) {
119
+            if ($zip->addFile($logFile, date('Y-m-d').'-'.$zip->numFiles.'.log')) {
120 120
                 array_push($this->removeFiles, $logFile);
121 121
             }
122 122
             if (is_dir($this->getConfig('save-pack-path'))) {
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
             $zip->close();
131 131
         } else {
132 132
             if (is_file($logFile) && file_exists($logFile)) {
133
-                rename($logFile, $this->getConfig('save-path') . '/' . date('Y-m-d'). '-'. substr(md5_file($logFile), 0, 8).'.log');
133
+                rename($logFile, $this->getConfig('save-path').'/'.date('Y-m-d').'-'.substr(md5_file($logFile), 0, 8).'.log');
134 134
             }
135 135
         }
136 136
     }
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
             } elseif (null === $val) {
236 236
                 $val = 'null';
237 237
             }
238
-            $replace['{' . $key . '}'] = $val;
238
+            $replace['{'.$key.'}'] = $val;
239 239
         }
240 240
         return strtr($message, $replace);
241 241
     }
Please login to merge, or discard this patch.