@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | class RequestLogger |
| 9 | 9 | { |
| 10 | 10 | public function saveLog($data, $type = 'access') { |
| 11 | - if(empty($type)) { |
|
| 11 | + if (empty($type)) { |
|
| 12 | 12 | throw new \Exception('Type isnt correct set.'); |
| 13 | 13 | } |
| 14 | 14 | |
@@ -16,10 +16,10 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | $folder = storage_path($base_path); |
| 18 | 18 | |
| 19 | - if(!File::exists($folder)) { |
|
| 19 | + if (!File::exists($folder)) { |
|
| 20 | 20 | $result = File::makeDirectory($folder); |
| 21 | 21 | |
| 22 | - if(!$result) { |
|
| 22 | + if (!$result) { |
|
| 23 | 23 | throw new \Exception('Cannot create folder in storage path.'); |
| 24 | 24 | } |
| 25 | 25 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | $file = storage_path($base_path.'/'.$date_folder.'/'.$type.'.log'); |
| 29 | 29 | |
| 30 | 30 | $write_check = File::put($file, $data); |
| 31 | - if(!$write_check) { |
|
| 31 | + if (!$write_check) { |
|
| 32 | 32 | throw new \Exception('Cannot write content to file.'); |
| 33 | 33 | } |
| 34 | 34 | |