@@ -35,13 +35,13 @@ discard block |
||
| 35 | 35 | public function log($type, Message $mail): void |
| 36 | 36 | { |
| 37 | 37 | $timestamp = date('Y-m-d H:i:s'); |
| 38 | - $type .= '.' . time(); |
|
| 38 | + $type .= '.'.time(); |
|
| 39 | 39 | $file = $this->getLogFile($type, $timestamp); |
| 40 | 40 | |
| 41 | 41 | if (file_exists($file) && filesize($file)) { |
| 42 | 42 | $file = str_replace( |
| 43 | 43 | static::LOG_EXTENSION, |
| 44 | - '.' . uniqid() . static::LOG_EXTENSION, |
|
| 44 | + '.'.uniqid().static::LOG_EXTENSION, |
|
| 45 | 45 | $file |
| 46 | 46 | ); |
| 47 | 47 | } |
@@ -57,10 +57,10 @@ discard block |
||
| 57 | 57 | { |
| 58 | 58 | preg_match('/^((([0-9]{4})-[0-9]{2})-[0-9]{2}).*/', $timestamp, $fragments); |
| 59 | 59 | |
| 60 | - $yearDir = $this->logDirectory . '/' . $fragments[3]; |
|
| 61 | - $monthDir = $yearDir . '/' . $fragments[2]; |
|
| 62 | - $dayDir = $monthDir . '/' . $fragments[1]; |
|
| 63 | - $file = $dayDir . '/' . $type . static::LOG_EXTENSION; |
|
| 60 | + $yearDir = $this->logDirectory.'/'.$fragments[3]; |
|
| 61 | + $monthDir = $yearDir.'/'.$fragments[2]; |
|
| 62 | + $dayDir = $monthDir.'/'.$fragments[1]; |
|
| 63 | + $file = $dayDir.'/'.$type.static::LOG_EXTENSION; |
|
| 64 | 64 | |
| 65 | 65 | if (!file_exists($dayDir)) { |
| 66 | 66 | mkdir($dayDir, 0777, true); |