@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | private function validateFile(): bool |
| 44 | 44 | { |
| 45 | - if (! is_file($this->file)) { |
|
| 45 | + if (!is_file($this->file)) { |
|
| 46 | 46 | event(new RotateIsNotNecessary($this->file, 'File '.$this->file.' does not exists')); |
| 47 | 47 | |
| 48 | 48 | return false; |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | return false; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - if (! is_writable($this->file)) { |
|
| 57 | + if (!is_writable($this->file)) { |
|
| 58 | 58 | event(new RotateHasFailed($this->file, new Exception('File '.$this->file.' is not writable'))); |
| 59 | 59 | |
| 60 | 60 | return false; |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | private function validateDirectory(): bool |
| 67 | 67 | { |
| 68 | 68 | if (is_dir($this->dir_to_archive)) { |
| 69 | - if (! is_writable($this->dir_to_archive)) { |
|
| 69 | + if (!is_writable($this->dir_to_archive)) { |
|
| 70 | 70 | event(new RotateHasFailed($this->file, new Exception('Directory '.$this->dir_to_archive.' to archive logs is not writable'))); |
| 71 | 71 | |
| 72 | 72 | return false; |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | return false; |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - if (! mkdir($this->dir_to_archive, 0777, true)) { |
|
| 84 | + if (!mkdir($this->dir_to_archive, 0777, true)) { |
|
| 85 | 85 | event(new RotateHasFailed($this->file, new Exception('Directory '.$this->dir_to_archive.' to archive logs is not writable'))); |
| 86 | 86 | |
| 87 | 87 | return false; |
@@ -104,23 +104,23 @@ discard block |
||
| 104 | 104 | { |
| 105 | 105 | $fdSource = fopen($fileSource, 'r+'); |
| 106 | 106 | |
| 107 | - if (! $fdSource) { |
|
| 107 | + if (!$fdSource) { |
|
| 108 | 108 | return false; |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | - if (! flock($fdSource, LOCK_EX)) { |
|
| 111 | + if (!flock($fdSource, LOCK_EX)) { |
|
| 112 | 112 | fclose($fdSource); |
| 113 | 113 | |
| 114 | 114 | return false; |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | - if (! copy($fileSource, $fileDestination)) { |
|
| 117 | + if (!copy($fileSource, $fileDestination)) { |
|
| 118 | 118 | fclose($fdSource); |
| 119 | 119 | |
| 120 | 120 | return false; |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | - if (! ftruncate($fdSource, 0)) { |
|
| 123 | + if (!ftruncate($fdSource, 0)) { |
|
| 124 | 124 | fclose($fdSource); |
| 125 | 125 | |
| 126 | 126 | unlink($fileDestination); |